delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/17/03:13:43

Date: Sat, 17 Mar 2001 10:11:45 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: James W Sager Iii <sager+@andrew.cmu.edu>
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

> Date: Sat, 17 Mar 2001 01:57:55 -0500 (EST)
> From: James W Sager Iii <sager+@andrew.cmu.edu>
> >  
> > 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019