delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/17/02:26:30

Message-ID: <3AB30C10.317ED7C2@earthlink.net>
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
X-Mailer: Mozilla 4.76 [en] (Win95; U)
X-Accept-Language: en,zh-CN,fr,de-CH,ru
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Whats up with sqrt?
References: <0ugjCdG00UjKRAO0dP AT andrew DOT cmu DOT edu>
Lines: 21
Date: Sat, 17 Mar 2001 06:59:44 GMT
NNTP-Posting-Host: 63.210.208.97
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread1.prod.itd.earthlink.net 984812384 63.210.208.97 (Fri, 16 Mar 2001 22:59:44 PST)
NNTP-Posting-Date: Fri, 16 Mar 2001 22:59:44 PST
Organization: EarthLink Inc. -- http://www.EarthLink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

James W Sager Iii wrote:
> 
> For me, the function sqrt() which obviously returns a square root is
> messing up for me on moderately large numbers.
> 
> anything below 10,000 and it gives me about the right answer, but at like:
> 
> range = sqrt(300,000)
> 
> I get a 0 as a return value? 


The value of (300,000) is 0.
The value of (x,0) is 0.
The ',' is a comma operator.

The number you are looking for is
  300000
or
  3.0e5
(among a large number of equivalent representations).

- Raw text -


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