FLT_EVAL_METHOD vs fexcess-precision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am reading a previous post from Pascal Cuoq(*), and it seems things
have changed quite a bit in GCC nowadays. I fail to understand how
FLT_EVAL_METHOD relates to fexcess-precision. Did I miss something?

---

Here is what I see on my Debian/sid/i386 system:

 % gcc -O2 -fexcess-precision=fast   m.c && ./a.out
float eps = 1.192093e-07
2

while:

 % gcc -O2 -fexcess-precision=standard   m.c && ./a.out
float eps = 1.084202e-19
2

with:

 % cat m.c
#include <stdio.h>
#include <float.h>

int main(void)
{
    float floatEps = 1;

    while (1 + floatEps / 2 != 1)
        floatEps /= 2;

    printf("float eps = %e\n", floatEps);
    printf("%d\n", FLT_EVAL_METHOD);
}

For reference:

 % gcc --version
gcc (Debian 13.2.0-2) 13.2.0

(*) https://stackoverflow.com/a/16064515/136285
-- 
Mathieu



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux