• 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: Spurious long double accuracy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spurious long double accuracy


  • Subject: Re: Spurious long double accuracy
  • From: Tommy Nordgren <email@hidden>
  • Date: Sun, 10 Dec 2006 16:20:17 +0100


On 10 dec 2006, at 15.46, Tommy Nordgren wrote:

The predefined compiler macro __LDBL_EPSILON__ is defined to be 4.94066e-324
Recomputing this constant from definition gives the same value.
Now the formal definition for epsilon in respect to floating point calculation, is the smallest
positive floating point value that when added to 1.0 gives a value that is not 1.0 with machine precision.
I wonder what is going on here, since both defined and computed values of this constant
implies a accuracy in floating point calculations with approximately 300 more significant digits than
available in long double format.
----
Kine dies, Kinfolk dies, and thus at last yourself
This I know that never dies, how a dead mans deeds are deemed. -- Elder edda
Tommy Nordgren
email@hidden



Here is the values of the constants for float, double , and long double:
Epsilon: 1.19209e-07 , 2.22045e-16 , 4.94066e-324
(Generating code):
printf("Epsilon: %g , %g , %Lg \n",__FLT_EPSILON__,__DBL_EPSILON__,__LDBL_EPSILON__);



------------------------------------- This sig is dedicated to the advancement of Nuclear Power Tommy Nordgren email@hidden



_______________________________________________
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


  • Follow-Ups:
    • Re: Spurious long double accuracy
      • From: Shawn Erickson <email@hidden>
References: 
 >Spurious long double accuracy (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Running ppc app in intel mode
  • Next by Date: Re: Running ppc app in intel mode
  • Previous by thread: Spurious long double accuracy
  • Next by thread: Re: Spurious long double accuracy
  • Index(es):
    • Date
    • Thread