Date: Sat, 17 Mar 2001 10:11:45 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: James W Sager Iii Message-Id: <1190-Sat17Mar2001101145+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <8ugkfne00UjFETbF0i@andrew.cmu.edu> (message from James W Sager Iii on Sat, 17 Mar 2001 01:57:55 -0500 (EST)) Subject: Re: Whats up with sqrt? References: <5BF60CD649EDD411A04600B0D049F53A09257B AT hydmail02 DOT hyd DOT wilco-int DOT com> <8ugkfne00UjFETbF0i AT andrew DOT cmu DOT edu> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sat, 17 Mar 2001 01:57:55 -0500 (EST) > From: James W Sager Iii > > > > Don't use commas while sending parameters. It's giving you the square root > > of the second parameter, i.e. 0. > > > > range = sqrt (300000.0); > > > > is the right way to do it. > > I'm sorry, I wasn't using commas... but at the same time I wasn't using > .0. so perhaps it was being type casted wrong. > > but I tested it > a=sqrt(10001.0); > > returns 100516 Probably some bug with printf format when printing the result. Unless you post some real code we can work with, we could go on guessing like that till Kingdom Come.