[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.0.11 on OS X 10.9 / Xcode 5.1

From: Mark H Weaver
Subject: Re: 2.0.11 on OS X 10.9 / Xcode 5.1
Date: Tue, 22 Apr 2014 12:28:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Taylan Ulrich Bayirli/Kammer <address@hidden> writes:

> Mark H Weaver <address@hidden> writes:
>> What does (sin -0.0) evaluate to?
>> My first guess is that at the C level, sin(-0.0) => 0.0 on your system,
>> although IEEE 754 and C11 (F.10.1.6) specify that sin(-0.0) => -0.0.
>> If my guess is incorrect, then please put a breakpoint in
>> 'scm_c_make_polar' and see what's going wrong.  Both 'ang' and 's'
>> should be -0.0, and then it should pass -0.0 as the second argument to
>> 'scm_c_make_rectangular'.
>>     Thanks,
>>       Mark
> Update:
> (As mentioned on IRC, (sin -0.0) evaluates to -0.0, also via sin() on
> the C level in a minimal test-case compiled with the same compiler.
> However...)
> While trying to get the MacPorts-provided GCC 4.8 to build Guile with
> debugging symbols (and not succeeding), I noticed that adding -g or
> -ggdb to CFLAGS hides the issue, making address@hidden => 1.0-0.0i.  It seems 
> to
> be enough to recompile numbers.c (I touch it and re-run make with or
> without CFLAGS+="-g").

Are you passing any optimization flags?  There are some, such as -Ofast,
-ffast-math, -funsafe-math-optimizations, -fno-signed-zeros,
-fassociative-math, and maybe some others that might result in this bug.

Otherwise, I suspect that there's some optimization bug in the compiler
you're using.  What exact version of GCC are you using?  These problems
don't seem to be happening with GCC 4.8.2 on GNU/Linux systems.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]