Introduced 'number' Object
Since 0.23.15 version it is possible to use
number
object just like this:
# this is 7
(QQ.math.number -7).abs
It is a decorator of int and float objects with the following additional attributes:
is-int - is this number is int (/bool)
is-float - is this number is float (/bool)
xor - bitwise xor operation, only for int (/int)
or - bitwise or operation, only for int (/int)
and - bitwise and operation, only for int (/int)
left - bitwise left shift operation, only for int (/int)
right - bitwise right shift operation, only for int (/int)
neq - this number not equal to another number (/bool)
mod - modulo operation (right now just for /int)
abs - absolute value (/int or /float)
pow - make this number power of another number (/int or /float)
as-float - converts this number to float (/float)
as-int - converts this number to int (/int)
as-string - converts this number to int (/string)
signum - sign of this number (/int of /float)
Return values depends on type of provided number.
Visit our paper to get more details.