Source context

Program Rust

from_u64

This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.

257     // the fast-path algorithm, its range proof obligation, and all calls stay258     // visible in the extracted model.259     #[charon::opaque]260     fn from_u64(v: u64) -> Self {261         debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);262         v as _263     }264 }265 266 #[inline]

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

axiom F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
  : Std.U64 → Result F64

Authored Lean model

Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.

Why this model is faithful

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
DeclarationF64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Filenum/imp/../../dec2flt/mod.rs
Lines260:4–263:5
Program versionPreparation 2