[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Zero or not?
From: |
Francesco Potorti` |
Subject: |
Re: Zero or not? |
Date: |
Tue, 24 Jul 2007 08:46:32 +0200 |
>> Stuff like sorting numbers by absolute value can help reduce the
>> error of the operations.
>
>This is one of methods of improvment in precission. But is very costly :(
>I made this method in one program twenty years ago ;)
>
>I can be done in octave in a simplest way:
>
> [i,i]=sort(abs(x)); s=sum(x(i));
As far as I know, Octave does not give any guarantee as to the order in
which summation is done, so while this method may work for a particular
version of Octave, I do not think that it should be recommended.
Apart from academic discussion, when using 64-bit floating point numbers
it is rare to have problems with summation of same-sign quantities. Why
do you care so much? Maybe you have cancellation errors?
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
Web: http://fly.isti.cnr.it/ Key: fly.isti.cnr.it/public.key
- Zero or not?, Matthias Brennwald, 2007/07/21
- Re: Zero or not?, Jordi Gutiérrez Hermoso, 2007/07/21
- Re: Zero or not?, Matthias Brennwald, 2007/07/21
- Re: Zero or not?, Ben Abbott, 2007/07/21
- Re: Zero or not?, Matthias Brennwald, 2007/07/22
- Re: Zero or not?, James Sherman Jr., 2007/07/22
- Re: Zero or not?, Matthias Brennwald, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/23
- Re: Zero or not?, James Sherman Jr., 2007/07/23
- Re: Zero or not?, Miroslaw Kwasniak, 2007/07/23
- Re: Zero or not?,
Francesco Potorti` <=
- Re: Zero or not?, kensmith, 2007/07/24
- Re: Zero or not?, Przemek Klosowski, 2007/07/24
- Re: Zero or not?, kensmith, 2007/07/24
- Re: Zero or not?, Francesco Potorti`, 2007/07/22
- Re: Zero or not?, Miroslaw Kwasniak, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/23
- Re: Zero or not?, kensmith, 2007/07/23
- Re: Zero or not?, Przemek Klosowski, 2007/07/23
- Re: Zero or not?, Robert A. Macy, 2007/07/21
Re: Zero or not?, Bob Weigel, 2007/07/21