Re: Floating-point differences between ARM processors
Re: Floating-point differences between ARM processors
- Subject: Re: Floating-point differences between ARM processors
- From: vincent habchi <email@hidden>
- Date: Sat, 05 Jan 2013 08:30:20 +0100
On 5 janv. 2013, at 03:38, Rick Mann <email@hidden> wrote:
> So, we've run into an issue in our physics simulation where the floating point results from cos() (and probably other intrinsics) are different between Apple ARM 5 and Apple ARM 6 processors.
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?
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).
Vincent
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden