From owner-freebsd-current Tue Mar 18 9:37:57 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D0F637B401 for ; Tue, 18 Mar 2003 09:37:55 -0800 (PST) Received: from freebsd.org.ru (www.freebsd.org.ru [194.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3692943F93 for ; Tue, 18 Mar 2003 09:37:54 -0800 (PST) (envelope-from osa@freebsd.org.ru) Received: by freebsd.org.ru (Postfix, from userid 1000) id B2DF1BA; Tue, 18 Mar 2003 20:37:50 +0300 (MSK) Date: Tue, 18 Mar 2003 20:37:50 +0300 From: "Sergey A. Osokin" To: Till Riedel Cc: freebsd-current@freebsd.org Subject: Re: libm problem Message-ID: <20030318173750.GF90099@freebsd.org.ru> Reply-To: osa@FreeBSD.org.ru References: <20030318173051.GA2322@f111.hadiko.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030318173051.GA2322@f111.hadiko.de> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Mar 18, 2003 at 06:30:51PM +0100, Till Riedel wrote: > Hi, > since installed a new world this weekend strange things happen to me: > > {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? Here is a patch for your program :-) --- test.c.orig Tue Mar 18 20:36:03 2003 +++ test.c Tue Mar 18 20:36:08 2003 @@ -1,6 +1,7 @@ -#include "math.h" +#include +#include -int main() +int main(void) { int base=8; int dim=2; -- Rgdz, /"\ ASCII RIBBON CAMPAIGN Sergey Osokin aka oZZ, \ / AGAINST HTML MAIL http://ozz.pp.ru/ X AND NEWS / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message