dune-community / dune-xt-common

Other
2 stars 3 forks source link

reconsider DefaultEps/FloatCmp for complex numbers #35

Closed ftalbrecht closed 4 years ago

ftalbrecht commented 6 years ago

The type of the eps for complex numbers is currently complex. Thus, if we compare two complex numbers with FloatCmp::eq(a, b, 1e-15), this will be false, even if the respective real/imag entries are closer than 1e-15 to each other. IMHO, this is counterintuitive.

One way to fix this is to accept an arithmetic eps and forward this a a complex({eps, eps}) or to alwas enforce the eps to be an arithmetic type and apply this in all components.

renefritze commented 6 years ago

This was the correct behaviour though when complex was still treated as vector, right? So changing one should change the other, I agree.

tobiasleibner commented 4 years ago

Moved to dune-xt.