From owner-freebsd-questions Sun Aug 18 21:30:24 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 B7B8537B400 for ; Sun, 18 Aug 2002 21:30:21 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2245243E6E for ; Sun, 18 Aug 2002 21:30:21 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.5/8.12.5) id g7J4UCk3028953; Sun, 18 Aug 2002 23:30:12 -0500 (CDT) (envelope-from dan) Date: Sun, 18 Aug 2002 23:30:12 -0500 From: Dan Nelson To: Mikhail Teterin Cc: questions@FreeBSD.ORG Subject: Re: pow(3) on FreeBSD Message-ID: <20020819043012.GN74231@dan.emsphone.com> References: <200208190413.g7J4DEcw051123@corbulon.video-collage.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208190413.g7J4DEcw051123@corbulon.video-collage.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i 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 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 #include 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