Specifying precision in vector<mpf_class>?

Niels Möller nisse@lysator.liu.se
15 Aug 2003 17:25:43 +0200

gerardo.ballabio@unimib.it (Ballabio Gerardo - Dip. di Scienza dei Materiali) writes:

> A possible difficulty with templates is that we'd lose the possibility
> to resize an mpf_class, and in particular it would be impossible to
> declare an mpf_class without knowing in advance what we want its size
> to be. But probably this is something that will occur very rarely.

It might make sense to let the template parameter only specify a
*default* precision for the instances, and still allow the actual
precision to be changed at runtime. Ideally, the C++ classes should be
written so that they are independent of the global default precision
of the C interface. Don't know how hard or easy that is to implement,