bug-gmp
[Top][All Lists]
Advanced

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

Re: Feature request


From: Torbjorn Granlund
Subject: Re: Feature request
Date: 06 Oct 2002 23:00:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Garrett Kajmowicz <address@hidden> writes:

  I would like to see the ability to do floating point exponentials
  with the mpf class.  As it stands I now have to convert to double
  precision, exponentiate and convert back.
  
Sorry, no such thing in mpf.  As Paul suggested, you might want to
look at mpfr (--enable-mpfr).

  I would also like to ask about precision.  I am doing some work (all in 
  mpf_class using c++) for matrix solving.  Anyways, when I do a few matrix 
  operations which usually result in something to the effect of 1/3 -1/3 the 
  answer should be zero.  I am aware of the limitations of floating point 
  numbers, but for some reason no matter how much I increased the precision of 
  the mpf_class objects, the result was always the same, roughly 1e-24, using 
  the cout << temp function to output the value.  Do you know why the value 
  will not drop down further (say 1e-50) when I increate to 16k bits of 
  precision?
  
This sounds a bit like a bug in mpf.  Please investigate and report.

  As well, is there a possability of adding a function which will 
  increase/decrease an mpf number by the minimal step size possible given the 
  current precision?  This might temporarily provide an answer to the above 
  problem.
  
The minimal step size is 32 bits for a 32-bit computer and 64 bits for
a 64-bit computer.

-- 
Torbjörn




reply via email to

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