What are real numbers in Dafny. Are they represented as IEEE 754-2008 floating point numbers? If not, then what are they? I.e., what is the specification of the real type in Dafny?
Asked
Active
Viewed 492 times
1 Answers
4
Dafny's real
numbers are not floating point numbers.
From a verification perspective, they are the mathematical real numbers, and Dafny reasons about them using Z3's theory of real arithmetic.
From a compilation perspective, Dafny actually compiles them to BigRational
s, which is made possible by the fact that Dafny doesn't have any builtin operations for creating irrational real numbers.

James Wilcox
- 5,307
- 16
- 25