Equality == comparisons with floating point numbers

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Dec 9 03:51:30 PST 2013


On 09/12/13 12:43, Abdulhaq wrote:
> I was tidying up my emails at work and by coincidence I found the original paper
> that I was referring to, it's very pertinent to this discussion and interesting
> too,
>
> The pitfalls of verifying floating-point computations
> David Monniaux (LIENS, Verimag - Imag)
>
> http://arxiv.org/abs/cs/0701192

Thank you very much!  That's very useful.

I managed to find a way to not trigger equality or isIdentical failures, just by 
calling std.math.feqrel on the quantities first (and comparing its result to 
double.mant_dig).  I guess this is also a case of taking the variables off the 
FPU; I'm not experienced enough with assembly to be confident taking the program 
apart and analysing it that way.



More information about the Digitalmars-d-learn mailing list