Provides:
<math.h>
that are not defined by Chicken.<float.h>
constants, common derived constants, and limits for Chicken numeric types.The following procedures are provided, with their usual meaning.
Windows does not provide native implementations of log1p, lgamma, tgamma. However log1p is approximated.
The Bessel functions are prefixed by 'bessel-' to distinguish the names from common variables.
Returns a procedure of one argument, the logarithm function for BASE.
Returns the modulus of N for M.
Returns two values, the integral and fractional part of N.
Returns two values, the fraction and the exponent part of N.
Returns a symbol denoting the kind of floating-point number.
infinite | |
nan | |
normal | |
subnormal | |
zero | |
unclassified |
Returns a symbol denoting the kind of floating-point number.
positive-infinite | |
negative-infinite | |
quiet-nan | |
signaling-nan | |
positive-normal | |
negative-normal | |
positive-subnormal | |
negative-subnormal | |
positive-zero | |
negative-zero | |
unclassified |
most-positive-fixnum | Largest positive fixnum |
most-negative-fixnum | Smallest negative fixnum |
fixnum-precision | Number of bits in fixnum |
machine-word-bits | Number of bits in machine word - C_word |
maximum-machine-word | Largest machine word value - C_uword |
most-negative-machine-word | Smallest negative machine word value - C_word |
most-positive-machine-word | Largest positive machine word value - C_word |
unsigned-integer32-size | Sizeof uint32_t |
maximum-unsigned-integer32 | Largest value for uint32_t |
unsigned-char-size | Sizeof the C type |
unsigned-short-size | Sizeof the C type |
unsigned-int-size | Sizeof the C type |
unsigned-long-size | Sizeof the C type |
unsigned-long-long-size | Sizeof the C type, 0 when unsupported |
char-size | Sizeof the C type |
short-size | Sizeof the C type |
int-size | Sizeof the C type |
long-size | Sizeof the C type |
long-long-size | Sizeof the C type, 0 when unsupported |
float-radix | Representation base of floating point number |
maximum-float | Largest floating point number |
minimum-float | Smallest floating point number |
float-epsilon | The difference between 1.0 and the least value > 1.0 of a floating point number |
float-precision | Number of digits in mantissa base radix of floating point number |
float-decimal-precision | Number of digits in mantissa base 10 of floating point number |
float-maximum-exponent | Largest exponent in base radix of floating point number |
float-minimum-exponent | Smallest exponent in base radix of floating point number |
float-maximum-decimal-exponent | Largest exponent in base 10 of floating point number |
float-minimum-decimal-exponent | Smallest exponent in base 10 of floating point number |
maximum-double | Largest floating point number |
minimum-double | Smallest floating point number |
double-epsilon | The difference between 1.0 and the least value > 1.0 of a floating point number |
double-precision | Number of digits in mantissa base radix of floating point number |
double-decimal-precision | Number of digits in mantissa base 10 of floating point number |
double-maximum-exponent | Largest exponent in base radix of floating point number |
double-minimum-exponent | Smallest exponent in base radix of floating point number |
double-maximum-decimal-exponent | Largest exponent in base 10 of floating point number |
double-minimum-decimal-exponent | Smallest exponent in base 10 of floating point number |
maximum-long-double | Largest floating point number |
minimum-long-double | Smallest floating point number |
long-double-epsilon | The difference between 1.0 and the least value > 1.0 of a floating point number |
long-double-precision | Number of digits in mantissa base radix of floating point number |
long-double-decimal-precision | Number of digits in mantissa base 10 of floating point number |
long-double-maximum-exponent | Largest exponent in base radix of floating point number |
long-double-minimum-exponent | Smallest exponent in base radix of floating point number |
long-double-maximum-decimal-exponent | Largest exponent in base 10 of floating point number |
long-double-minimum-decimal-exponent | Smallest exponent in base 10 of floating point number |
long-double-radix | Representation base of floating point number |
maximum-flonum | Largest floating point number |
minimum-flonum | Smallest floating point number |
flonum-epsilon | The difference between 1.0 and the least value > 1.0 of a floating point number |
flonum-precision | Number of digits in mantissa base radix of floating point number |
flonum-decimal-precision | Number of digits in mantissa base 10 of floating point number |
flonum-maximum-exponent | Largest exponent in base radix of floating point number |
flonum-minimum-exponent | Smallest exponent in base radix of floating point number |
flonum-maximum-decimal-exponent | Largest exponent in base 10 of floating point number |
flonum-minimum-decimal-exponent | Smallest exponent in base 10 of floating point number |
Common constants, using 'define-constant'. As such they must be textually included.
E | e |
1/E | 1/e |
E^2 | e^2 |
E^PI/4 | e^(pi/4) |
LOG2E | log2(e) |
LOG10E | log10(e) |
LN2 | log(2) |
LN3 | ln(3) |
LNPI | ln(pi) |
LN10 | log(10) |
1/LN2 | 1/ln(2) |
1/LN10 | 1/ln(10) |
PI | pi |
PI/2 | pi/2 |
PI/4 | pi/4 |
1/PI | 1/pi |
2/PI | 2/pi |
2/SQRTPI | 2/sqrt(pi) |
SQRTPI | sqrt(pi) |
PI^2 | pi^2 |
DEGREE | pi/180 |
SQRT2 | sqrt(2) |
1/SQRT2 | 1/sqrt(2) |
SQRT3 | sqrt(3) |
SQRT5 | sqrt(5) |
SQRT10 | sqrt(10) |
CUBERT2 | cubert(2) |
CUBERT3 | cubert(3) |
4THRT2 | fourthrt(2) |
GAMMA1/2 | gamma(1/2) |
GAMMA1/3 | gamma(1/3) |
GAMMA2/3 | gamma(2/3) |
PHI | phi |
LNPHI | ln(phi) |
1/LNPHI | 1/ln(phi) |
EULER | euler |
E^EULER | e^euler |
SIN1 | sin(1) |
COS1 | cos(1) |
ZETA3 | theta(3) |
R6RS fixnum functions. The "*" prefixed functions are variable arity versions of the built-in Chicken Scheme functions. This naming convention violates R6RS.
R6RS flonum functions.
R6RS bitwise functions.
Unchecked variants of the following procedures are supplied, named as the checked version but with a "%" prefix.
Returns 2 ** log2 (VALUE)
.
Returns 1
for truth values and 0
for false or zero.
Merge under mask.
Merge under not mask.
Any bits set in both VALUE1 and VALUE2?
Count of set bits.
Minimum number of bits to represent.
Least significant bit set.
Most significant bit set.
Specific bit set?
Set bit.
Get bits.
Set bits.
Rotate bits.
Reverse low-order bits.
Reverse bits.
Converts list of boolean, least-significant to most-significant, to integer.
Converts integer to list of boolean, least-significant to most-significant.
(arithmetic-shift VALUE DIRECTIONAL-AMOUNT)
(arithmetic-shift VALUE AMOUNT)
(arithmetic-shift VALUE (- AMOUNT))
This code is in the public domain