Re: Greg Guerin <email@hidden>
Re: Greg Guerin <email@hidden>
- Subject: Re: Greg Guerin <email@hidden>
- From: Bill Monk <email@hidden>
- Date: Sun, 18 Jun 2006 09:59:33 -0500
On Jun 17, 2006, at 9:32 AM, email@hidden wrote:
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