help-octave
[Top][All Lists]
Advanced

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

Re: Matlab to Octave - precision and differential equations


From: Jordi Gutiérrez Hermoso
Subject: Re: Matlab to Octave - precision and differential equations
Date: Fri, 1 Oct 2010 14:09:16 -0500

On 1 October 2010 13:57, Doug Stewart <address@hidden> wrote:
> I mean that Matlab is only precise up to 16 digits.

This is not exactly right. It's approximately 16 decimal digits,
sometimes only 15. The mantissa is 52 bits, that's more accurate.

> I need higher precision for my purposes.

Octave does not have a long double or quad type. Most hardware doesn't
implement it, so you would suffer a considerable speed penalty if
going from hardware floats (doubles) to long doubles or quads. Perhaps
you have hardware that implements quadruple precision?

I see that long double is used internally for some things, but there's
not even a guarantee that your compiler/hardware will implement long
doubles to be larger than doubles. The C++ standard allows both to be
the same size.

The sources can probably be hacked to use long doubles, although I
expect this to be a very difficult task. Most of the source code I've
read assumes that long doubles are not used.

HTH,
- Jordi G. H.


reply via email to

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