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