From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <15e394b98302f5447431d51b697baf7c.axp-list@archive.invalid> X-Archive-Original-Message-ID: Date: Tue, 18 Nov 1997 14:31:40 +0100 From: Claus Denk Subject: DU-Linux binary compatibility:rounding mode Hi, I have just run across a "compatibility" problem when running DU binaries on Linux. The following program: 1 #include 2 #include 3 #include 4 int main() { 5 #ifdef DYNAMIC_ROUND 6 write_rnd(FP_RND_RN); 7 #endif 8 printf("rint(0.8)=%e\n",rint(0.8)); 9 return 0; 10 } 1) compiled on DU with the flags: cc round.c -lm -non_shared gives on DU: rint(0.8)=1.000000e+00 gives on Linux: rint(0.8)=0.000000e+00 2) compiled on DU with the flags: cc round.c -DDYNAMIC_ROUND -fprm d -lm -non_shared gives on DU: rint(0.8)=1.000000e+00 gives on Linux: rint(0.8)=1.000000e+00 The cc manual states that the default rounding behaviour for method 1) is -frpm n (normal rounding mode to closest integer). This works on DU but fails on Linux. Programs compiled on DU that use this "static" rounding mode (method 1) will fail on Linux. Is this a Kernel problem ? Any ideas ? regards, Claus -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com