Bug in gmp/mpfr/mpc, never ending ctan computation

Torbjörn Granlund tg at gmplib.org
Mon Nov 19 11:37:16 UTC 2018


Richard Biener <rguenther at suse.de> writes:

  :/  But then with GCC we want deterministic behavior -- ISL
  added some "computation budget" and error reporting if that was
  taken up.  Maybe gmp/mpfr/mpc could consider adding such a thing
  (reporting budget overruns via a signal could be acceptable if
  the API churn would be too bad for another way).

I'll leave this up to the mpc maintainers.

  > I simplified your test case using 1 as the real part and an integer for
  > the imaginary part.  With the real part set to 10000, the computation
  > finishes in about 10 seconds, with every doubling of it the runtime
  > almost triples.  (If my observation generalises to an extended real part
  > range, the compilation for your test case should terminate in about
  > 10*3^log2(4.045689747817175388336181640625e+8/10000)/3600/24/365 years.)

  Ick.  I wonder if the actual ctan result is infinite or we just
  fail to compute it in an efficient manner...

The result should be extremely small, so returning Inf would be
quite inaccurate.  :-)

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-bugs mailing list