Date: Sun, 18 Aug 2002 23:30:12 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Mikhail Teterin <mi@corbulon.video-collage.com> Cc: questions@FreeBSD.ORG Subject: Re: pow(3) on FreeBSD Message-ID: <20020819043012.GN74231@dan.emsphone.com> In-Reply-To: <200208190413.g7J4DEcw051123@corbulon.video-collage.com> References: <200208190413.g7J4DEcw051123@corbulon.video-collage.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Aug 19), Mikhail Teterin said:
> In accordance with its man-page entry, pow(3) will return 0 if its
> second argument is not an integer. Why is that? What's the reasoning
> and what is a workaround -- I'm trying to port an application from
> Solaris, which uses pow(3) quite heavily...
Seems to work fine for me. Where in the manpage does it say that? All
I can see is that if x<0, y must be an integer. My Solaris manpage
says the same thing.
$ cat > test.c
#include <math.h>
#include <stdio.h>
main()
{
printf("%f\n", pow(2, 1.5));
}
^D
$ gcc test.c -lm
$ ./a.out
2.828427
$
--
Dan Nelson
dnelson@allantgroup.com
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?20020819043012.GN74231>
