Subject: gcc math problems on NetBSD and OpenBSD
To: None <tech-toolchain@NetBSD.org, port-sparc@NetBSD.org>
From: Lars Bausch <email@example.com>
Date: 12/29/2005 15:37:09
I am try to porting the new seti@home to NetBSD and OpenBSD on various
Seti@home do a lot of floating point computations....
A test with a reference WU on NetBSD and OpenBSD (both on i386 and
SPARC) gave heavly differencing results between the computed and the
I used different gcc releases and different compiler flags.
On NetBSD and OpenBSD on i386 I get it to work, if I use the CFLAGS
"-ffloat-store -funsafe-math-optimisation". The performance is 20 %
slower compared with other OSes on the same system. But the math will be
computed right, and the results are within a vailid range.
But with these CFLAGS I have no success on SPARC. On NetBSD the results
are some hundret times higher as in the reference, on OpenBSD sometimes
double so high.
The source should be OK, because worked on other platforms without any
Have anyone some hints ?