On Dec 5, 2014, at 06:22 , David Kastrup <[email protected]> wrote:
>
> Masamichi HOSODA <[email protected]> writes:
>
>> Therefore, robust treating for margin of error is necessary.
>
> That does not help all that much: it just shifts the problem somewhere
> else. It will tend to fix known test cases and create a new set of
> previously working failures.
>
> Instead the algorithms have to be rewritten in a manner where their
> termination does not depend on the reproducibility of floating point
> operations. There have been a few attempts of rewriting skyline code
> that have fixed/created some problems without any real insights into
> what caused the fix and what caused the new problems.
I’ve only skimmed some web pages on this subject, but if the following can be
tolerated, it seems like the simplest way to reduce pain in short order:
On more modern x86 processors that support SSE2, specifying
the compiler options -mfpmath=sse -msse2 ensures all float
and double operations are performed in SSE registers and
correctly rounded.
[https://gcc.gnu.org/wiki/FloatingPointMath]
It worked for my example program. SSE2 instructions were introduced in the
Pentium 4. Another source warns that those options are
often sufficient to remove the effects of extended-precision.
However, some operations (such as transcendental functions)
are not available in the SSE/SSE2 extensions and will still
be computed on the x87 FPU.
[http://www.network-theory.co.uk/docs/gccintro/gccintro_70.html]
There is also a lot of information at
http://christian-seiler.de/projekte/fpmath/ .
—
Dan
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel