Skip to content

Latest commit

 

History

History
717 lines (335 loc) · 15 KB

scml_base_number.md

File metadata and controls

717 lines (335 loc) · 15 KB

Module scml_base_number

Scheme base library for numbers

. __Authors:__ CSCM Contributor ([`[email protected]`](mailto:[email protected])).

Function Index

'$scml_exports'/0
'*'/1
'+'/1
'-'/1
'/'/1
'<'/1
'<='/1
'='/1

This function is a temporary place holder and is not (yet) compliant with the R7RS specification.

.
'>'/1
'>='/1
'complex?'/1
'even?'/1
'exact-integer-sqrt'/1
'exact-integer?'/1
'exact?'/1

This function is a temporary place holder and is not (yet) compliant with the R7RS specification.

.
'floor-quotient'/2
'floor-remainder'/2
'floor/'/2
'inexact?'/1
'integer?'/1
'negative?'/1
'number->string'/1
'number->string'/2
'number?'/1
'odd?'/1
'positive?'/1
'rational?'/1
'real?'/1
'string->number'/1
'string->number'/2
'truncate-quotient'/2
'truncate-remainder'/2
'truncate/'/2
'zero?'/1
abs/1
ceiling/1
denominator/1
exact/1
expt/2
floor/1
gcd/1
inexact/1
lcm/1
max/1
min/1
modulo/2
numerator/1
quotient/2
rationalize/2
remainder/2
round/1
square/1
truncate/1

Function Details

'$scml_exports'/0


'$scml_exports'() -> [{scm_symbol(), scmi_nip()}]



'*'/1


'*'(Zs::[scm_z()]) -> scm_boolean()



'+'/1


'+'(Zs::[scm_z()]) -> scm_boolean()



'-'/1


'-'(Zs::[scm_z(), ...]) -> scm_boolean()



'/'/1


'/'(Zs::[scm_z(), ...]) -> scm_boolean()



'<'/1


'<'(Xs::[scm_x(), ...]) -> scm_boolean()



'<='/1


'<='(Xs::[scm_x(), ...]) -> scm_boolean()



'='/1


'='(Zs::[scm_z(), ...]) -> scm_boolean()



This function is a temporary place holder and is not (yet) compliant with the R7RS specification.

'>'/1


'>'(Xs::[scm_x(), ...]) -> scm_boolean()



'>='/1


'>='(Xs::[scm_x(), ...]) -> scm_boolean()



'complex?'/1


'complex?'(Obj::scm_obj()) -> scm_boolean()



'even?'/1


'even?'(N::scm_n()) -> scm_boolean()



'exact-integer-sqrt'/1


'exact-integer-sqrt'(K::scm_k()) -> [scm_k(), ...]



'exact-integer?'/1


'exact-integer?'(Z::scm_z()) -> scm_boolean()



'exact?'/1


'exact?'(N::scm_z()) -> scm_boolean()



This function is a temporary place holder and is not (yet) compliant with the R7RS specification.

'floor-quotient'/2


'floor-quotient'(N1::scm_n(), N2::scm_n()) -> scm_n()



'floor-remainder'/2


'floor-remainder'(N1::scm_n(), N2::scm_n()) -> scm_n()



'floor/'/2


'floor/'(N1::scm_n(), N2::scm_n()) -> [scm_n(), ...]



'inexact?'/1


'inexact?'(Z::scm_z()) -> scm_boolean()



'integer?'/1


'integer?'(Obj::scm_obj()) -> scm_boolean()



'negative?'/1


'negative?'(X::scm_x()) -> scm_boolean()



'number->string'/1


'number->string'(Z::scm_z()) -> scm_string()



'number->string'/2


'number->string'(Z::scm_z(), Radix::2 | 8 | 10 | 16) -> scm_string()



'number?'/1


'number?'(Obj::scm_obj()) -> scm_boolean()



'odd?'/1


'odd?'(N::scm_n()) -> scm_boolean()



'positive?'/1


'positive?'(X::scm_x()) -> scm_boolean()



'rational?'/1


'rational?'(Obj::scm_obj()) -> scm_boolean()



'real?'/1


'real?'(Obj::scm_obj()) -> scm_boolean()



'string->number'/1


'string->number'(S::scm_string()) -> scm_z()



'string->number'/2


'string->number'(S::scm_string(), Radix::2 | 8 | 10 | 16) -> scm_z()



'truncate-quotient'/2


'truncate-quotient'(N1::scm_n(), N2::scm_n()) -> scm_n()



'truncate-remainder'/2


'truncate-remainder'(N1::scm_n(), N2::scm_n()) -> scm_n()



'truncate/'/2


'truncate/'(N1::scm_n(), N2::scm_n()) -> [scm_n(), ...]



'zero?'/1


'zero?'(Z::scm_z()) -> scm_boolean()



abs/1


abs(X::scm_x()) -> scm_x()



ceiling/1


ceiling(X::scm_x()) -> scm_n()



denominator/1


denominator(Q::scm_q()) -> scm_n_pos()



exact/1


exact(Z::scm_z()) -> scm_z()



expt/2


expt(Z1::scm_z(), Z2::scm_z()) -> scm_z()



floor/1


floor(X::scm_x()) -> scm_n()



gcd/1


gcd(Ns::[scm_n()]) -> scm_n()



inexact/1


inexact(Z::scm_z()) -> scm_z()



lcm/1


lcm(Ns::[scm_n()]) -> scm_n()



max/1


max(Xs::[scm_x(), ...]) -> scm_boolean()



min/1


min(Xs::[scm_x(), ...]) -> scm_boolean()



modulo/2


modulo(N1::scm_n(), N2::scm_n()) -> scm_n()



numerator/1


numerator(Q::scm_q()) -> scm_n()



quotient/2


quotient(N1::scm_n(), N2::scm_n()) -> scm_n()



rationalize/2


rationalize(X::scm_x(), Y::scm_y()) -> scm_q()



remainder/2


remainder(N1::scm_n(), N2::scm_n()) -> scm_n()



round/1


round(X::scm_x()) -> scm_n()



square/1


square(Z::scm_z()) -> scm_z()



truncate/1


truncate(X::scm_x()) -> scm_n()