• 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
Re: Long Double Calculation on Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long Double Calculation on Intel


  • Subject: Re: Long Double Calculation on Intel
  • From: Paul Goracke <email@hidden>
  • Date: Tue, 9 Oct 2007 09:52:57 -0700

On Oct 9, 2007, at 9:00 AM, Richard Somers wrote:

Below is a small program which calculates the cosine of 45 degrees in double and long double precision. The result should be 0.707...

It works fine on PowerPC but the Intel long double produces garbage. Does anyone know what is happening here?

The values of result1 and result2 are correct; the output you're seeing isn't, because you're not using the correct printf specifier for long double. Change the second printf to:


	printf("cosl 45 degrees .14Le\n", result2);

(note the 'Le' instead of just 'e').

pg


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Long Double Calculation on Intel
      • From: Richard Somers <email@hidden>
References: 
 >Long Double Calculation on Intel (From: Richard Somers <email@hidden>)

  • Prev by Date: Long Double Calculation on Intel
  • Next by Date: How to get the managed object bound to UI
  • Previous by thread: Long Double Calculation on Intel
  • Next by thread: Re: Long Double Calculation on Intel
  • Index(es):
    • Date
    • Thread