Re: using long double math functions like sinl() with Cocoa
Re: using long double math functions like sinl() with Cocoa
- Subject: Re: using long double math functions like sinl() with Cocoa
- From: Tomas Hurka <email@hidden>
- Date: Thu, 04 Jan 2007 14:10:54 +0100
On Jan 4, 2007, at 3:59 AM, E. Wing wrote:
Wow, I'm curious about this one too. I wouldn't expect this behavior.
So playing with your example, if I change your Cocoa program to a pure
Objective-C program (just remove the #import <Cocoa/Cocoa.h> and
NSApplicationMain, but still compile as Objective-C), the program
produces the correct results.
If I add a #import <Foundation/Foundation.h> (but don't link to
Foundation or Cocoa since I don't use anything in it), then the
program produces the wrong results.
So I'm speculating that there is something in the Foundation headers
that causes sinl to be mapped to sin (perhaps some kind of #define).
Right, check
/System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/CarbonCore.framework/Versions/A/Headers/fp.h
for #define sinl(x)
and
/System/Library/Frameworks/CoreServices.framework/Versions/A/
Frameworks/CarbonCore.framework/Versions/A/Headers/ConditionalMacros.h
for #define TYPE_LONGDOUBLE_IS_DOUBLE
It looks to me like a bug.
Bye,
--
Tomas Hurka <mailto:email@hidden>
NetBeans Profiler http://profiler.netbeans.org
Software Engineer, Developer Platforms Group
Sun Microsystems, Praha Czech Republic
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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