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

Re: m68k OCaml porting issue



Another simpler example, not involving unions:

-----8<-----
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int main(int argc, char** argv) {
   double d[2];
   d[0] = NAN;
   d[1] = -d[0];
   printf("%F\n", d[1]);
}
-----8<-----

Gives NAN on '030 & '882, '040, '060, with gcc 7.4.0 & gcc 10.3.0.

Does Linux support softfloat? That'd be one way to get proper math out of qemu.

John


Reply to: