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

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

test change

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