JuliaHomotopyContinuation / HomotopyContinuation.jl

A Julia package for solving systems of polynomials via homotopy continuation.
https://www.JuliaHomotopyContinuation.org
MIT License
178 stars 30 forks source link

Promote parametric type in IComplex constructor. #486

Closed LauraBMo closed 2 years ago

LauraBMo commented 2 years ago

Working with polynomials with big coefficients I had an "ERROR: MethodError:..." for the IComplex constructor. This PR solved the problem. An MWE to reproduce the error:

const HCIA = HomotopyContinuation.IntervalArithmetic
HCIA.IComplex(HCIA.Interval(1, big(2)), HCIA.Interval(0,1))

Interval constructor handles the type promotion in line 30, but for IComplex is missing. This PR aims to add it.

PBrdng commented 2 years ago

Hi, this looks like a nice bug fix. Thank you!