Arithmetic

function even? x

is x even?

Param x:

number

Type x:

number

Return:

#t if x is even, #f otherwise

Rtype:

boolean

function odd? x

is x odd?

Param x:

number

Type x:

number

Return:

#t if x is odd, #f otherwise

Rtype:

boolean

function zero? o

test if o is the numeric value zero

a fixnum or a bignum with the value zero

Param o:

object to test

Return:

#t if o is zero, #f otherwise

function positive? x

is x greater than 0?

Param x:

number

Type x:

number

Return:

#t if x is greater than zero, #f otherwise

Rtype:

boolean

function negative? x

is x less than 0?

Param x:

number

Type x:

number

Return:

#t if x is less than zero, #f otherwise

Rtype:

boolean

function abs n
function quotient a b

return the quotient a / b

Param a:

number

Type a:

fixnum or bignum

Param b:

number

Type b:

fixnum or bignum

Return:

quotient of a / b

Rtype:

fixnum or bignum

function expt x y

raise x to the power of y

Param x:

number

Type x:

number

Param y:

number

Type y:

number

Return:

x to the power y

Rtype:

number

See also

exp

function gcd [a]

return the greatest common divisor of the numbers in a

Param a:

list of numbers

Type a:

list

Return:

greatest common divisor

Rtype:

number

If no numbers are provided the result is 0.

function lcm [a]

return the least common multiple of the numbers in a

Param a:

list of numbers

Type a:

list

Return:

lowest common multiple

Rtype:

number

If no numbers are provided the result is 1.

function max a [b]

return the largest of the numbers in a and the numbers in the list b

Param a:

number

Type a:

number

Param b:

list of numbers

Type b:

list

Return:

largest number

Rtype:

number

If any number is inexact the result is inexact.

function min a [b]

return the smallest of the numbers in a and the numbers in the list b

Param a:

number

Type a:

number

Param b:

list of numbers

Type b:

list

Return:

smallest number

Rtype:

number

If any number is inexact the result is inexact.

function remainder a b

return the remainder of a less floor (b)

Param a:

number

Type a:

fixnum or bignum

Param b:

number

Type b:

fixnum or bignum

Return:

remainder of a modulo floor(b)

Rtype:

fixnum or bignum

function modulo a b

return a modulo b

Param a:

number

Type a:

integer

Param b:

number

Type b:

integer

Return:

a module b

Rtype:

integer

function floor a

return the floor of a

Param a:

number

Type a:

fixnum or bignum

Return:

floor of a

Rtype:

integer

function ceiling x

return the smallest integer less than x

Param x:

number

Type x:

number

Return:

smallest integer less than x

Rtype:

integer

function round x

return the integer closest to x

Param x:

number

Type x:

number

Return:

integer closest to x

Rtype:

integer

function truncate x

return the integer furthest from 0 but no further than x

Param x:

number

Type x:

number

Return:

integer furthest from 0 but not further than x

Rtype:

integer

function factorial x

Return the factorial of x

Param x:

number

Type x:

number

Return:

factorial of x

Rtype:

number

function exp x

raise Euler’s number, e, to the power of x

Param x:

number

Type x:

number

Return:

e to the power x

Rtype:

number

See also

expt and log

function log x

return the natural logarithm of x

Param x:

number

Type x:

positive number

Return:

natural log of x

Rtype:

number

See also

exp

function cos x

return the cosine of x

Param x:

number

Type x:

number

Return:

cosine of x

Rtype:

number

function sin x

return the sine of x

Param x:

number

Type x:

number

Return:

sine of x

Rtype:

number

function tan x

return the tangent of x

Param x:

number

Type x:

number

Return:

tangent of x

Rtype:

number

function atan x

return the arctangent of x

Param x:

number

Type x:

number

Return:

arctangent of x

Rtype:

number

function acos x

return the arccosine of x

Param x:

number

Type x:

number

Return:

arccosine of x

Rtype:

number

function asin x

return the arcsine of x

Param x:

number

Type x:

number

Return:

arcsine of x

Rtype:

number

function sqrt square

return the square root of square

Param square:

number

Type square:

number

Return:

square root of square

Rtype:

number

Last built at 2024-05-17T06:10:56Z+0000 from 62cca4c (dev) for Idio 0.3.b.6