Re: Machine epsilon: conclusion



Richard Heathfield wrote:
jacob navia said:

Richard Heathfield wrote:
jacob navia said:

<snip>
For the different representations we have in the standard header
<float.h>:

#define FLT_EPSILON 1.19209290e-07F // float
#define DBL_EPSILON 2.2204460492503131e-16 // double
#define LDBL_EPSILON 1.084202172485504434007452e-19L //long double
// qfloat epsilon truncated so that it fits in this page...
#define QFLT_EPSILON 1.09003771904865842969737513593110651 ... E-106
You have the same bug as last time. No standard-conforming
implementation may define QFLT_EPSILON in the standard header
<float.h>, as I pointed out to you earlier this week.

I have told you thousand times that this can be disabled
by using -ansic.

You don't seem to understand my point, which is that you are describing <float.h> as a *standard header*, and yet you *also* describe it as containing QFLT_EPSILON. It can't *both* be a standard header *and* contain QFLT_EPSILON at the same time. If it is a standard header, it does not contain QFLT_EPSILON. If it contains QFLT_EPSILON, it is not a standard header. Your claim that QFLT_EPSILON is in a standard header is simply wrong, switch or no switch.


The compiler you use has a file called
"math.h"

There, I can read

# define M_E 2.7182818284590452354 /* e */
# define M_LOG2E 1.4426950408889634074 /* log_2 e */
# define M_LOG10E 0.43429448190325182765 /* log_10 e */
# define M_LN2 0.69314718055994530942 /* log_e 2 */
# define M_LN10 2.30258509299404568402 /* log_e 10 */
# define M_PI 3.14159265358979323846 /* pi */
# define M_PI_2 1.57079632679489661923 /* pi/2 */
# define M_PI_4 0.78539816339744830962 /* pi/4 */
# define M_1_PI 0.31830988618379067154 /* 1/pi */
# define M_2_PI 0.63661977236758134308 /* 2/pi */
# define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
# define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
# define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */

but that doesn't bother you since when you call that compiler
with the needed flags, those definitions do not appear.

When I do exactly the same you will argue without end.

The fact that my compiler is the only C compiler giving to the user
105 digits floating point precision is not important to you.

Polemic, polemic without end, but you did not contribute anything
to this discussion.


.



Relevant Pages

  • Re: Machine epsilon: conclusion
    ... standard header *and* contain QFLT_EPSILON at the same time. ... The compiler you use has a file called ... He's not complaining about the behavior of your compiler. ... The suggestion that such extensions should be in separate headers is ...
    (comp.lang.c)
  • Re: Automatically generate variables
    ... stdlib.h is a standard header. ... paragraph 3: ... because the compiler wouldn't see it. ... magically make my implementation 100% conforming (though not usefully ...
    (comp.lang.c)
  • Re: Standard header and using
    ... It makes the iostream facilities (which has to do with ... if the standard header iostream defines the names cout then why in ... the compiler has to know what it is before it can be used. ... namespace is completely separate. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: .h for standard headers
    ... >> entry in a ToDo list. ... > Did that era include, say, 1999? ... Adding .h to the standard header files ... change/upgrade your compiler and/or the standard library implementation. ...
    (comp.lang.cpp)
  • Re: Machine epsilon: conclusion
    ... // qfloat epsilon truncated so that it fits in this page... ... It can't *both* be a standard header *and* contain QFLT_EPSILON at the same time. ... Your claim that QFLT_EPSILON is in a standard header is simply wrong, switch or no switch. ...
    (comp.lang.c)