Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
number-limits
Documentation
Limits information for C number types.
Integer Limits
- machine-word-bits
- Number of bits in machine word - C_word
- maximum-unsigned-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 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
(require-library int-limits) ... (import int-limits)
or
(require-extension int-limits)
int-limits
(require-library int-limits) ... (import int-limits)
or
(require-extension int-limits)
number-limits
Reexports the above.
(require-library number-limits) ... (import number-limits)
or
(require-extension number-limits)
Examples
Notes
Requirements
Bugs and Limitations
Author
Version history
- 2.1.0
- 64 bit values using numbers.
- 2.0.0
- Chicken 4 release. Renamed extension files.
License
Copyright (C) 20092017 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.