Source context

Rust library

classify

This is Rust standard-library source from the compiler version used in the run.

779     #[stable(feature = "rust1", since = "1.0.0")]780     #[rustc_const_stable(feature = "const_float_classify", since = "1.83.0")]781     #[must_use]782     pub const fn classify(self) -> FpCategory {783         // We used to have complicated logic here that avoids the simple bit-based tests to work784         // around buggy codegen for x87 targets (see785         // https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none

Aeneas declaration

Aeneas generated this declaration for a Rust library operation. Any authored model recorded for this operation is shown below.

@[rust_fun "core::f64::{f64}::classify"]
axiom core.f64.F64.classify : F64 → Result core.num.FpCategory

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: ModelF64Classify]
def ModelF64Classify : F64 -> Result core.num.FpCategory :=
-- BODY
  Binary64ModelDefault.classify
end dec2flt_model
Operations used here

FpCategory · Rust library

Source details
Declarationcore.f64.F64.classify
File/rustc/library/core/src/num/f64.rs
Lines782:4–782:45
Program versionOriginal program