[Maxima] New fpprec default value (Was Re: Precision of float and bfloat)
macrakis at alum.mit.edu
Mon Oct 26 18:05:35 CDT 2009
Unlike machine float implementations which pack mantissa and exponent into
an integral number of machine words, the current bfloat implementation uses
Lisp bignum integers for the mantissa and stores the exponent separately, so
by the "optimal use of the processor" argument the "natural" precisions are
18 decimal digits (64 bits), 27 decimal digits (96 bits), 37 decimal digits
(128 bits), etc. (Though calculation actually uses numbers up to twice that
big.) That said, bignum arithmetic is making far from optimal use of the
But I think we should start with mathematical requirements, not with machine
requirements. Is there a principled reason, for example, to want twice as
many digits as the base precision? Is there some important or common class
of calculation where that is the natural next step?
On Mon, Oct 26, 2009 at 5:52 PM, John Ogilvie <ogilvie at cecm.sfu.ca> wrote:
> One option on former DEC VAX computers for technical computing was
> 'quadruple' precision, which required -- according to my limited
> understanding -- four 32-bit words for each such value with up to 32
> decimal digits. If the standard precision of a 'float' be ~15 decimal
> digits, then it seems reasonable that about double that precision might
> be the default, although the option of setting the precision to greater
> or lesser extents would presumably remain. By analogy with 16 decimal
> digits that might be standard with a 64-bit processor, doubling that amount
> for default extended precision would seem likely to be a useful
> choice, extending significantly the precision but permitting perhaps
> optimal use of the processor in implementing this with software. Does
> the IEEE standard involving 80 bits and hence about 20 decimal digits
> have any bearing on this issue?
> On Mon, 26 Oct 2009, Stavros Macrakis wrote:
> Could you make your argument more explicit, please? Yes, the default
>> floats are 15+ decimal digits; why does that imply that 32 decimal digits
>> are the appropriate number for fpprec? Because that is double the number
>> decimal digits?
>> On Mon, Oct 26, 2009 at 3:04 PM, John Ogilvie <ogilvie at cecm.sfu.ca>
>> As the precision of ordinary floating point seems to be 14 - 16 decimal
>>> digits, and as many processors now have 64-bit logic as standard, perhaps
>>> 32 decimal digits should be default for 'fpprec'. One could presumably
>>> set the precision to be less that 32 decimal digits if desired.
>>> J. F. Ogilvie
>>> On Mon, 26 Oct 2009, Robert Dodier wrote:
>>> On Mon, Oct 26, 2009 at 9:52 AM, Raymond Toy <
>>> raymond.toy at stericsson.com>
>>>> I agree. I think we should change the default value of fpprec to be
>>>>> more than 16. 32 is a decent choice. Or if that's too many, perhaps
>>>>> or 25 digits.
>>>> 24 seems OK to me. I don't have a strong opinion about it.
>>>> Robert Dodier
>>>> Maxima mailing list
>>>> Maxima at math.utexas.edu
>>> Maxima mailing list
>>> Maxima at math.utexas.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima