@@ -43,14 +43,11 @@ <h2 id="sec1">FPCore format</h2>
4343 mathematical expressions. FPCore looks like this:</ p >
4444
4545 < pre > (FPCore (< var > inputs ...</ var > ) < var > properties ...</ var > < var > expression</ var > )</ pre >
46- < pre > (FPCore < var > name</ var > (< var > inputs ...</ var > ) < var > properties ...</ var > < var > expression</ var > )</ pre >
4746
4847 < p >
4948 Each < var > input</ var > is a variable name, like < code > x</ code > ,
5049 used in the < var > expression</ var > . Properties are used to specify
5150 additional information about the < var > expression</ var > 's context.
52- If < var > name</ var > is specified, the function can be referenced in
53- subsequent FPCore declarations in the file.
5451 </ p >
5552
5653 < p >
@@ -63,17 +60,12 @@ <h2 id="sec1">FPCore format</h2>
6360
6461 < p >
6562 The semicolon (< kbd > ;</ kbd > ) character introduces a line comment.
66- We recommend the < code > .fpcore</ code > file extension for Herbie input files.
63+ We recommend the < code > .fpcore</ code > file extension for FPCore files.
6764 </ p >
6865
6966 < h2 > Supported functions</ h2 >
7067
71- < p >
72- Herbie supports all functions
73- from < a href ="http://pubs.opengroup.org/onlinepubs/7908799/xsh/math.h.html "> math.h</ a >
74- with floating-point-only inputs and outputs. The best supported
75- functions include:
76- </ p >
68+ < p > FPCore expressions can use any of the following functions:</ p >
7769
7870 < dl class ="function-list ">
7971 < dt > < code > +</ code > , < code > -</ code > , < code > *</ code > , < code > /</ code > , < code > fabs</ code > </ dt >
@@ -95,13 +87,12 @@ <h2>Supported functions</h2>
9587 </ dl >
9688
9789 < p > Herbie also supports the constants < code > PI</ code >
98- and < code > E</ code > . Use < code > -</ code > for both subtraction and negation.</ p >
90+ and < code > E</ code > . Use < code > -</ code > for both subtraction and
91+ negation.</ p >
9992
100- < p > Herbie links against your computer's < code > libm</ code > to
101- evaluate these functions. So, each function has the same behavior in
102- Herbie as in your code. You can instead use
103- the < a href ="#precisions "> < code > racket</ code > precision</ a > if you
104- instead want reproducible behavior.</ p >
93+ < p > However, how Herbie evaluates these functions, their cost, and
94+ what additional functions are available depends on
95+ the < a href ="platforms.rkt "> platform</ a > you select.</ p >
10596
10697 < h2 id ="conditionals "> Conditionals</ h2 >
10798
@@ -122,7 +113,7 @@ <h2 id="conditionals">Conditionals</h2>
122113 < dd > The two boolean values</ dd >
123114 </ dl >
124115
125- < p > The comparison functions support chained comparisons with more than two arguments;
116+ < p > The comparison operators support chained comparisons with more than two arguments;
126117 for example < code > (< 1 x 10)</ code > means < code > 1 < x < 10 </ code > .</ p >
127118
128119 < h2 id ="intermediates "> Intermediate variables</ h2 >
@@ -157,8 +148,9 @@ <h2 id="intermediates">Intermediate variables</h2>
157148
158149 < p > Internally, Herbie treats intermediate values only as a
159150 notational convenience, and inlines their values before improving
160- the formula's accuracy. Using intermediate variables will therefore
161- not produce a more accurate result or help Herbie run faster.</ p >
151+ the formula's accuracy. Using intermediate variables will
152+ therefore not produce a more accurate result or help Herbie run
153+ faster.</ p >
162154
163155 < h2 id ="specs "> Specifications</ h2 >
164156
@@ -175,8 +167,9 @@ <h2 id="specs">Specifications</h2>
175167 :spec (sin (/ 1 x))
176168 (+ (/ 1 x) (/ 1 (* 6 (pow x 3)))))</ pre >
177169
178- < p > Herbie will only use the < code > :spec</ code > expression to
179- evaluate error, not to search for accurate expressions.</ p >
170+ < p > Herbie will use the < code > :spec</ code > expression to evaluate
171+ error, but use body expression as a starting-point for finding
172+ more accurate expressions.</ p >
180173
181174 < h2 id ="preconditions "> Preconditions</ h2 >
182175
@@ -205,39 +198,25 @@ <h2 id="precisions">Precisions</h2>
205198 < dd > Single-precision IEEE-754 floating point</ dd >
206199 < dt > < code > binary64</ code > </ dt >
207200 < dd > Double-precision IEEE-754 floating point</ dd >
208- < dt > < code > racket</ code > </ dt >
209- < dd > Like < code > binary64</ code > , but using Racket math functions
210- rather than your computer's < code > libm</ code > .</ dd >
211201 </ dl >
212202
213- < p > By default, < code > binary64</ code > is assumed. Herbie also has
214- a < a href ="plugins.html "> plugin system</ a > to load additional
203+ < p > < a href ="platforms.html "> Platforms< a /> can also add additional
215204 precisions.</ p >
216205
217- < p > Herbie won't produce mixed-precision code unless you allow it to
218- do so, using the < code > :herbie-conversions</ code > property:</ p >
219-
220- < dl class ="function-list ">
221- < dt > < code > :herbie-conversions< br /> ([< var > prec1</ var > < var > prec2</ var > ] ...)</ code > </ dt >
222- < dd > Expressions in precision < code > prec1</ code > , can be rewriten
223- to use precision < code > prec2</ code > , and vice versa.</ dd >
224- </ dl >
225-
226- < p > All conversions are assumed to be bidirectional. For example, if
227- you specify < code > :herbie-conversions ([binary64 binary32])</ code > ,
228- Herbie will be able to add conversions between single- and
229- double-precision floating-point.</ p >
230-
231206 < h2 id ="properties "> Miscellaneous Input Properties</ h2 >
232207
208+ < p > A < var > name</ var > can be provided before the argument list to
209+ name an FPCore. That FPCore can then be called in other, later
210+ FPCores.</ p >
211+
233212 < p > Herbie uses the < code > :name</ code > property to name FPCores in
234213 its UI. Its value ought to be a string.</ p >
235214
236215 < p > Herbie allows < code > :alt</ code > properties to specify additional
237- "developer targets"; these might be other alternatives you've tried
238- that you want to compare against.</ p >
216+ "developer targets"; these might be other alternatives you've
217+ tried that you want to compare against.</ p >
239218
240- < p > Herbie' s benchmark suite also uses properties for continuous
219+ < p > Herbie' s benchmark suite also uses properties for continuous
241220 integration, but these are not officially supported and their use is
242221 discouraged.</ p >
243222
0 commit comments