Skip to content

Fix support for small floats - #114

Closed
TendTo wants to merge 1 commit into
cvc5:mainfrom
TendTo:patch-1
Closed

Fix support for small floats#114
TendTo wants to merge 1 commit into
cvc5:mainfrom
TendTo:patch-1

Conversation

@TendTo

@TendTo TendTo commented Jun 2, 2026

Copy link
Copy Markdown

This solves the issue with RealVal where some smaller values (in absolute terms) would cause an issue when converted to string, since they use the scientific notation.
Alternatively, the mkReal should be updated to support the e notation.

Some examples that would be fixed by this change:

cvc5.pythonic.RealVal(1e-5) # => "0.0000100000"
"1/100000"
cvc5.pythonic.RealVal(-1e-5) # => "-0.0000100000"
"-1/100000"
cvc5.pythonic.RealVal(1e-50)
"8424983333484575/842498333348457493583344221469363458551160763204392890034487820288"
cvc5.pythonic.RealVal(-1e-50)
"-8424983333484575/842498333348457493583344221469363458551160763204392890034487820288"

This solves the issue with RealVal where some smaller values (in absolute terms) would cause an issue when converted to string, since they use the scientific notation.
@daniel-larraz

Copy link
Copy Markdown
Contributor

Thank you for reporting this issue. Closing this PR in favor of PR #117.

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