Closed edbennett closed 5 months ago
I thought it was required by mpmath. I remember reading mpf() can take integers or strings but no floats. I might be wrong :)
The documentation suggests that's it's supported, but it does raise concerns when promoting to higher precision. I can see the logic behind this—the example in the notes is for literals, but it can also apply for parameters.
It might be worth adding a comment along the lines of
# Round trip via a string to avoid introducing spurious precision
# per recommendations at https://mpmath.org/doc/current/basics.html
Solved.
In https://github.com/LupoA/rhos/blob/3bcbd9021027c56247efeec45a485409975575ef/rhos/HLT_class.py#L42, why do some variables get turned into strings, only then to get turned into
mpf
objects? This should not be necessary, and increases confusion reading the code.