unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
Cc: guile-devel@gnu.org
Subject: Re: 2.0.11 on OS X 10.9 / Xcode 5.1
Date: Tue, 22 Apr 2014 12:28:30 -0400	[thread overview]
Message-ID: <87ppk9cor5.fsf@yeeloong.lan> (raw)
In-Reply-To: <87mwfdo2h2.fsf@taylan.uni.cx> (Taylan Ulrich Bayirli's message of "Tue, 22 Apr 2014 16:36:41 +0200")

Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> writes:

> Mark H Weaver <mhw@netris.org> 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 #i1@-0 => 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.

     Thanks,
       Mark



  reply	other threads:[~2014-04-22 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03 19:35 2.0.11 on OS X 10.9 / Xcode 5.1 Taylan Ulrich Bayırlı/Kammer
2014-04-09 15:14 ` Taylan Ulrich Bayırlı/Kammer
2014-04-09 15:38   ` Taylan Ulrich Bayırlı/Kammer
2014-04-10 14:10   ` Greg Troxel
2014-04-11  1:08   ` Mark H Weaver
2014-04-22 14:36     ` Taylan Ulrich Bayirli/Kammer
2014-04-22 16:28       ` Mark H Weaver [this message]
2014-04-23 17:51         ` Taylan Ulrich Bayirli/Kammer
2014-04-24 14:20           ` Taylan Ulrich Bayirli/Kammer
2014-04-24 16:04           ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppk9cor5.fsf@yeeloong.lan \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=taylanbayirli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).