From owner-freebsd-questions Mon Aug 19 9:47:57 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E62D937B400 for ; Mon, 19 Aug 2002 09:47:54 -0700 (PDT) Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB9CA43E7B for ; Mon, 19 Aug 2002 09:47:53 -0700 (PDT) (envelope-from mi+mx@aldan.algebra.com) Received: from misha.murex.com (250-217.customer.cloud9.net [168.100.250.217]) by corbulon.video-collage.com (8.12.2/8.12.2) with ESMTP id g7JGlke5027364 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL); Mon, 19 Aug 2002 12:47:48 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: corbulon.video-collage.com: Host 250-217.customer.cloud9.net [168.100.250.217] claimed to be misha.murex.com Content-Type: text/plain; charset="iso-8859-1" From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Dan Nelson Subject: Re: pow(3) on FreeBSD Date: Mon, 19 Aug 2002 12:48:35 -0400 User-Agent: KMail/1.4.2 Cc: Matthew Seaman , questions@FreeBSD.ORG References: <200208190413.g7J4DEcw051123@corbulon.video-collage.com> <200208191124.35129.mi+mx@aldan.algebra.com> <20020819161819.GB70455@dan.emsphone.com> In-Reply-To: <20020819161819.GB70455@dan.emsphone.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200208191248.35136.mi+mx@aldan.algebra.com> X-Scanned-By: MIMEDefang 2.15 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday 19 August 2002 12:18 pm, Dan Nelson wrote: = > = $ gcc test.c -lm = > = $ ./a.out = > = 2.828427 = > = > The test above was, obviously, done on Solaris. On FreeBSD, this same = > program outputs zero: = > = > mteterin@misha:~ (257) uname -a = > FreeBSD misha 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Jul 31 13:27:39 EDT = > 2002 mteterin@misha [...] = > mteterin@misha:~ (258) ./a.out = > 0.000000 = = There must be something wrong with your setup, then :) It prints = 2.828427 on my -current box and all my 4.* boxes as well. Try = rebuilding libc and libm with CFLAGS=-O and nothing else. You may have = hit a compiler bug. Khmm, indeed! It is the ``-march=pentium4'', that was breaking things :-\ even with the supposedly working gcc31. With the pentium3 it works properly (SSE2 vs. plain SSE?)... Now, I would've suspected a compiler problem, if it was not in the man-page, that the y is checked for being integer (with unspecified result if it is not)... I guess, I'll try to improve the wording and file a PR. Thanks to everyone! -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message