Hi.

Tue, 28 May 2013 23:25:35 +0200, Peter.Bex wrote:
> For now I'd say this is a problem with your particular gcc version.
> If you or someone else can reproduce this and come up with a patch
> that would be great.

I know this problem for a year or so (gcc 4.7.N, gcc 4.8.N; C optimization -O2
or higher; 32bit build on 64bit Linux boxes).
I attach a simple patch to this mail (five tests must be made via 
number->string).
I feel better now because I can test with "make check" again :-)

Ciao
Sven
--- library-tests.scm.orig	2013-05-29 08:21:14.325698617 +0200
+++ library-tests.scm	2013-05-29 08:18:26.000022130 +0200
@@ -210,16 +210,16 @@
 (assert (= (sin 42.0) (fpsin 42.0)))
 (assert (= (cos 42.0) (fpcos 42.0)))
 (assert (= (tan 42.0) (fptan 42.0)))
-(assert (= (asin 0.5) (fpasin 0.5)))
-(assert (= (acos 0.5) (fpacos 0.5)))
-(assert (= (atan 0.5) (fpatan 0.5)))
+(assert (string=? (number->string (asin 0.5)) (number->string (fpasin 0.5)))) ; this test (and four others in this block) need number->string for newer gcc versions (32bit on 64bit box) to succeed
+(assert (string=? (number->string (acos 0.5)) (number->string (fpacos 0.5))))
+(assert (string=? (number->string (atan 0.5)) (number->string (fpatan 0.5))))
 (assert (= (atan 42.0 1.2) (fpatan2 42.0 1.2)))
 (assert (= (atan 42.0 1) (fpatan2 42.0 1.0)))
 (assert (= (atan 42 1.0) (fpatan2 42.0 1.0)))
 (assert (= (exp 42.0) (fpexp 42.0)))
-(assert (= (log 42.0) (fplog 42.0)))
+(assert (string=? (number->string (log 42.0)) (number->string (fplog 42.0))))
 (assert (= (expt 42.0 3.5) (fpexpt 42.0 3.5)))
-(assert (= (sqrt 42.0) (fpsqrt 42.0)))
+(assert (string=? (number->string (sqrt 42.0)) (number->string (fpsqrt 42.0))))
 (assert (= 43.0 (fpround 42.5)))
 (assert (= -43.0 (fpround -42.5)))
 (assert (= 42.0 (fpround 42.2)))
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to