• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NOT solved: using long double math functions like sinl() with Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NOT solved: using long double math functions like sinl() with Cocoa


  • Subject: NOT solved: using long double math functions like sinl() with Cocoa
  • From: "Dr. Rolf Jansen" <email@hidden>
  • Date: Thu, 11 Jan 2007 21:59:58 -0200

Sorry everybody, that I have to come back with this topic!

sinl() seems to be seriously screwed up. Although this problem is NOT limited to Cocoa, I post this here, since recently I reported success in using long double functions (specifically sinl()) together with Cocoa.

You might want to refrain from using long double functions at all (as I do from now on) as long as the following bug is reported to be fixed.


// main.c // SinTest

#include <stdio.h>
#include <math.h>

int main (int argc, const char * argv[])
{
    printf("%f\n%Lf", sin(1.5707963267948966),	// pi/2
                     sinl(1.57079632679489661923132169163974L));
    return 0;
}


[Session started at 2007-01-11 21:45:42 -0200.] 1.000000 2.000000 SinTest has exited with status 0.


The double sin() gives correctly 1 as the result. The long double sinl () gives 2 ?!?!?! This is very strange, to say the least.


Experimenting a little bit with some input values, it seems to be a boundary case.

      sinl(1.5707963267948966L) gives 1

But   sinl(4.71238898038468985769396507491920L) = -2   // 1.5 * pi


Best regards

Rolf


_______________________________________________

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


  • Follow-Ups:
    • Re: NOT solved: using long double math functions like sinl() with Cocoa
      • From: Nir Soffer <email@hidden>
    • Re: NOT solved: using long double math functions like sinl() with Cocoa
      • From: "Clark Cox" <email@hidden>
    • Re: NOT solved: using long double math functions like sinl() with Cocoa
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Embedded database server or CoreData?
  • Next by Date: Re: Embedded database server or CoreData?
  • Previous by thread: Re: Embedded database server or CoreData?
  • Next by thread: Re: NOT solved: using long double math functions like sinl() with Cocoa
  • Index(es):
    • Date
    • Thread