Mail Archives: djgpp-workers/2003/01/19/12:42:32
> From: lnobody AT delorie DOT com
> Date: Sat, 18 Jan 2003 18:46:27 +0100 (MET)
>
> tsin without -lm gives (perhaps that is to be expected as its supposed
> to be fast instead of correct to the last bit)):
> sin(355) = -3.01443533594889079e-05 from math library.
> sin(355) = -3.01443533594884505e-05 is correct answer.
> About 7.09 bits are wrong out of 53.00 total bits.
> That is about 135.00 ULPs (Units Last Place) bits error.
I think this is expected, since x87's argument reduction near
0 + n * 2Pi is known to lose accuracy. IIRC, the Intel manual
on Pentium CPUs describes this.
> tbin2dec compiled (with or without -lm) gives:
> FAIL: dig=40, errno=0, rc=42, kk=7
> , %e=>9.400000000000014508012846636830772695248e-40000000000000000000000000000000000000000000000000000000000000
> , %f=>0.0...010 (... is 36 0s)
> , %f[41] should be 9 (based upon %e)
> FAIL: dig=40, errno=0, rc=42, kk=6
> , %e=>9.400000000000012874770694004666893306421e-40000000000000000000000000000000000000000000000000000000000000
> , %f=>0.0...010 (... is 36 0s)
> , %f[41] should be 9 (based upon %e)
> FAIL: dig=40, errno=0, rc=42, kk=5
> , %e=>9.400000000000011241528541372503013917594e-40000000000000000000000000000000000000000000000000000000000000
> , %f=>0.0...010 (... is 36 0s)
> , %f[41] should be 9 (based upon %e)
> FAIL: dig=40, errno=0, rc=42, kk=4
> , %e=>9.400000000000009612623197430281152264797e-40000000000000000000000000000000000000000000000000000000000000
> , %f=>0.0...010 (... is 36 0s)
> , %f[41] should be 9 (based upon %e)
> FAIL: dig=40, errno=0, rc=42, kk=3
> , %e=>9.400000000000007981115768274094079970382e-40000000000000000000000000000000000000000000000000000000000000
> , %f=>0.0...010 (... is 36 0s)
> , %f[41] should be 9 (based upon %e)
I don't understand these failures. Could you please tell more
details about what is the failure here? Like what was the code and
what is the expected result?
- Raw text -