[gcj] Re: Floating-point numbers

2009-08-30 Thread Luke Pebody
I don't need to see code, I just want to be sure what relative difference of 1e-6 means. My guess is that it means: either supplied = expected = 0 or |supplied - expected| / max(|supplied|,|expected|) = 1e-6. On Sun, Aug 30, 2009 at 3:13 AM, Bartholomew Furrowfur...@gmail.com wrote: I'm

[gcj] Re: Floating-point numbers

2009-08-30 Thread romanr
Probably there is |supplied - expected| 1e-6 Luke Pebody wrote: I don't need to see code, I just want to be sure what relative difference of 1e-6 means. My guess is that it means: either supplied = expected = 0 or |supplied - expected| / max(|supplied|,|expected|) = 1e-6. On

[gcj] Re: Floating-point numbers

2009-08-29 Thread Damian Walczak
How We Will Judge Your Submission [...] 3. Two floating point numbers are considered equal if their absolute or relative difference is smaller than 1e-6. This does not apply to integers. Two integers are considered equal only when they are exactly equal. I hope this answers your question. Best,