Skip to content

Fix support for small floats#114

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

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

Conversation

@TendTo
Copy link
Copy Markdown

@TendTo TendTo commented Jun 2, 2026

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.
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.

1 participant