fplll icon indicating copy to clipboard operation
fplll copied to clipboard

Type conversion to dd_real/qd_real

Open gilvillard opened this issue 8 years ago • 3 comments

I have made a pull request modifying nr_FP_misc.inl, set_f, the conversion from mpz_t to dd_real was using a unique mpz_get_d, and nr_FP_dd.inl, set_mpfr, the conversion from mpfr to dd_real was using a unique mpfr_get_ld.

It seems however (?) that the wrapper was gaining with dd_real compared to double and long double.

Since a conversion to doubles was used, for instance in:

  • gso.cpp: bf(i, j).set_z(b(i, j));
  • gso.h: f.set_z(g(i, j));
  • gso_gram.h: f.set_z((*gptr)(i, j));

I am not sure to understand why things were working. With the initial truncation of the integer basis with doubles, the backward error is at double precision.

It remains to check things with qd_real also.

gilvillard avatar Sep 27 '17 16:09 gilvillard

Thanks! You also edited qd_real in the PR, so does that mean we can close this ticket after merging the PR, or is there anything else left open?

malb avatar Sep 27 '17 22:09 malb

Not sure we should close, I would say that the conversion set_z in nr_FP_misc.inl from mpz_t to qd_real also has to be modified. This type of conversion is also occurring in the branch float128 (set_z from mpz_t to __float128).

gilvillard avatar Sep 28 '17 07:09 gilvillard

Makes sense, thanks

malb avatar Sep 28 '17 07:09 malb