Skip to content

Conversation

@jlapeyre
Copy link
Contributor

@jlapeyre jlapeyre commented Aug 7, 2025

This applies only to the command-line program. If the user does not pass --dps, then mpmath.mp.dps is calculated from epsilon. The heuristic used is borrowed from the Haskell version of gridsynth.

See #5 (comment)

This applies only the command-line program. If the user does not pass --dps,
then mpmath.mp.dps is caculcated from epsilon. The heuristic used is borrowed
from the Haskell version of gridsynth.
mpmath.mpmathify(theta) and mpmath.mpmathify(f"{theta}") gives different results, so I updated the code. Minimum example is the following:

mpmath.mp.dps = 50
print(f'\n{mpmath.mpmathify(0.3)=}')
print(f'{mpmath.mpmathify("0.3")=}')
#mpmath.mpmathify(0.3)=mpf('0.29999999999999998889776975374843459576368331909179688')
#mpmath.mpmathify("0.3")=mpf('0.29999999999999999999999999999999999999999999999999987')
@NnktYoshioka NnktYoshioka merged commit c9c1131 into quantum-programming:main Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants