Re: Long Double Calculation on Intel
Re: Long Double Calculation on Intel
- Subject: Re: Long Double Calculation on Intel
- From: Paul Goracke <email@hidden>
- Date: Tue, 9 Oct 2007 09:52:57 -0700
On Oct 9, 2007, at 9:00 AM, Richard Somers wrote:
Below is a small program which calculates the cosine of 45 degrees
in double and long double precision. The result should be 0.707...
It works fine on PowerPC but the Intel long double produces
garbage. Does anyone know what is happening here?
The values of result1 and result2 are correct; the output you're
seeing isn't, because you're not using the correct printf specifier
for long double. Change the second printf to:
printf("cosl 45 degrees .14Le\n", result2);
(note the 'Le' instead of just 'e').
pg
_______________________________________________
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