Always false float comparisons
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 14 03:16:00 PDT 2016
On Saturday, 14 May 2016 at 01:26:18 UTC, Walter Bright wrote:
>> Sometimes reproducibility/predictability is more important
>> than maybe making
>> fewer rounding errors sometimes. This includes reproducibility
>> between CTFE and
>> runtime.
>
> A more accurate answer should never cause your algorithm to
> fail. It's like putting better parts in your car causing the
> car to fail.
This is all quite discouraging from a scientific programmers
point of view. Precision is important, more precision is good,
but reproducibility and predictability are critical.
Tables of constants that change value if I put a `static` in
front of them?
Floating point code that produces different results after a
compiler upgrade / with different non-fp-related switches?
Ewwwww.
More information about the Digitalmars-d
mailing list