- Up - | Next >> |
The module Number
contains procedures operating on numbers. Numbers in Oz are either integers or floats. The following arithmetic procedures are defined both on integers and on floats; however, there is no implicit conversion. If one input argument is a float and the other an integer, a type error is raised.
IsNumber
{Number.is
+X
?B
}
tests whether X
is a number.
+
{Number.'+'
+FI1
+FI2
?FI3
}
returns the sum of FI1
and FI2
.
-
{Number.'-'
+FI1
+FI2
?FI3
}
returns the difference of FI1
and FI2
.
*
{Number.'*'
+FI1
+FI2
?FI3
}
returns the product of FI1
and FI2
.
~
{Number.'~'
+FI1
?FI2
}
returns the negation of FI1
.
Pow
{Number.pow
+FI1
+FI2
?FI3
}
returns FI1
to the power of FI2
.
Abs
{Number.abs
+FI1
?FI2
}
returns the absolute value of FI1
.
- Up - | Next >> |