Closed
Description
Sub-tracking issue for rust-lang/rfcs#911.
This tracks arithmetic for floating point types in const fn
. These operations are already stable in const
/static
, and are also being promoted on stable (&(1.2*2.1)
has lifetime 'static
). However, in all of these situations, the code is definitely executed at compile-time -- only const fn
code could be executed both at compile-time and run-time, making possible differences in FP behavior observable. Also see #77745.
Open Questions
- Must a
const fn
behave exactly the same at runtime as at compile-time? #77745: Must aconst fn
behave exactly the same at runtime as at compile-time? - See Our floating point semantics were a mess unsafe-code-guidelines#237 for a collection of issues around floating-point semantics.
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: An issue tracking the progress of sth. like the implementation of an RFCCall for participation: Hard difficulty. Experience needed to fix: A lot.Status: There are blocking design concerns.Relevant to the language team, which will review and decide on the PR/issue.This change is large or controversial enough that it should have an RFC accepted before doing it.
Activity