Skip to content

Commit 41ec0fc

Browse files
committed
clarify the role of non-determinism for float in const
1 parent 1bce3f7 commit 41ec0fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

text/0000-float-semantics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ And there is a caveat: while IEEE specifies that float operations can never outp
1616
That means the only way to ever see a signaling NaN in a program is to create one with `from_bits` (or equivalent unsafe operations).
1717

1818
Floating-point operations at compile-time follow the same specification. In particular, since operations are non-deterministic, the same operation can lead to different bit-patterns when executed at compile-time (in a `const` context) vs at run-time.
19+
Of course, the compile-time interpreter is still deterministic. It is entirely possible to implement a non-deterministic language on a deterministic machine, by simply making some fixed choices. However, we will not specify a particular choice, and we will not guarantee it to remain the same in the future.
1920

2021
# Motivation
2122
[motivation]: #motivation

0 commit comments

Comments
 (0)