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:") |
---|
13 | (ul |
---|
14 | (li "* access to ISO C math functions in " (code "<math.h>") " " |
---|
15 | "that are not defined by Chicken.") |
---|
16 | (li "* " (code "<float.h>") " constants, common derived constants, and " |
---|
17 | "limits for Chicken numeric types.") |
---|
18 | (li "* R6RS arithmetic functions.") ) ) |
---|
19 | |
---|
20 | (author "John Cowan and Kon Lovett") |
---|
21 | |
---|
22 | (usage) |
---|
23 | (download "mathh.egg") |
---|
24 | |
---|
25 | (documentation |
---|
26 | |
---|
27 | (subsection "Floating-point Functions" |
---|
28 | |
---|
29 | (p "The following procedures are provided, with their usual meaning.") |
---|
30 | |
---|
31 | (p "Windows does not provide native implementations of log1p, lgamma, " |
---|
32 | "tgamma. However log1p is approximated.") |
---|
33 | |
---|
34 | (p "The Bessel functions are prefixed by 'bessel-' to distinguish " |
---|
35 | "the names from common variables.") |
---|
36 | |
---|
37 | (procedure "(bessel-j0 N)") |
---|
38 | (procedure "(bessel-j1 N)") |
---|
39 | (procedure "(bessel-jn O N)") |
---|
40 | (procedure "(bessel-y0 N)") |
---|
41 | (procedure "(bessel-y1 N)") |
---|
42 | (procedure "(bessel-yn O N)") |
---|
43 | |
---|
44 | (procedure "(cosh N)") |
---|
45 | (procedure "(sinh N)") |
---|
46 | (procedure "(tanh N)") |
---|
47 | (procedure "(hypot N1 N2)") |
---|
48 | |
---|
49 | (procedure "(gamma N)") |
---|
50 | (procedure "(lgamma N)") |
---|
51 | |
---|
52 | (procedure "(log10 N)") |
---|
53 | (procedure "(log2 N)") |
---|
54 | (procedure "(log1p N)") |
---|
55 | |
---|
56 | (procedure "(make-log/base BASE)" |
---|
57 | (p "Returns a procedure of one argument, the logarithm " |
---|
58 | "function for " (tt "BASE") ".")) |
---|
59 | |
---|
60 | (procedure "(ldexp N)") |
---|
61 | (procedure "(scalbn N)") |
---|
62 | |
---|
63 | (procedure "(fpmod N M)" |
---|
64 | (p "Returns the modulus of " (tt "N") " for " (tt "M") ".") ) |
---|
65 | |
---|
66 | (procedure "(modf N)" |
---|
67 | (p "Returns two values, the integral and fractional part of " |
---|
68 | (tt "N") ".") ) |
---|
69 | |
---|
70 | (procedure "(frexp N)" |
---|
71 | (p "Returns two values, the fraction and the exponent part of " |
---|
72 | (tt "N") ".") ) |
---|
73 | ) |
---|
74 | |
---|
75 | (subsection "Float Classification" |
---|
76 | |
---|
77 | (usage "(require-extension matth-fpclass)") |
---|
78 | |
---|
79 | (procedure "(fpclassify N)" |
---|
80 | (p "Returns a symbol denoting the kind of floating-point number.") |
---|
81 | (symbol-table "Float Class" |
---|
82 | (describe infinite "") |
---|
83 | (describe nan "") |
---|
84 | (describe normal "") |
---|
85 | (describe subnormal "") |
---|
86 | (describe zero "") |
---|
87 | (describe unclassified "")) ) |
---|
88 | |
---|
89 | (procedure "(fpclass N)" |
---|
90 | (p "Returns a symbol denoting the kind of floating-point number.") |
---|
91 | (symbol-table "Float Class" |
---|
92 | (describe positive-infinite "") |
---|
93 | (describe negative-infinite "") |
---|
94 | (describe quiet-nan "") |
---|
95 | (describe signaling-nan "") |
---|
96 | (describe positive-normal "") |
---|
97 | (describe negative-normal "") |
---|
98 | (describe positive-subnormal "") |
---|
99 | (describe negative-subnormal "") |
---|
100 | (describe positive-zero "") |
---|
101 | (describe negative-zero "") |
---|
102 | (describe unclassified "")) ) |
---|
103 | ) |
---|
104 | |
---|
105 | (subsection "Integer Constants" |
---|
106 | |
---|
107 | (usage "(require-extension matth-int)") |
---|
108 | |
---|
109 | (symbol-table |
---|
110 | (describe most-positive-fixnum "Largest positive fixnum") |
---|
111 | (describe most-negative-fixnum "Smallest negative fixnum") |
---|
112 | (describe fixnum-precision "Number of bits in fixnum") |
---|
113 | (describe machine-word-bits "Number of bits in machine word - C_word") |
---|
114 | (describe maximum-machine-word "Largest machine word value - C_uword") |
---|
115 | (describe most-negative-machine-word "Smallest negative machine word value - C_word") |
---|
116 | (describe most-positive-machine-word "Largest positive machine word value - C_word") |
---|
117 | (describe unsigned-integer32-size "Sizeof uint32_t") |
---|
118 | (describe maximum-unsigned-integer32 "Largest value for uint32_t") |
---|
119 | (describe unsigned-char-size "Sizeof the C type") |
---|
120 | (describe unsigned-short-size "Sizeof the C type") |
---|
121 | (describe unsigned-int-size "Sizeof the C type") |
---|
122 | (describe unsigned-long-size "Sizeof the C type") |
---|
123 | (describe unsigned-long-long-size "Sizeof the C type, 0 when unsupported") |
---|
124 | (describe char-size "Sizeof the C type") |
---|
125 | (describe short-size "Sizeof the C type") |
---|
126 | (describe int-size "Sizeof the C type") |
---|
127 | (describe long-size "Sizeof the C type") |
---|
128 | (describe long-long-size "Sizeof the C type, 0 when unsupported") ) |
---|
129 | ) |
---|
130 | |
---|
131 | (subsection "Floating-point Constants" |
---|
132 | |
---|
133 | (usage "(require-extension matth-float)") |
---|
134 | |
---|
135 | (symbol-table |
---|
136 | (describe float-radix "Representation base of floating point number") |
---|
137 | (describe maximum-float "Largest floating point number") |
---|
138 | (describe minimum-float "Smallest floating point number") |
---|
139 | (describe float-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number") |
---|
140 | (describe float-precision "Number of digits in mantissa base radix of floating point number") |
---|
141 | (describe float-decimal-precision "Number of digits in mantissa base 10 of floating point number") |
---|
142 | (describe float-maximum-exponent "Largest exponent in base radix of floating point number") |
---|
143 | (describe float-minimum-exponent "Smallest exponent in base radix of floating point number") |
---|
144 | (describe float-maximum-decimal-exponent "Largest exponent in base 10 of floating point number") |
---|
145 | (describe float-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number") |
---|
146 | (describe maximum-double "Largest floating point number") |
---|
147 | (describe minimum-double "Smallest floating point number") |
---|
148 | (describe double-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number") |
---|
149 | (describe double-precision "Number of digits in mantissa base radix of floating point number") |
---|
150 | (describe double-decimal-precision "Number of digits in mantissa base 10 of floating point number") |
---|
151 | (describe double-maximum-exponent "Largest exponent in base radix of floating point number") |
---|
152 | (describe double-minimum-exponent "Smallest exponent in base radix of floating point number") |
---|
153 | (describe double-maximum-decimal-exponent "Largest exponent in base 10 of floating point number") |
---|
154 | (describe double-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number") |
---|
155 | (describe maximum-long-double "Largest floating point number") |
---|
156 | (describe minimum-long-double "Smallest floating point number") |
---|
157 | (describe long-double-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number") |
---|
158 | (describe long-double-precision "Number of digits in mantissa base radix of floating point number") |
---|
159 | (describe long-double-decimal-precision "Number of digits in mantissa base 10 of floating point number") |
---|
160 | (describe long-double-maximum-exponent "Largest exponent in base radix of floating point number") |
---|
161 | (describe long-double-minimum-exponent "Smallest exponent in base radix of floating point number") |
---|
162 | (describe long-double-maximum-decimal-exponent "Largest exponent in base 10 of floating point number") |
---|
163 | (describe long-double-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number") |
---|
164 | (describe long-double-radix "Representation base of floating point number") |
---|
165 | (describe maximum-flonum "Largest floating point number") |
---|
166 | (describe minimum-flonum "Smallest floating point number") |
---|
167 | (describe flonum-epsilon "The difference between 1.0 and the least value > 1.0 of a floating point number") |
---|
168 | (describe flonum-precision "Number of digits in mantissa base radix of floating point number") |
---|
169 | (describe flonum-decimal-precision "Number of digits in mantissa base 10 of floating point number") |
---|
170 | (describe flonum-maximum-exponent "Largest exponent in base radix of floating point number") |
---|
171 | (describe flonum-minimum-exponent "Smallest exponent in base radix of floating point number") |
---|
172 | (describe flonum-maximum-decimal-exponent "Largest exponent in base 10 of floating point number") |
---|
173 | (describe flonum-minimum-decimal-exponent "Smallest exponent in base 10 of floating point number") ) |
---|
174 | ) |
---|
175 | |
---|
176 | (subsection "Math Constants" |
---|
177 | |
---|
178 | (usage "(include \"mathh-constants\")") |
---|
179 | |
---|
180 | (p "Common constants, using 'define-constant'. As such they must " |
---|
181 | "be textually included.") |
---|
182 | |
---|
183 | (symbol-table |
---|
184 | (describe E "e") |
---|
185 | (describe 1/E "1/e") |
---|
186 | (describe E^2 "e^2") |
---|
187 | (describe E^PI/4 "e^(pi/4)") |
---|
188 | (describe LOG2E "log2(e)") |
---|
189 | (describe LOG10E "log10(e)") |
---|
190 | (describe LN2 "log(2)") |
---|
191 | (describe LN3 "ln(3)") |
---|
192 | (describe LNPI "ln(pi)") |
---|
193 | (describe LN10 "log(10)") |
---|
194 | (describe 1/LN2 "1/ln(2)") |
---|
195 | (describe 1/LN10 "1/ln(10)") |
---|
196 | (describe PI "pi") |
---|
197 | (describe PI/2 "pi/2") |
---|
198 | (describe PI/4 "pi/4") |
---|
199 | (describe 1/PI "1/pi") |
---|
200 | (describe 2/PI "2/pi") |
---|
201 | (describe 2/SQRTPI "2/sqrt(pi)") |
---|
202 | (describe SQRTPI "sqrt(pi)") |
---|
203 | (describe PI^2 "pi^2") |
---|
204 | (describe DEGREE "pi/180") |
---|
205 | (describe SQRT2 "sqrt(2)") |
---|
206 | (describe 1/SQRT2 "1/sqrt(2)") |
---|
207 | (describe SQRT3 "sqrt(3)") |
---|
208 | (describe SQRT5 "sqrt(5)") |
---|
209 | (describe SQRT10 "sqrt(10)") |
---|
210 | (describe CUBERT2 "cubert(2)") |
---|
211 | (describe CUBERT3 "cubert(3)") |
---|
212 | (describe 4THRT2 "fourthrt(2)") |
---|
213 | (describe GAMMA1/2 "gamma(1/2)") |
---|
214 | (describe GAMMA1/3 "gamma(1/3)") |
---|
215 | (describe GAMMA2/3 "gamma(2/3)") |
---|
216 | (describe PHI "phi") |
---|
217 | (describe LNPHI "ln(phi)") |
---|
218 | (describe 1/LNPHI "1/ln(phi)") |
---|
219 | (describe EULER "euler") |
---|
220 | (describe E^EULER "e^euler") |
---|
221 | (describe SIN1 "sin(1)") |
---|
222 | (describe COS1 "cos(1)") |
---|
223 | (describe ZETA3 "theta(3)") ) |
---|
224 | ) |
---|
225 | |
---|
226 | (subsection "Fixnum Procedures" |
---|
227 | |
---|
228 | (usage "(require-extension fixnum-extras)") |
---|
229 | |
---|
230 | (p "R6RS fixnum functions. The \"*\" prefixed functions are variable arity " |
---|
231 | "versions of the built-in Chicken Scheme functions. This naming convention " |
---|
232 | "violates R6RS.") |
---|
233 | |
---|
234 | (procedure "(fixnum->string FX [RADIX])" |
---|
235 | (p "") ) |
---|
236 | |
---|
237 | (procedure "(fixnum-width)" |
---|
238 | (p "") ) |
---|
239 | |
---|
240 | (procedure "(least-fixnum)" |
---|
241 | (p "") ) |
---|
242 | |
---|
243 | (procedure "(greatest-fixnum)" |
---|
244 | (p "") ) |
---|
245 | |
---|
246 | (procedure "(fx=? FX ...)" |
---|
247 | (p "") ) |
---|
248 | |
---|
249 | (procedure "(fx<? FX ...)" |
---|
250 | (p "") ) |
---|
251 | |
---|
252 | (procedure "(fx>? FX ...)" |
---|
253 | (p "") ) |
---|
254 | |
---|
255 | (procedure "(fx<=? FX ...)" |
---|
256 | (p "") ) |
---|
257 | |
---|
258 | (procedure "(fx>=? FX ...)" |
---|
259 | (p "") ) |
---|
260 | |
---|
261 | (procedure "(fxcompare FX1 FX2)" |
---|
262 | (p "") ) |
---|
263 | |
---|
264 | (procedure "(fxzero? FX)" |
---|
265 | (p "") ) |
---|
266 | |
---|
267 | (procedure "(fxpositive? FX)" |
---|
268 | (p "") ) |
---|
269 | |
---|
270 | (procedure "(fxnegative? FX)" |
---|
271 | (p "") ) |
---|
272 | |
---|
273 | (procedure "(fxodd? FX)" |
---|
274 | (p "") ) |
---|
275 | |
---|
276 | (procedure "(fxeven? FX)" |
---|
277 | (p "") ) |
---|
278 | |
---|
279 | (procedure "(*fxmax FX ...)" |
---|
280 | (p "") ) |
---|
281 | |
---|
282 | (procedure "(*fxmin FX ...)" |
---|
283 | (p "") ) |
---|
284 | |
---|
285 | (procedure "(fxmax-and-minFX ...)" |
---|
286 | (p "") ) |
---|
287 | |
---|
288 | (procedure "(fxmodulo FX-N FX-D)" |
---|
289 | (p "") ) |
---|
290 | |
---|
291 | (procedure "(fxpow2log2 FX)" |
---|
292 | (p "") ) |
---|
293 | |
---|
294 | (procedure "(fxdiv FX-N FX-D)" |
---|
295 | (p "") ) |
---|
296 | |
---|
297 | (procedure "(fxdiv-and-mod FX-N FX-D)" |
---|
298 | (p "") ) |
---|
299 | |
---|
300 | (procedure "(fxdiv0 FX-N FX-D)" |
---|
301 | (p "") ) |
---|
302 | |
---|
303 | (procedure "(fxmod0 FX-N FX-D)" |
---|
304 | (p "") ) |
---|
305 | |
---|
306 | (procedure "(fxdiv0-and-mod0 FX-N FX-D)" |
---|
307 | (p "") ) |
---|
308 | |
---|
309 | (procedure "(fx*/carry FX1 FX2 FX3)" |
---|
310 | (p "") ) |
---|
311 | |
---|
312 | (procedure "(fx+/carry FX1 FX2 FX3)" |
---|
313 | (p "") ) |
---|
314 | |
---|
315 | (procedure "(fx-/carry FX1 FX2 FX3)" |
---|
316 | (p "") ) |
---|
317 | |
---|
318 | (procedure "(fxadd1 FX)" |
---|
319 | (p "") ) |
---|
320 | |
---|
321 | (procedure "(fxsub1 FX)" |
---|
322 | (p "") ) |
---|
323 | |
---|
324 | (procedure "(fxquotient FX-N FX-D)" |
---|
325 | (p "") ) |
---|
326 | |
---|
327 | (procedure "(fxremainder FX-N FX-D)" |
---|
328 | (p "") ) |
---|
329 | |
---|
330 | (procedure "(fxarithmetic-shift FX DIRECTIONAL-AMOUNT)" |
---|
331 | (p "") ) |
---|
332 | |
---|
333 | (procedure "(fxarithmetic-shift-left FX AMOUNT)" |
---|
334 | (p "") ) |
---|
335 | |
---|
336 | (procedure "(fxarithmetic-shift-right FX AMOUNT)" |
---|
337 | (p "") ) |
---|
338 | |
---|
339 | (procedure "(*fx- FX [FX2])" |
---|
340 | (p "") ) |
---|
341 | |
---|
342 | (procedure "(*fxand FX ...)" |
---|
343 | (p "") ) |
---|
344 | |
---|
345 | (procedure "(*fxior FX ...)" |
---|
346 | (p "") ) |
---|
347 | |
---|
348 | (procedure "(*fxxor FX ...)" |
---|
349 | (p "") ) |
---|
350 | |
---|
351 | (procedure "(fxif MASK TRUE FALSE)" |
---|
352 | (p "") ) |
---|
353 | |
---|
354 | (procedure "(fxbit-count FX)" |
---|
355 | (p "") ) |
---|
356 | |
---|
357 | (procedure "(fxlength FX)" |
---|
358 | (p "") ) |
---|
359 | |
---|
360 | (procedure "(fxfirst-bit-set FX)" |
---|
361 | (p "") ) |
---|
362 | |
---|
363 | (procedure "(fxlast-bit-set FX)" |
---|
364 | (p "") ) |
---|
365 | |
---|
366 | (procedure "(fxbit-set? FX INDEX)" |
---|
367 | (p "") ) |
---|
368 | |
---|
369 | (procedure "(fxcopy-bit FX INDEX BIT)" |
---|
370 | (p "") ) |
---|
371 | |
---|
372 | (procedure "(fxbit-field FX START END)" |
---|
373 | (p "") ) |
---|
374 | |
---|
375 | (procedure "(fxcopy-bit-field FX-TO START END FX-FROM)" |
---|
376 | (p "") ) |
---|
377 | |
---|
378 | (procedure "(fxrotate-bit-field FX START END COUNT)" |
---|
379 | (p "") ) |
---|
380 | |
---|
381 | (procedure "(fxreverse-bit-field FX START END)" |
---|
382 | (p "") ) |
---|
383 | ) |
---|
384 | |
---|
385 | (subsection "Flonum Procedures" |
---|
386 | |
---|
387 | (usage "(require-extension flonum-extras)") |
---|
388 | |
---|
389 | (p "R6RS flonum functions.") |
---|
390 | |
---|
391 | (procedure "(real->flonum VALUE)" |
---|
392 | (p "") ) |
---|
393 | |
---|
394 | (procedure "(fixnum->flonum VALUE)" |
---|
395 | (p "") ) |
---|
396 | |
---|
397 | (procedure "(fl=? FL ...)" |
---|
398 | (p "") ) |
---|
399 | |
---|
400 | (procedure "(fl<? FL ...)" |
---|
401 | (p "") ) |
---|
402 | |
---|
403 | (procedure "(fl>? FL ...)" |
---|
404 | (p "") ) |
---|
405 | |
---|
406 | (procedure "(fl<=? FL ...)" |
---|
407 | (p "") ) |
---|
408 | |
---|
409 | (procedure "(fl>=? FL ...)" |
---|
410 | (p "") ) |
---|
411 | |
---|
412 | (procedure "(flcompare FL1 FL2)" |
---|
413 | (p "") ) |
---|
414 | |
---|
415 | (procedure "(flinteger? FL)" |
---|
416 | (p "") ) |
---|
417 | |
---|
418 | (procedure "(flzero? FL)" |
---|
419 | (p "") ) |
---|
420 | |
---|
421 | (procedure "(flpositive? FL)" |
---|
422 | (p "") ) |
---|
423 | |
---|
424 | (procedure "(flnegative? FL)" |
---|
425 | (p "") ) |
---|
426 | |
---|
427 | (procedure "(flodd? FL)" |
---|
428 | (p "") ) |
---|
429 | |
---|
430 | (procedure "(fleven? FL)" |
---|
431 | (p "") ) |
---|
432 | |
---|
433 | (procedure "(flfinite? FL)" |
---|
434 | (p "") ) |
---|
435 | |
---|
436 | (procedure "(flinfinite? FL)" |
---|
437 | (p "") ) |
---|
438 | |
---|
439 | (procedure "(flnan? FL)" |
---|
440 | (p "") ) |
---|
441 | |
---|
442 | (procedure "(fl+ FL ...)" |
---|
443 | (p "") ) |
---|
444 | |
---|
445 | (procedure "(fl* FL ...)" |
---|
446 | (p "") ) |
---|
447 | |
---|
448 | (procedure "(fl- FL ...)" |
---|
449 | (p "") ) |
---|
450 | |
---|
451 | (procedure "(fl/ FL ...)" |
---|
452 | (p "") ) |
---|
453 | |
---|
454 | (procedure "(flmax FL ...)" |
---|
455 | (p "") ) |
---|
456 | |
---|
457 | (procedure "(flmin FL ...)" |
---|
458 | (p "") ) |
---|
459 | |
---|
460 | (procedure "(flmax-and-min FL ...)" |
---|
461 | (p "") ) |
---|
462 | |
---|
463 | (procedure "(flabs FL)" |
---|
464 | (p "") ) |
---|
465 | |
---|
466 | (procedure "(flfraction FL)" |
---|
467 | (p "") ) |
---|
468 | |
---|
469 | (procedure "(fltruncate FL)" |
---|
470 | (p "") ) |
---|
471 | |
---|
472 | (procedure "(flfloor FL)" |
---|
473 | (p "") ) |
---|
474 | |
---|
475 | (procedure "(flceiling FL)" |
---|
476 | (p "") ) |
---|
477 | |
---|
478 | (procedure "(flround FL)" |
---|
479 | (p "") ) |
---|
480 | |
---|
481 | (procedure "(fldiv FL-N FL-D)" |
---|
482 | (p "") ) |
---|
483 | |
---|
484 | (procedure "(flmod FL-N FL-D)" |
---|
485 | (p "") ) |
---|
486 | |
---|
487 | (procedure "(fldiv-and-mod FL-N FL-D)" |
---|
488 | (p "") ) |
---|
489 | |
---|
490 | (procedure "(fldiv0 FL-N FL-D)" |
---|
491 | (p "") ) |
---|
492 | |
---|
493 | (procedure "(flmod0 FL-N FL-D)" |
---|
494 | (p "") ) |
---|
495 | |
---|
496 | (procedure "(fldiv0-and-mod0 FL-N FL-D)" |
---|
497 | (p "") ) |
---|
498 | |
---|
499 | (procedure "(flexp FL)" |
---|
500 | (p "") ) |
---|
501 | |
---|
502 | (procedure "(fllog FL [BASE])" |
---|
503 | (p "") ) |
---|
504 | |
---|
505 | (procedure "(flsin FL)" |
---|
506 | (p "") ) |
---|
507 | |
---|
508 | (procedure "(flcos FL)" |
---|
509 | (p "") ) |
---|
510 | |
---|
511 | (procedure "(fltan FL)" |
---|
512 | (p "") ) |
---|
513 | |
---|
514 | (procedure "(flasin FL)" |
---|
515 | (p "") ) |
---|
516 | |
---|
517 | (procedure "(flacos FL)" |
---|
518 | (p "") ) |
---|
519 | |
---|
520 | (procedure "(flatan FL [FL2])" |
---|
521 | (p "") ) |
---|
522 | |
---|
523 | (procedure "(flsqrt FL)" |
---|
524 | (p "") ) |
---|
525 | |
---|
526 | (procedure "(flexpt FL EXP)" |
---|
527 | (p "") ) |
---|
528 | |
---|
529 | (procedure "(flnumerator FL)" |
---|
530 | (p "") ) |
---|
531 | |
---|
532 | (procedure "(fldenominator FL)" |
---|
533 | (p "") ) |
---|
534 | ) |
---|
535 | |
---|
536 | (subsection "Bitwise Procedures" |
---|
537 | |
---|
538 | (usage "(require-extension bitwise-extras)") |
---|
539 | |
---|
540 | (p "R6RS bitwise functions.") |
---|
541 | |
---|
542 | (p "Unchecked variants of the following procedures are supplied, named " |
---|
543 | "as the checked version but with a \"%\" prefix.") |
---|
544 | |
---|
545 | (procedure "(pow2log2 VALUE)" |
---|
546 | (p "Returns " (code "2 ** log2 (" (tt "VALUE") ")") ".") ) |
---|
547 | |
---|
548 | (procedure "(boolean->bit OBJECT)" |
---|
549 | (p "Returns " (code "1") " for truth values and " (code "0") " for " |
---|
550 | "false or zero.") ) |
---|
551 | |
---|
552 | (procedure "(bitwise-if MASK TRUE FALSE)" |
---|
553 | (p "Merge under mask.") ) |
---|
554 | |
---|
555 | (procedure "(bitwise-if-not MASK TRUE FALSE)" |
---|
556 | (p "Merge under not mask.") ) |
---|
557 | |
---|
558 | (procedure "(bitwise-test? VALUE1 VALUE2)" |
---|
559 | (p "Any bits set in both " (tt "VALUE1") " and " (tt "VALUE2") "?") ) |
---|
560 | |
---|
561 | (procedure "(bitwise-bit-count VALUE)" |
---|
562 | (p "Count of set bits.") ) |
---|
563 | |
---|
564 | (procedure "(bitwise-length VALUE)" |
---|
565 | (p "Minimum number of bits to represent.") ) |
---|
566 | |
---|
567 | (procedure "(bitwise-first-bit-set VALUE)" |
---|
568 | (p "Least significant bit set.") ) |
---|
569 | |
---|
570 | (procedure "(bitwise-last-bit-set VALUE)" |
---|
571 | (p "Most significant bit set.") ) |
---|
572 | |
---|
573 | (procedure "(bitwise-bit-set? VALUE INDEX)" |
---|
574 | (p "Specific bit set?") ) |
---|
575 | |
---|
576 | (procedure "(bitwise-copy-bit TO START BIT)" |
---|
577 | (p "Set bit.") ) |
---|
578 | |
---|
579 | (procedure "(bitwise-bit-field VALUE START END)" |
---|
580 | (p "Get bits.") ) |
---|
581 | |
---|
582 | (procedure "(bitwise-copy-bit-field TO START END FROM)" |
---|
583 | (p "Set bits.") ) |
---|
584 | |
---|
585 | (procedure "(bitwise-rotate-bit-field VALUE START END COUNT)" |
---|
586 | (p "Rotate bits.") ) |
---|
587 | |
---|
588 | (procedure "(bitwise-reverse VALUE COUNT)" |
---|
589 | (p "Reverse low-order bits.") ) |
---|
590 | |
---|
591 | (procedure "(bitwise-reverse-bit-field VALUE START END)" |
---|
592 | (p "Reverse bits.") ) |
---|
593 | |
---|
594 | (procedure "(bitwise-list->integer LIST)" |
---|
595 | (p "Converts list of boolean, least-significant to most-significant, to integer.") ) |
---|
596 | |
---|
597 | (procedure "(bitwise-integer->list VALUE [LENGTH])" |
---|
598 | (p "Converts integer to list of boolean, least-significant to most-significant.") ) |
---|
599 | |
---|
600 | (procedure "(bitwise-arithmetic-shift VALUE DIRECTIONAL-AMOUNT)" |
---|
601 | (p (code "(arithmetic-shift VALUE DIRECTIONAL-AMOUNT)")) ) |
---|
602 | |
---|
603 | (procedure "(bitwise-arithmetic-shift-left VALUE AMOUNT)" |
---|
604 | (p (code "(arithmetic-shift VALUE AMOUNT)")) ) |
---|
605 | |
---|
606 | (procedure "(bitwise-arithmetic-shift-right VALUE AMOUNT)" |
---|
607 | (p (code "(arithmetic-shift VALUE (- AMOUNT))")) ) |
---|
608 | ) |
---|
609 | ) |
---|
610 | |
---|
611 | (history |
---|
612 | (version "1.11" "Added argument checking to fix & flonum functions. [Kon Lovett]") |
---|
613 | (version "1.10" "Cygwin compile fix. Added \"fixnum/flonum/bitwise-extras\". Removed \"count-set-bits\" & \"count-unset-bits\". [Kon Lovett]") |
---|
614 | (version "1.903" "Added C int & float types. [Kon Lovett]") |
---|
615 | (version "1.9.2" "Added log1p (approx.) for Windows, scalbn. Native log2 for linux/macosx/bsd. [Kon Lovett]") |
---|
616 | (version "1.9.1" "Added integer-log-base2, count-set-bits, count-unset-bits [Kon Lovett]") |
---|
617 | (version "1.9" "Changed conditional compilation [Kon Lovett]") |
---|
618 | (version "1.8" "fixes in setup script and .meta file") |
---|
619 | (version "1.7" "installs mathh-constants.scm in include path [felix]") |
---|
620 | (version "1.6" "make-log/base [Kon Lovett]") |
---|
621 | (version "1.5" "fpclassify, fpclass, fxlog2 [Kon Lovett]") |
---|
622 | (version "1.4" "Added some limits [Kon Lovett]") |
---|
623 | (version "1.3" "Removed fpclassify (for now), tgamma -> gamma [Kon Lovett]") |
---|
624 | (version "1.2" "Added missing setup-header [felix]") |
---|
625 | (version "1.1" "More math.h functions & constants [Kon Lovett]") |
---|
626 | (version "1.0" "Initial release")) |
---|
627 | |
---|
628 | (section "License" (pre ,license)) |
---|
629 | ) ) ) |
---|
630 | |
---|
631 | (eggdoc->html doc) |
---|
632 | |
---|