Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2003 05:13:17 -0800
From:      David Schultz <das@FreeBSD.ORG>
To:        Till Riedel <till@f111.hadiko.de>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: libm problem
Message-ID:  <20030319131317.GA670@HAL9000.homeunix.com>
In-Reply-To: <20030318173051.GA2322@f111.hadiko.de>
References:  <20030318173051.GA2322@f111.hadiko.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Till Riedel <till@f111.hadiko.de>:
> {till@sabbath}-{~} $ cat test.c
> #include "math.h"
> 
> int main()
> {
>   int base=8;
>   int dim=2;
>   float res;
>   res=pow((float)base,(float)dim);
>   printf("%f\n",res);
>   return 0;
> }
> {till@sabbath}-{~} $ gcc -lm test.c
> {till@sabbath}-{~} $ ./a.out
> 1.000000
> 
> what happened to my libm???
> on my 4.8 box the result is 64 by the way :-)
> CPU: Pentium 4 (2411.60-MHz 686-class CPU)
> Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
> any suggestions?

I can't reproduce your problem on dual PPro or Celeron systems.
Did you have any optimizations other than -O set when you made
world?  It would be helpful if you could drop into gdb and give me
the output of 'print/x {int}&res' right after the call to pow().

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030319131317.GA670>