source: project/wiki/eggref/4/number-limits @ 13603

Last change on this file since 13603 was 13603, checked in by Kon Lovett, 12 years ago

Save.

File size: 4.5 KB
Line 
1[[tags: egg]]
2
3== number-limits
4
5[[toc:]]
6
7
8== Documentation
9
10Limits information for C number types.
11
12Note that while this egg is named ''number-limits'' the actual extension is
13''int-limits'' and ''float-limits''.
14
15
16=== Integer Limits
17
18; machine-word-bits : Number of bits in machine word - C_word
19; maximum-unsigned-machine-word : Largest machine word value - C_uword
20; most-negative-machine-word : Smallest negative machine word value - C_word
21; most-positive-machine-word : Largest positive machine word value - C_word
22
23; unsigned-integer32-size : Sizeof uint32_t
24; maximum-unsigned-integer32 : Largest uint32_t value
25; most-negative-integer32 : Smallest negative int32_t value
26; most-positive-integer32 : Largest negative int32_t value
27
28; unsigned-integer64-size : Sizeof uint64_t
29; maximum-unsigned-integer64 : Largest uint64_t value
30; most-negative-integer64 : Smallest negative int64_t value
31; most-positive-integer64 : Largest negative int64_t value
32
33; char-size : Sizeof the C type
34; unsigned-char-size : Sizeof the C type
35
36; short-size : Sizeof the C type
37; unsigned-short-size : Sizeof the C type
38
39; int-size : Sizeof the C type
40; unsigned-int-size : Sizeof the C type
41
42; long-size : Sizeof the C type
43; unsigned-long-size : Sizeof the C type
44
45; long-long-size : Sizeof the C type, -1 when unsupported
46; unsigned-long-long-size : Sizeof the C type, -1 when unsupported
47
48
49=== Float Limits
50
51; float-radix : Representation base of floating point number
52
53; maximum-float : Largest floating point number
54; minimum-float : Smallest floating point number
55; float-epsilon : The difference between 1.0 and the least value > 1.0 of a floating point number
56; float-precision : Number of digits in mantissa base radix of floating point number
57; float-decimal-precision : Number of digits in mantissa base 10 of floating point number
58; float-maximum-exponent : Largest exponent in base radix of floating point number
59; float-minimum-exponent : Smallest exponent in base radix of floating point number
60; float-maximum-decimal-exponent : Largest exponent in base 10 of floating point number
61; float-minimum-decimal-exponent : Smallest exponent in base 10 of floating point number
62
63; maximum-double : Largest floating point number
64; minimum-double : Smallest floating point number
65; double-epsilon : The difference between 1.0 and the least value > 1.0 of a floating point number
66; double-precision : Number of digits in mantissa base radix of floating point number
67; double-decimal-precision : Number of digits in mantissa base 10 of floating point number
68; double-maximum-exponent : Largest exponent in base radix of floating point number
69; double-minimum-exponent : Smallest exponent in base radix of floating point number
70; double-maximum-decimal-exponent : Largest exponent in base 10 of floating point number
71; double-minimum-decimal-exponent : Smallest exponent in base 10 of floating point number
72
73No {{long-double}} information since {{long double}} is not a supported foreign
74return type.
75
76
77== Usage
78
79=== int-limits
80
81<enscript language=scheme>
82(require-library int-limits)
83...
84(import int-limits)
85</enscript>
86
87or
88
89<enscript language=scheme>
90(require-extension int-limits)
91</enscript>
92
93=== float-limits
94
95<enscript language=scheme>
96(require-library float-limits)
97...
98(import float-limits)
99</enscript>
100
101or
102
103<enscript language=scheme>
104(require-extension float-limits)
105</enscript>
106
107
108== Examples
109
110
111== Notes
112
113
114== Requirements
115
116
117== Bugs and Limitations
118
119
120== Author
121
122[[kon lovett]]
123
124
125== Version history
126
127; 2.0.0 : Chicken 4 release. Renamed extension files.
128
129
130== License
131
132Copyright (C) 2009 Kon Lovett.  All rights reserved.
133
134Permission is hereby granted, free of charge, to any person obtaining a
135copy of this software and associated documentation files (the Software),
136to deal in the Software without restriction, including without limitation
137the rights to use, copy, modify, merge, publish, distribute, sublicense,
138and/or sell copies of the Software, and to permit persons to whom the
139Software is furnished to do so, subject to the following conditions:
140
141The above copyright notice and this permission notice shall be included
142in all copies or substantial portions of the Software.
143
144THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
145IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
146FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
147THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
148OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
149ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
150OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.