Port-arm archive

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

earmv6hf IEEE754 underflow problem


I am using the evbarm-earmv6hf port on a Raspberry Pi. I have a problem
with floating point underflow. Is this port supposed to implement full
IEEE754 behaviour including underflow exceptions?

This program should output:
2.2250738585072009e-308 is 0xfffffffffffff

But on my RPI I get:
Underflow should not happen!
0.0000000000000000e+00 is 0x0

#include <stdio.h>
#include <float.h>

int main(void) {
        double a = 2.225073858507201E-52;
        double b = 1.0E-256;
        double c = a * b;
        if (c == 0.0)
                printf("Underflow should not happen!\n");
        printf("%.16e is 0x%lx\n", c, *(long*)&c);

I compiled with -O0 and there is a vmul.f64 instruction so I don't
think it is a GCC bug.

Kind regards,

Home | Main Index | Thread Index | Old Index