Convergence problems with Intel's 8.0 C++ compiler

Kevin Ryde user42 at
Thu Mar 4 07:16:42 CET 2004

I'll add these words to the manual,

 - Function: void mpf_class::operator= (type OP)
     Convert and store the given OP value to an `mpf_class' object.  The
     same types are accepted as for the constructors above.

     Note that `operator=' only stores a new value, it doesn't copy or
     change the precision of the destination, instead the value is
     truncated if necessary.  This is the same as `mpf_set' etc.  Note
     in particular this means for `mpf_class' a copy constructor is not
     the same as a default constructor plus assignment.

          mpf_class x (y);   // x created with precision of y
          mpf_class x;       // x default precision
          x = y;             // value truncated to that precision

     Applications using templated code may need to be careful about the
     assumptions the code makes in this area, when working with
     `mpf_class' values of various different or non-default precisions.
     For instance implementations of the standard `complex' template
     have been seen in both styles above, though of course `complex' is
     normally only actually specified for use with the builtin float

More information about the gmp-discuss mailing list