Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2002 12:48:35 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Matthew Seaman <m.seaman@infracaninophile.co.uk>, questions@FreeBSD.ORG
Subject:   Re: pow(3) on FreeBSD
Message-ID:  <200208191248.35136.mi%2Bmx@aldan.algebra.com>
In-Reply-To: <20020819161819.GB70455@dan.emsphone.com>
References:  <200208190413.g7J4DEcw051123@corbulon.video-collage.com> <200208191124.35129.mi%2Bmx@aldan.algebra.com> <20020819161819.GB70455@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208191248.35136.mi%2Bmx>