Program Rust
from_u64
This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.
260 // must fail the assertion above `MAX_MANTISSA_FAST_PATH` and return the261 // exact binary64 conversion at or below that bound.262 #[charon::opaque]263 fn from_u64(v: u64) -> Self {264 debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);265 v as _266 }267 }268 269 #[inline]Aeneas declaration
The Lean below was mechanically extracted by Aeneas from Rust.
axiom F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
: Std.U64 → Result F64Authored Lean model
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64FromU64]
def ModelF64FromU64 : Std.U64 -> Result F64 :=
-- BODY
Binary64ModelDefault.fromU64
end dec2flt_model
Source details
| Declaration | F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64 |
|---|---|
| File | num/imp/../../dec2flt/mod.rs |
| Lines | 263:4–266:5 |
| Program version | Original program |