From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: 2.0.11 on OS X 10.9 / Xcode 5.1 Date: Tue, 22 Apr 2014 12:28:30 -0400 Message-ID: <87ppk9cor5.fsf@yeeloong.lan> References: <87vbuq435v.fsf@taylan.uni.cx> <87bnwak01s.fsf@taylan.uni.cx> <87zjjsfz9x.fsf@yeeloong.lan> <87mwfdo2h2.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398184229 12963 80.91.229.3 (22 Apr 2014 16:30:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2014 16:30:29 +0000 (UTC) Cc: guile-devel@gnu.org To: Taylan Ulrich Bayirli/Kammer Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 22 18:30:22 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WcdaP-0004hC-A1 for guile-devel@m.gmane.org; Tue, 22 Apr 2014 18:30:21 +0200 Original-Received: from localhost ([::1]:56200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcdaO-0004rH-PS for guile-devel@m.gmane.org; Tue, 22 Apr 2014 12:30:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcdaF-0004qu-Gt for guile-devel@gnu.org; Tue, 22 Apr 2014 12:30:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wcda9-0006cF-9y for guile-devel@gnu.org; Tue, 22 Apr 2014 12:30:11 -0400 Original-Received: from world.peace.net ([96.39.62.75]:60725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wcda9-0006Yv-6N for guile-devel@gnu.org; Tue, 22 Apr 2014 12:30:05 -0400 Original-Received: from ip72-221-68-65.ri.ri.cox.net ([72.221.68.65] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Wcda2-0007Va-AE; Tue, 22 Apr 2014 12:29:58 -0400 In-Reply-To: <87mwfdo2h2.fsf@taylan.uni.cx> (Taylan Ulrich Bayirli's message of "Tue, 22 Apr 2014 16:36:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17098 Archived-At: Taylan Ulrich Bayirli/Kammer writes: > Mark H Weaver 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