source: project/release/2/mathh/doc.scm @ 8742

Last change on this file since 8742 was 8742, checked in by felix winkelmann, 12 years ago

moved eggs partially to rrb2

File size: 11.4 KB
Line 
1;;;; doc.scm -*- Scheme -*-
2
3(use eggdoc)
4
5(define license
6"This code is in the public domain")
7
8(define doc `(
9  (eggdoc:begin
10    (name "mathh")
11    (description
12      (p "Provides access to ISO C math functions & constants in " (code
13      "<math.h>") " that are not defined by Chicken."))
14
15    (author "John Cowan")
16
17    (history
18      (version "1.903" "Added C int & float types. [Kon Lovett]")
19      (version "1.9.2" "Added log1p (approx.) for Windows, scalbn. Native log2 for linux/macosx/bsd. [Kon Lovett]")
20      (version "1.9.1" "Added integer-log-base2, count-set-bits, count-unset-bits [Kon Lovett]")
21      (version "1.9" "Changed conditional compilation [Kon Lovett]")
22      (version "1.8" "fixes in setup script and .meta file")
23      (version "1.7" "installs mathh-constants.scm in include path [felix]")
24      (version "1.6" "make-log/base [Kon Lovett]")
25      (version "1.5" "fpclassify, fpclass, fxlog2 [Kon Lovett]")
26      (version "1.4" "Added some limits [Kon Lovett]")
27      (version "1.3" "Removed fpclassify (for now), tgamma -> gamma [Kon Lovett]")
28      (version "1.2" "Added missing setup-header [felix]")
29      (version "1.1" "More math.h functions & constants [Kon Lovett]")
30      (version "1.0" "Initial release"))
31
32    (usage)
33    (download "mathh.egg")
34
35    (documentation
36
37      (subsection "Floating-point Functions"
38
39        (p "The following procedures are provided, with their usual meaning.")
40
41        (p "Windows does not provide native implementations of log1p, lgamma, "
42        "tgamma. However log1p is approximated.")
43
44        (p "The Bessel functions are prefixed by 'bessel-' to distinguish "
45        "the names from common variables.")
46
47        (procedure "(bessel-j0 N)")
48        (procedure "(bessel-j1 N)")
49        (procedure "(bessel-jn O N)")
50        (procedure "(bessel-y0 N)")
51        (procedure "(bessel-y1 N)")
52        (procedure "(bessel-yn O N)")
53
54        (procedure "(cosh N)")
55        (procedure "(sinh N)")
56        (procedure "(tanh N)")
57        (procedure "(hypot N1 N2)")
58
59        (procedure "(gamma N)")
60        (procedure "(lgamma N)")
61
62        (procedure "(log10 N)")
63        (procedure "(log2 N)")
64        (procedure "(log1p N)")
65
66        (procedure "(make-log/base BASE)"
67          (p "Returns a procedure of one argument, the logarithm "
68          "function for " (tt "BASE") "."))
69
70        (procedure "(ldexp N)")
71        (procedure "(scalbn N)")
72
73        (procedure "(fpmod N M)"
74          (p "Returns the modulus of " (tt "N") " for " (tt "M") ".") )
75
76        (procedure "(modf N)"
77          (p "Returns two values, the integral and fractional part of "
78          (tt "N") ".") )
79
80        (procedure "(frexp N)"
81          (p "Returns two values, the fraction and the exponent part of "
82          (tt "N") ".") )
83      )
84
85      (subsection "Float Classification"
86
87        (usage "(require-extension matth-fpclass)")
88
89        (procedure "(fpclassify N)"
90          (p "Returns a symbol denoting the kind of floating-point number.")
91          (symbol-table "Float Class"
92            (describe infinite "")
93            (describe nan "")
94            (describe normal "")
95            (describe subnormal "")
96            (describe zero "")
97            (describe unclassified "")) )
98
99        (procedure "(fpclass N)"
100          (p "Returns a symbol denoting the kind of floating-point number.")
101          (symbol-table "Float Class"
102            (describe positive-infinite "")
103            (describe negative-infinite "")
104            (describe quiet-nan "")
105            (describe signaling-nan "")
106            (describe positive-normal "")
107            (describe negative-normal "")
108            (describe positive-subnormal "")
109            (describe negative-subnormal "")
110            (describe positive-zero "")
111            (describe negative-zero "")
112            (describe unclassified "")) )
113      )
114
115      (subsection "Integer Procedures & Constants"
116
117        (usage "(require-extension matth-int)")
118
119        (procedure "(fxlog2 N)"
120          (p "Returns the ceiling of log2 of the " (tt "N") " fixnum."))
121
122        (procedure "(fx1bits N)"
123          (p "Returns the number of one bits in the " (tt "N") " fixnum."))
124
125        (procedure "(fx0bits N)"
126          (p "Returns the number of zero bits in the " (tt "N") " fixnum."))
127
128        (procedure "(integer-log-base2 N)"
129          (p "Returns the ceiling of log2 of the " (tt "N") " fixnum or integer flonum."))
130
131        (procedure "(count-set-bits N)"
132          (p "Returns the number of one bits in the " (tt "N") " fixnum or integer flonum."))
133
134        (procedure "(count-unset-bits N)"
135          (p "Returns the number of zero bits in the " (tt "N") " fixnum or integer flonum."))
136
137        (symbol-table
138          (describe most-positive-fixnum "Largest positive fixnum")
139          (describe most-negative-fixnum "Smallest negative fixnum")
140          (describe fixnum-precision "Number of bits in fixnum")
141          (describe machine-word-bits "Number of bits in machine word - C_word")
142          (describe maximum-machine-word "Largest machine word value - C_uword")
143          (describe most-negative-machine-word "Smallest negative machine word value - C_word")
144          (describe most-positive-machine-word "Largest positive machine word value - C_word")
145          (describe unsigned-integer32-size "Sizeof uint32_t")
146          (describe maximum-unsigned-integer32 "Largest value for uint32_t")
147          (describe unsigned-char-size "Sizeof the C type")
148          (describe unsigned-short-size "Sizeof the C type")
149          (describe unsigned-int-size "Sizeof the C type")
150          (describe unsigned-long-size "Sizeof the C type")
151          (describe unsigned-long-long-size "Sizeof the C type, 0 when unsupported")
152          (describe char-size "Sizeof the C type")
153          (describe short-size "Sizeof the C type")
154          (describe int-size "Sizeof the C type")
155          (describe long-long-size "Sizeof the C type, 0 when unsupported") )
156      )
157
158      (subsection "Floating-point Procedures & Constants"
159
160        (usage "(require-extension matth-float)")
161
162        (symbol-table
163          (describe float-radix "Representation base of floating point number")
164          (describe maximum-float "Largest floating point number")
165          (describe minimum-float "Smallest floating point number")
166          (describe float-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number")
167          (describe float-precision "Number of digits in mantissa base radix of floating point number")
168          (describe float-decimal-precision "Number of digits in mantissa base 10 of floating point number")
169          (describe float-maximum-exponent "Largest exponent in base radix of floating point number")
170          (describe float-minimum-exponent "Smallest exponent in base radix of floating point number")
171          (describe float-maximum-decimal-exponent "Largest exponent in base 10 of floating point number")
172          (describe float-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number")
173          (describe maximum-double "Largest floating point number")
174          (describe minimum-double "Smallest floating point number")
175          (describe double-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number")
176          (describe double-precision "Number of digits in mantissa base radix of floating point number")
177          (describe double-decimal-precision "Number of digits in mantissa base 10 of floating point number")
178          (describe double-maximum-exponent "Largest exponent in base radix of floating point number")
179          (describe double-minimum-exponent "Smallest exponent in base radix of floating point number")
180          (describe double-maximum-decimal-exponent "Largest exponent in base 10 of floating point number")
181          (describe double-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number")
182          (describe maximum-long-double "Largest floating point number")
183          (describe minimum-long-double "Smallest floating point number")
184          (describe long-double-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number")
185          (describe long-double-precision "Number of digits in mantissa base radix of floating point number")
186          (describe long-double-decimal-precision "Number of digits in mantissa base 10 of floating point number")
187          (describe long-double-maximum-exponent "Largest exponent in base radix of floating point number")
188          (describe long-double-minimum-exponent "Smallest exponent in base radix of floating point number")
189          (describe long-double-maximum-decimal-exponent "Largest exponent in base 10 of floating point number")
190          (describe long-double-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number")
191          (describe long-double-radix "Representation base of floating point number")
192          (describe maximum-flonum "Largest floating point number")
193          (describe minimum-flonum "Smallest floating point number")
194          (describe flonum-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number")
195          (describe flonum-precision "Number of digits in mantissa base radix of floating point number")
196          (describe flonum-decimal-precision "Number of digits in mantissa base 10 of floating point number")
197          (describe flonum-maximum-exponent "Largest exponent in base radix of floating point number")
198          (describe flonum-minimum-exponent "Smallest exponent in base radix of floating point number")
199          (describe flonum-maximum-decimal-exponent "Largest exponent in base 10 of floating point number")
200          (describe flonum-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number") )
201      )
202
203      (subsection "Constants"
204
205        (usage "(include \"mathh-constants\")")
206
207        (p "Common constants, using 'define-constant'. As such they must "
208        "be textually included.")
209
210        (symbol-table
211          (describe E "e")
212          (describe 1/E "1/e")
213          (describe E^2 "e^2")
214          (describe E^PI/4 "e^(pi/4)")
215          (describe LOG2E "log2(e)")
216          (describe LOG10E "log10(e)")
217          (describe LN2 "log(2)")
218          (describe LN3 "ln(3)")
219          (describe LNPI "ln(pi)")
220          (describe LN10 "log(10)")
221          (describe 1/LN2 "1/ln(2)")
222          (describe 1/LN10 "1/ln(10)")
223          (describe PI "pi")
224          (describe PI/2 "pi/2")
225          (describe PI/4 "pi/4")
226          (describe 1/PI "1/pi")
227          (describe 2/PI "2/pi")
228          (describe 2/SQRTPI "2/sqrt(pi)")
229          (describe SQRTPI "sqrt(pi)")
230          (describe PI^2 "pi^2")
231          (describe DEGREE "pi/180")
232          (describe SQRT2 "sqrt(2)")
233          (describe 1/SQRT2 "1/sqrt(2)")
234          (describe SQRT3 "sqrt(3)")
235          (describe SQRT5 "sqrt(5)")
236          (describe SQRT10 "sqrt(10)")
237          (describe CUBERT2 "cubert(2)")
238          (describe CUBERT3 "cubert(3)")
239          (describe 4THRT2 "fourthrt(2)")
240          (describe GAMMA1/2 "gamma(1/2)")
241          (describe GAMMA1/3 "gamma(1/3)")
242          (describe GAMMA2/3 "gamma(2/3)")
243          (describe PHI "phi")
244          (describe LNPHI "ln(phi)")
245          (describe 1/LNPHI "1/ln(phi)")
246          (describe EULER "euler")
247          (describe E^EULER "e^euler")
248          (describe SIN1 "sin(1)")
249          (describe COS1 "cos(1)")
250          (describe ZETA3 "theta(3)") )
251        )
252      )
253
254      (section "License" (pre ,license))
255    ) ) )
256
257(eggdoc->html doc)
258
Note: See TracBrowser for help on using the repository browser.