dune-community / dune-xt-common

Other
2 stars 3 forks source link

from_string<std::complex<...>>() broken for certain strings #39

Closed ftalbrecht closed 4 years ago

ftalbrecht commented 6 years ago

Our convention is to interprete strings of the kind "a+bi" and "a-bi" as complex numbers, if a and b are string representations of real numbers. This does not work if a is given in scientifi notation, i.e. 1e-10.

ftalbrecht commented 6 years ago

Probably the easiest fix would be to change our interpretation of complex to "(a,b)". This is easier to parse, does not interfer with the rest of the string parsing (we only use "[" and ";") and is the format we have when printing std::complex via std::cout (So one can easily copy printed complex numbers).

renefritze commented 6 years ago

I'd be happy with the tuple notation

tobiasleibner commented 4 years ago

Moved to dune-xt.