Re: problem with cos ( pi/2 )
Re: problem with cos ( pi/2 )
- Subject: Re: problem with cos ( pi/2 )
- From: billmonk <email@hidden>
- Date: Fri, 16 Jun 2006 12:05:59 -0500
On Jun 16, 2006, at 11:33 AM, Christopher Henrich wrote:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/
man3/intro.3.html
Oops; if you're using C (C++, Obj-C, whatever) then I think you
want the "-lm" flag.
Oops, my mistake. I read the first paragraph of that reference wrong.
No change in the results I'm getting, though.
"90" is an integer, exactly representable in almost any number
format. So here's a case where the machine knows exactly what
angle you want. Therefore it can give you exactly the cosine of it.
Sure. But cos() takes radians as its argument, not degrees. So when
Calculator converts 90 degrees to radians, it gets a number that
isn't exactly representable, and should get the same answer for cos
( 90 ) as it does for cos( pi/2 ). One wonders if it's not special-
casing cos( 90 ) in degrees mode, and not calling the cos() function
at all...
_______________________________________________
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