From: "H.Yamamoto" Date: 2005-02-09T11:40:25+09:00 Subject: Re: math changes from 1.8.1 to 1.8.2?(G4's fault?) Hello. ptkwt@aracnet.com (Phil Tomson) wrote: (2005/02/08 19:00) >>fp = FixedPt.new(Math.exp(-5),18,18) >> >>Which defines an 18bit register with the binary point at bit 18 and stuffs >>the result of Math.exp(-5) into it (shifting the result to the left 18 >>times). >> >>fp.to_f #=> 0.00673675537109375 >>fp.raw #=> 1766 >>fp.to_i #=> 0 >I loaded up 1.8.2 on my powerbook last night and had the same problem >(which doesn't exist on the Pentium IV). I suspect it's a difference in >the FPU between the G4 and PIV. I'm doing lots of summations and >conversions between floating point and fixed point, so I suspect it's the >fault of the G4's FPU..... unless someone else has any other theories. Interesting. Can I see the code of FixedPt?