Handle better constants (in particular imaginary unit)
Some constants are created over and over in several places, in particular the imaginary unit in multiprecision - see e.g. !2 (comment 6046682) .
One should centralize them, e.g. in IW2D.h
Some constants are created over and over in several places, in particular the imaginary unit in multiprecision - see e.g. !2 (comment 6046682) .
One should centralize them, e.g. in IW2D.h
mentioned in merge request !2 (merged)
Another fix along the same lines is the shorthand aliases for amp.ampf[PRECISION]
and amp.campf[PRECISION]
, and optionally also the equivalent C++ constructors. Currently, in the python code they are mostly shortened to fMP
and cMP
, but the less abbreviated floatMP
and complexMP
might be better. It should at least be the same everywhere (including comments and docstrings), and the README
should explain it clearly.
It is also an idea to create (python or C++) functions called this instead, to also have some rudimentary input verification, see issue #13. If functions are made, then it might also be necessary to define types for type hinting as well, but that shouldn't be a big problem.
changed the description
agreed. For the last point and issue #13, I wonder if we shouldn't report the issue to ALGLIB, instead (or on top) of creating our own fix.