[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

__Function:__`+`

*z ...*__Function:__`*`

*z ...*- [R5RS]
Returns the sum or the product of given numbers, respectively.
If no argument is given,
`(+)`

yields 0 and`(*)`

yields 1.

__Function:__`-`

*z1 z2 ...*__Function:__`/`

*z1 z2 ...*- [R5RS]
If only one number
`z1`is given, returns its negation and reciprocal, respectively.If more than one number are given, returns:

respectively.`z1`-`z2`-`z3`...`z1`/`z2`/`z3`...(- 3) => -3 (- -3.0) => 3.0 (- 5+2i) => -5.0-2.0i (/ 3) => 0.333333333333333 (/ 5+2i) => 0.172413793103448-0.0689655172413793i (- 5 2 1) => 2 (- 5 2.0 1) => 2.0 (- 5+3i -i) => 5.0+2.0i (/ 6+2i 2) => 3.0+1.0i

__Function:__**abs***z*- [R5RS+]
For real number
`z`, returns an absolute value of it. For complex number`z`, returns the magnitude of the number. The complex part is Gauche extension.(abs -1) => 1 (abs -1.0) => 1.0 (abs 1+i) => 1.4142135623731

__Function:__**quotient***n1 n2*__Function:__**remainder***n1 n2*__Function:__**modulo***n1 n2*- [R5RS]
Returns the quotient, remainder and modulo of dividing an integer
`n1`by an integer`n2`. The result is an exact number only if both`n1`and`n2`are exact numbers.Remainder and modulo differ when either one of the arguments is negative. Remainder

`R`and quotient`Q`have the following relationship.

where`n1`=`Q`*`n2`+`R``abs(`

. Consequently,`Q`) = floor(abs(`n1`)/abs(`n2`))`R`'s sign is always the same as`n1`'s.On the other hand, modulo works as expected for positive

`n2`, regardless of the sign of`n1`(e.g.`(modulo -1`

). If`n2`) ==`n2`- 1`n2`is negative, it is mapped to the positive case by the following relationship.

Consequently,modulo(

`n1`,`n2`) = -modulo(-`n1`, -`n2`)`modulo`'s sign is always the same as`n2`'s.(remainder 10 3) => 1 (modulo 10 3) => 1 (remainder -10 3) => -1 (modulo -10 3) => 2 (remainder 10 -3) => 1 (modulo 10 -3) => -2 (remainder -10 -3) => -1 (modulo -10 -3) => -1

__Function:__**quotient&remainder***n1 n2*- Calculates the quotient and the remainder of dividing integer
`n1`by integer`n2`simultaneously, and returns them as two values.

__Function:__**gcd***n ...*__Function:__**lcm***n ...*- [R5RS] Returns the greatest common divisor or the least common multiplier of the given integers, respectively

__Function:__**numerator***q*__Function:__**denominator***q*- [R5RS]
Returns the numerator and denominator of a rational number
`q`. Since Gauche doesn't support full rational numbers, they actually work only on integers; that is, given integer`q`,`numerator`

always returns`q`and`denominator`

always return 1.

__Function:__**floor***x*__Function:__**ceiling***x*__Function:__**truncate***x*__Function:__**round***x*- [R5RS]
The argument
`x`must be a real number.`Floor`

and`ceiling`

return a minimum integer that is greater than`x`and a maximim integer that is less than`x`, respectively.`Truncate`returns an integer that truncates`x`towards zero.`Round`returns an integer that is closest to`x`. If fractional part of`x`is exactly 0.5,`round`returns the closest even integer.

__Function:__**clamp***x &optional min max*- Returns

If`min`if`x``<`

`min``x`if`min``<=`

`x``<=`

`max``max`if`max``<`

`x``min`or`max`is omitted or`#f`

, it is regarded as`-infinity`or`+infinity`, respectively. Returns an exact integer only if all the given numbers are exact integers.(clamp 3.1 0.0 1.0) => 1.0 (clamp 0.5 0.0 1.0) => 0.5 (clamp -0.3 0.0 1.0) => 0.0 (clamp -5 0) => 0 (clamp 3724 #f 256) => 256

__Function:__**exp***z*__Function:__**log***z*__Function:__**sin***z*__Function:__**cos***z*__Function:__**tan***z*__Function:__**asin***z*__Function:__**acos***z*__Function:__**atan***z*- [R5RS] Transcedental functions. Work for complex numbers as well.

__Function:__**atan***x y*- [R5RS]
For real numbers
`x`and`y`, returns`atan(`

.`y`/`x`)

__Function:__**sinh***z*__Function:__**cosh***z*__Function:__**tanh***z*__Function:__**asinh***z*__Function:__**acosh***z*__Function:__**atanh***z*- Hyperbolic trigonometric functions. Work for complex numbers as well.

__Function:__**sqrt***z*- [R5RS]
Returns a square root of a complex number
`z`. The branch cut scheme is the same as Common Lisp. For real numbers, it returns a positive root.

__Function:__**expt***z1 z2*- [R5RS]
Returns
`z1`^`z2`(`z1`powered by`z2`), where`z1`and`z2`are complex numbers.

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

This document was generated by