Performance (Modified by Herr Witten)

Herr Witten lingwitt at
Tue Feb 24 20:35:44 CET 2004

Couldn't the array simply hold the address to each one? Why is this 
address affected by precision? Please talk to me like a laymen. Thank 

This works:

mpf_t array[4];
mpf_init2(array[1], 1000000);
mpf_init2(array[3], 1000000);

mpf_set_d(array[1], 100);
mpf_set_d(array[2], 100);
mpf_set_d(array[3], 200);
mpf_add(array[1], array[1], array[2]);
mpf_add(array[4], array[1], array[3]);
mpf_out_str(stdout, 10, 10, array[4]);

On 24 Feb 2004, at 6:46 PM, Kevin Ryde wrote:

> Herr Witten <lingwitt at> writes:
>> Why not for mpfs? My impressions was that an array of pointers remains
>> the same.
> The way I rigged up GMP::Mpf allows a different precision for each mpf
> object, so it's not possible to just take them from a common pool (in
> general).

More information about the gmp-discuss mailing list