On Thursday, 15 February 2018 20:16:08 CET Thorsten Glaser wrote: > Perhaps you can compile a simple stand-alone test program, which > we can then test on all available emulators (I still have ARAnyM > handy) and bare metal? Attached is the .c test. Sorry I don't have an emulator at the moment and there is no porter box. The program should print nothing and return 0. It used to. https://bugs.debian.org/890466 https://buildd.debian.org/status/logs.php?pkg=rrdtool&arch=m68k
#include <stdio.h>
#include <math.h>
int main(void){
double rrdnan,rrdinf,rrdc,rrdzero;
;
/* some math to see if we get a floating point exception */
rrdzero=sin(0.0); /* don't let the compiler optimize us away */
rrdnan=0.0/rrdzero; /* especially here */
rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
/* at run time without sig fpe */
rrdc = rrdinf + rrdnan;
rrdc = rrdinf / rrdnan;
if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
return 0;
}
Attachment:
signature.asc
Description: This is a digitally signed message part.