Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding when using very large integers #264

Open
rasheedja opened this issue Mar 9, 2022 · 1 comment
Open

Rounding when using very large integers #264

rasheedja opened this issue Mar 9, 2022 · 1 comment
Assignees
Labels

Comments

@rasheedja
Copy link

Summary

When using very large integers in dReal, unexpected rounding occurs.

Example

(set-logic QF_NRA)
; 9000000000000000 = 9e15
(assert (not (= (+ 9000000000000000 9000000000000001) (+ 9000000000000000 9000000000000000))))
(check-sat)
(get-model)
(exit)

When running dreal --precision 1e-100 file_name.smt2 on the above program, dReal decides unsat when the result should be delta-sat.

Version Info

dReal version:
dReal v4.21.06.2 (Release Build) : delta-complete SMT solver
OS:

$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

Compiler:

$ g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@soonhokong
Copy link
Member

Thanks for the report. This bug is due to the use of IEEE-754 double to represent integer values and constant folding using double. I'll resolve the issue and ping you here later.

@soonhokong soonhokong self-assigned this Mar 9, 2022
@soonhokong soonhokong added the bug label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants