Re: Spurious long double accuracy
Re: Spurious long double accuracy
- Subject: Re: Spurious long double accuracy
- From: Shawn Erickson <email@hidden>
- Date: Sun, 10 Dec 2006 08:25:01 -0800
On Dec 10, 2006, at 7:20 AM, Tommy Nordgren wrote:
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__);
<http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?
topic=/com.ibm.aix.genprogc/doc/genprogc/128bit_long_double_floating-
point_datatype.htm>
_______________________________________________
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