On Jan 4, 2013, at 23:30 , vincent habchi <vi...@macports.org> wrote:

> This is not much of a surprise. Afaik, only 6 includes a IEEE double 
> precision FPU. I suppose you do all your computations using doubles?

Well, that shouldn't matter. If a "double" is a double, then even if it can't 
do it in hardware, it should be done in software, and the result should be the 
same.

Regardless, we're doing it all in float, and we're getting different results on 
the different platforms.

Postings online suggest this is by design, in that it was more important to get 
"close" results faster. Unfortunately, in something like a physic simulation, 
the error adds up quickly. I think correct is more important than fast, and am 
rather disappointed that IEE754 conformance allows for this sloppiness.

http://stackoverflow.com/questions/7346521/subnormal-ieee-754-floating-point-numbers-support-on-ios-arm-devices-iphone-4
http://stackoverflow.com/questions/13888903/floating-point-determinism-between-apple-a5-and-apple-a6-cpus

> Depending on your requirements, you can use a simple table approach and 
> interpolate between points, which is fast and somewhat inaccurate, or refine 
> the result further using three or four steps of an iterative algorithm (using 
> trigonometric identities, you can bring back your angle to, say, [0, pi/4] 
> and perform a Taylor series approximation or something equivalent to get the 
> final result).

We're using vecLib's implementation for the moment, but just learned about 
crlibm, will probably switch to that.

-- 
Rick




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to