Re: Possible F77 Code Improvement ??
- From: monir <monirg@xxxxxxxxxxxx>
- Date: Wed, 4 Mar 2009 20:40:19 -0800 (PST)
On Mar 4, 5:46 pm, Glen Herrmannsfeldt <g...@xxxxxxxxxxxxxxxx> wrote:
monir wrote:
(snip)
in order to minimize the round-off errors, sort
> the absolute values in ascending order, and then
> sum the actual values in the new order
I know that with one sign it is best to sort and add.
I am not so sure about mixed signs. I can easily imagine
that a large value of the opposite sign at the end wipes
out all the previously minimized round-off errors.
-- glen
Glen;
I believe it is the subtraction of almost equal small values that can
seriously affect the precision of the calculations.
Routine sort2d is based on N.R. Heapsort method and has been tested
extensively in the summation of very large arrays of mixed elements
ranging from extremely large to extremely small values.
Regards.
Monir
.
- References:
- Possible F77 Code Improvement ??
- From: monir
- Re: Possible F77 Code Improvement ??
- From: Glen Herrmannsfeldt
- Possible F77 Code Improvement ??
- Prev by Date: Re: Possible F77 Code Improvement ??
- Next by Date: Re: Can an executable ask itself how and when it was compiled?
- Previous by thread: Re: Possible F77 Code Improvement ??
- Next by thread: Re: Possible F77 Code Improvement ??
- Index(es):
Relevant Pages
|