GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #6134

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: da Silva, Joe
Subject: Complex_SqRt bug
Date: 14 Jan 2002, 09:58:19

Well, I haven't seen the computations, but if you are happy that
they are "sound" and that they will be more accurate than the
existing algorithm, then I agree that you should use them.

The advantage of the Clipped_SqRt solution was simplicity and
clarity (and certainty;-). However, it does not change the accuracy.

Joe.

> -----Original Message-----
> From:	Frank Heckenbach [SMTP:frank@g-n-u.de]
> Sent:	Friday, January 11, 2002 12:43 PM
> To:	gpc@gnu.de
> Subject:	Re: Complex_SqRt bug
> 
> da Silva, Joe wrote:
> 
> > OK, if you're happy that the code is correct ... I guess I just don't
> > understand what the "a := Abs(Im(z)) / (2 * b)" statement does ...
> 
> I could write down the computations if you like (unless Emil has
> them readily available already) ...
> 
> > Anyway, although you might say the Clipped_SqRt solution is a
> > kludge, it is certainly not second-guessing. It would only be applied
> > where the minimum theoretical argument was zero, in which case
> > it would avoid (and eliminate) rounding errors which produced a
> > slightly negative "zero".
> 
> As I said, I'm no expert on numeric algorithms, but I think if an
> algorithm can produce such wrong results, it might also be
> inaccurate for other values and should be improved (such as
> Complex_Sqrt). After all, normal rounding doesn't easily make a
> positive value (even very close to 0) negative. So it might be
> better if the programmer sees the problem clearly with an error
> message. If it really turns out that an algorithm is as good as
> possible (numerically) and still prone to this kind of problem,
> something like Clipped_SqRt might be in order. But I guess this is
> rather an exceptional situation, so Clipped_SqRt does not seem a
> good candidate for a general library routine.
> 
> But perhaps Emil can comment better on these matters ...
> 
> Frank
> 
> -- 
> Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E
> GPC To-Do list, latest features, fixed bugs:
> http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


Replies

Author Subject Date
Frank Heckenbach Complex_SqRt bug 14 Jan 2002, 13:27:38

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).