b2 icon indicating copy to clipboard operation
b2 copied to clipboard

mpfr_complex allows implicit conversions from integral and real types

Open ofloveandhate opened this issue 9 years ago • 2 comments

The provided mpfr complex type allows implicit conversion from integral types, and mpfr_float. double conversion is disallowed.

this is currently the case to allow some operators in Eigen to work, because they rely on implicit conversions to double from integral types. however, for multiple precision types, this is a performance liability, both in terms of the creation of the temporary high-precision number, as well as using complex-complex arithmetic rather than complex-real.

perhaps in Eigen 3.3, this will be fixed. if not, we will need to prompt them to fix this, particularly for *= operators, where I originally found the implicit conversion was happening.

in short, please add explicit to constructors for mpfr_complex in Bertini2.

ofloveandhate avatar Apr 11 '16 20:04 ofloveandhate

this is not fixed in 3.3. maybe 3.4? until eigen fixes this, we probably cannot remove these conversions.

ofloveandhate avatar Sep 01 '16 22:09 ofloveandhate

i have asked two questions about this:

solution for the two decompositions, but not yet for *=. so almost there, but not quite.

ofloveandhate avatar Apr 18 '17 19:04 ofloveandhate