Variable | Package: compiler | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## generate-accurate-x86-float-code-switch

As with all compiler switch variables, the value of this variable can be `t`, `nil`, or a function object that accepts five arguments and returns `t` or `nil`. The arguments passed to the function will be the values of the safety, space, speed, debug, and compilation-speed optimization qualities, in that order. `nil` is equivalent to a function that always returns `nil` and `t` to a function that always returns `t`. When the value is a function and we say `t` (or true) or `nil` (or false) in the text below, we mean that the function returns, respectively, `t` or `nil`.

This switch affects platforms using 32-bit x86 processors only. These processors can do fast floating-point calculations in 80-bit mode which, if intermingled with 32-bit or 64-bit mode calculations can produce different results in the lower bits from run to run, unless certain flags are set. If this switch is true, those flags are set, but there is a fairly significant computation speed hit if they are. If you want fast computations and are willing to accept lack of repeatability in the lower bits (that is, possibly slightly different answers from run to run), you can compile with this switch false (as it is when speed is 3 and safety 0). If you want the same answer every run, ensure that this switch is `nil`.

We should note that floating-point operations are inherently inaccurate in the lowest bits, so it terms of usefulness of the results, this switch make little or no difference. Also, you may get (on any platform) different answers in the lowest bits from run to run if calculations are done in different orders (as might happen if multiprocessing is used and parts of the calculation is done by different processes which may run in different orders from run to run). If a calculation is unstable (matrix inversion, for example, when the determinant is close to zero), which means that a small change in input results in a much larger change in output, you may see noticeable differences in results when this switch is false, but that is in fact a symptom of the unstable nature of the inputs resulting in untrustworthy results.

If it can be guarateed that the floating point operations are of the same size within a given code segment, the accuracy should not suffer even when this switch returns `nil`. However, for the best guarante of accuracy, at speed cost, this switch should return true.

Initially true if speed is 3 and safety is 0.

See compiling.htm for information on the compiler.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version