www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/29/08:42:02

From: XXguille AT XXiies DOT XXes (Guillermo Rodriguez Garcia)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: multidimensional arrays and math inaccuracy
Date: Sat, 29 May 1999 11:48:03 GMT
Organization: Telefonica Transmision de Datos
Lines: 19
Message-ID: <374f3132.519315@noticias.iies.es>
References: <374edbb4 DOT 18530235 AT news DOT ndh DOT net>
NNTP-Posting-Host: iies217.iies.es
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.451
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

El día Fri, 28 May 1999 18:22:17 GMT, f DOT natter AT ndh DOT net (Felix Natter)
escribió:

>solution (in this code it's .2, .4, .2), there will be a math
>inaccuracy: where an entry should have been reduced to 0.0, it becomes
>something*10^(-15), resulting in the algorithm continuing and giving a

There is a limit on the 'double' accuracy (this doesn't only happen in
DJGPP; every C compiler will have the same problem), so if you are not
using some arbitrary-precision math library (gnu has one), that is, if
you are using the standard double type and the standard math.h, just
check the values you get and interpret those below a given threshold
as zero.

Regards:
GUILLE
----
Guillermo Rodriguez Garcia
XXguille AT XXiies DOT XXes (ya sabes :-)

- Raw text -


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