To check calc errors goto
http://gcc.gnu.org/ml/gcc/2004-03/msg01494.htmldownload
http://www.netlib.org/paranoia/paranoia.cmy machine K8 (Windsor)
gcc.exe -O3
-ffloat-store -msse -mfpmath=sse -march=
pentium3 V:\codeblocks\paranoia.c -lm ->
errorgcc.exe -O3 -msse -mfpmath=sse -march=
pentium3 V:\codeblocks\paranoia.c -lm ->
program hanggcc.exe -O3 -msse -mfpmath=sse -march=
pentium-m V:\codeblocks\paranoia.c -lm ->
no errorgcc.exe -O3 -msse3 -mfpmath=sse -march=
k8 V:\codeblocks\paranoia.c -lm ->
no errorgcc.exe -O3 -march=
k8 V:\codeblocks\paranoia.c -lm ->
program hanggcc.exe -O3
-ffloat-store -march=
k8 V:\codeblocks\paranoia.c -lm ->
errorgcc.exe -O3
-ffloat-store -march=
i386 V:\codeblocks\paranoia.c -lm ->
errorgcc.exe -O3 -msse -mfpmath=sse -march=
pentium4 V:\codeblocks\paranoia.c -lm ->
no errorgcc.exe -O3 -msse -mfpmath=sse -march=
prescott V:\codeblocks\paranoia.c -lm ->
no errorgcc.exe -O3 -m3dnow -march=
athlon V:\codeblocks\paranoia.c -lm ->
program hanggcc.exe -O3 -msse -mfpmath=sse -march=
athlon-xp V:\codeblocks\paranoia.c -lm ->
program hanggcc.exe -O3 -msse2 -mfpmath=sse -march=
athlon64 V:\codeblocks\paranoia.c -lm ->
no errorgcc.exe -O3 -msse3 -mfpmath=sse,387 -march=k8 V:\codeblocks\paranoia.c -lm ->
far more errorsConclusion:
If you compile
before pentium-m and
athlon64 better use -ffloat-store
If you make use of
387 (
classicfpu) you are
forced to use -ffloat-store
If you
mix up SSE and 387 you are
forced to use -ffloat-store
If you use
3dnow you are
forced to use -ffloat-store
btw. I had
no problem compiling and running maps using
-O3 -msse -mfpmath=sse -march=pentium3Its not a problem to add more target-options (save side) into C::B (done this already with ufo.exe)
but i dont start working on it until i got a green light from a dev.===============================================
gcc.exe -O3 -msse -mfpmath=sse -march=k8 V:\codeblocks\paranoia.c -lm
run a.exe
....
To continue, press RETURN
Diagnosis resumes after milestone Number 220 Page: 10
No failures, defects nor flaws have been discovered.
Rounding appears to conform to the proposed IEEE standard P754.
The arithmetic diagnosed appears to be Excellent!
END OF TEST.
gcc.exe -O3 -march=k8 V:\codeblocks\paranoia.c -lm
a.exe
....
Diagnosis resumes after milestone Number 120 Page: 10
The Underflow threshold is 0.00000000000000000e+000, below which
calculation may suffer larger Relative error than merely roundoff.
Since underflow occurs below the threshold
UfThold = (2.00000000000000000e+000) ^ (-1.#INF0000000000000e+000)
only underflow should afflict the expression
(2.00000000000000000e+000) ^ (-1.#INF0000000000000e+000);
actually calculating yields: 0.00000000000000000e+000 .
This computed value is O.K.
Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065040e+000 as X -> 1.
^C
Hang on that test
gcc.exe -O3 -ffloat-store -msse -mfpmath=sse -march=pentium3 V:\codeblocks\paranoia.c -
Diagnosis resumes after milestone Number 220 Page: 10
The number of FLAWs discovered = 1.
The arithmetic diagnosed seems Satisfactory though flawed.
END OF TEST.