source: project/release/3/fpfz/trunk/fpfz-eggdoc.scm @ 8920

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

Canon dir struct

File size: 3.3 KB
Line 
1;;;; fpfz-eggdoc.scm
2
3(use eggdoc)
4
5(define license
6"Copyright (c) 2006, Kon Lovett.  All rights reserved.
7
8Permission is hereby granted, free of charge, to any person obtaining a
9copy of this software and associated documentation files (the Software),
10to deal in the Software without restriction, including without limitation
11the rights to use, copy, modify, merge, publish, distribute, sublicense,
12and/or sell copies of the Software, and to permit persons to whom the
13Software is furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included
16in all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24OTHER DEALINGS IN THE SOFTWARE.")
25
26(define doc `(
27        (eggdoc:begin
28                (name "fpfz")
29                (description (p "Floating-point Comparison With Epsilon"))
30                (author (url "mailto:klovett@pacbell.net" "Kon Lovett"))
31
32                (usage)
33                (download "fpfz.egg")
34                (requires miscmacros)
35
36                (documentation
37
38                        (p "Routines to perform floating-point operations with an error
39                        bound. These routines are not some cure-all for floating-point
40                        anomalies, but useful anyway.")
41
42                        (subsection "Parameters"
43
44                                (parameter "(current-fpfz-epsilon [#])"
45                                        (p "Sets or returns the error bound."))
46                        )
47
48                        (subsection "Predicates"
49
50                                (p "The formula below are for exposition only; they are not the
51                                actual test.")
52
53                                (macro "(fpfz= A B [EPSILON (current-fpfz-epsilon)])"
54                                        (p "|a - b| <= E."))
55
56                                (macro "(fpfz<> A B [EPSILON (current-fpfz-epsilon)])"
57                                        (p "|a - b| > E."))
58
59                                (macro "(fpfz> A B [EPSILON (current-fpfz-epsilon)])"
60                                        (p "|a - b| > E."))
61
62                                (macro "(fpfz< A B [EPSILON (current-fpfz-epsilon)])"
63                                        (p "|a - b| < E."))
64
65                                (macro "(fpfz>= A B [EPSILON (current-fpfz-epsilon)])"
66                                        (p "|a - b| >= E."))
67
68                                (macro "(fpfz<= A B [EPSILON (current-fpfz-epsilon)])"
69                                        (p "|a - b| <= E."))
70                        )
71
72                        (subsection "Operations"
73
74                                (macro "(roundn N [ND])"
75                                        (p "Nearest number within a given precision, the number of
76                                        decimal digits in the fraction " (tt "ND") ". When precision
77                                        missing normal 'round' is performed."))
78
79                                (macro "(fpfzroundn N [ND])"
80                                        (p "Nearest number within a given precision, the number of
81                                        decimal digits in the fraction " (tt "ND") ", & epsilon. When
82                                        precision missing normal 'round' is performed."))
83
84                                (macro "(fpfzceil N)"
85                                        (p "Smallest integer number that is tolerably larger than
86                                        the given value."))
87
88                                (procedure "(fpfzfloor N)"
89                                        (p "Smallest integer number that is tolerably smaller than
90                                        the given value."))
91
92                                (macro "(fpmaxabs A B)"
93                                        (p "Mininum of the absolute value of the arguments."))
94
95                                (procedure "(calculate-fpfz-epsilon [FEPS 3.0])"
96                                        (p "Returns the system epsilon to within a factor of the real
97                                        epsilon."))
98
99                        )
100                )
101
102                (history
103                        (version "1.0" "Initial release"))
104
105                (section "License" (pre ,license))
106        )
107))
108
109(eggdoc->html doc)
Note: See TracBrowser for help on using the repository browser.