help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Study about accuracy of statistical software, incl. Octave


From: Jaroslav Hajek
Subject: Re: Study about accuracy of statistical software, incl. Octave
Date: Tue, 24 Mar 2009 19:38:08 +0100

On Tue, Mar 24, 2009 at 7:03 PM, Marco Caliari <address@hidden> wrote:
>> And Marco Caliari writes:
>>>
>>> The other deficiencies are much harder to fix. I will give a look.
>>
>> std() could be fixed relatively easily by calling the BLAS's
>> routines (SNRM2, DNRM2, SCNRM2, DZNRM2) rather than relying on
>> sqrt (sumsq (...)).  The half drop in precision is a typical
>> failure mode for implementations that don't scale.  I suspect
>> that fixing std() may fix corrcoef and help anova.
>
> Dear Jason,
>
> I already tried with a .m implementation of dnrm2, without any improvement.
> For interested people, the sample vector is
>
> v=[10000000.2,repmat([10000000.1,10000000.3],1,500)];
>
> whose exact mean is 10000000.2 and exact standard deviation 0.1.
>
> Best regards,
>
> Marco
>

What do you mean by "exact mean" here? I don't think any of the three
numbers are exactly representable in IEEE floating-point. It would be
better to choose numbers that have an exact representation, such as
1e7 + 0.25, 1e7 + 0.5, 1.7 + 0.75 or such. Otherwise, you can't avoid
introducing errors just by writing these numbers.

Btw., the new Octave's norm() uses a sum-scale algorithm, so it won't
overflow unless the result overflows. See liboctave/oct-norm.cc for
details.




-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]