Re: problem with cos ( pi/2 )
Re: problem with cos ( pi/2 )
- Subject: Re: problem with cos ( pi/2 )
- From: Bill Monk <email@hidden>
- Date: Sun, 18 Jun 2006 11:27:20 -0500
Urk, reposted with correct Subject line .
On Jun 17, 2006, at 9:32 AM, Greg Guerin <email@hidden>
If <fp.h> is being included, I suggest a simple test:
if ( pi != M_PI )
printf( "Well, isn't that interesting." );
if ( pi/2.0 != M_PI_2 )
printf( "Approximately half as interesting." );
Nothing printed, so pi == M_PI and pi/2.0 == M_PI_2. (<fp.h> and
<math.h> both included via <Carbon/Carbon.h>; using -llibm compiler
flag)
More ideas for simple tests. Print the values of:
M_PI - pi
M_PI_2 - pi/2.0
M_PI_2 - acos( 0.0 )
M_PI_2 - asin( 1.0 )
cos( acos( 0 ) )
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000006123
Interesting. :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden