chickadee » number-limits

number-limits

Documentation

Limits information for C number types.

Integer Limits

machine-word-bits
Number of bits in machine word : C_WORD_SIZE
maximum-unsigned-machine-word
Largest machine word value : C_UWORD_MAX
most-negative-machine-word
Smallest negative machine word value : C_WORD_MIN (long or int)
most-positive-machine-word
Largest positive machine word value : C_WORD_MAX (long or int)
unsigned-integer32-size
Sizeof uint32_t
maximum-unsigned-integer32
Largest uint32_t value
most-negative-integer32
Smallest negative int32_t value
most-positive-integer32
Largest negative int32_t value
unsigned-integer64-size
Sizeof uint64_t
maximum-unsigned-integer64
Largest uint64_t value
most-negative-integer64
Smallest negative int64_t value
most-positive-integer64
Largest negative int64_t value
char-size
Sizeof the C type
unsigned-char-size
Sizeof the C type
short-size
Sizeof the C type
unsigned-short-size
Sizeof the C type
int-size
Sizeof the C type
unsigned-int-size
Sizeof the C type
long-size
Sizeof the C type
unsigned-long-size
Sizeof the C type
long-long-size
Sizeof the C type, -1 when unsupported
unsigned-long-long-size
Sizeof the C type, -1 when unsupported

Float Limits

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

No long-double information since long double is not a supported foreign return type.

Usage

int-limits

(import int-limits)

float-limits

(import float-limits)

number-limits

Reexports the above.

(import number-limits)

Author

Kon Lovett

Repository

This egg is hosted on the CHICKEN Subversion repository:

https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/number-limits

If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.

Version history

3.0.4
word limits, not fixnum.
3.0.0
CHICKEN 5 release.
2.1.0
64 bit values using numbers.
2.0.0
Chicken 4 release. Renamed extension files.

License

Copyright (C) 2009 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.