Requirements · Revised program

Revised program

32 proved

64-bit target · Overflow checks enabled

Scope, assumptions and build configuration

Each verdict applies to its stated requirement and conditions, the composed model, and the listed assumptions. Read the assumptions

Requirements and conditions

These requirements concern the program version shown here and its composed model, under the selected configuration and assumptions. Their verdicts appear below.

Selected targetx86_64-unknown-linux-gnu
Pointer width64
Overflow checksTrue
Debug assertionsenabled
Cargo features
  • {
      "features": [
        "default"
      ],
      "name": "dec2flt-model",
      "source": "workspace:Cargo.toml",
      "version": "0.1.0"
    }
Extraction profiledev

Conditional totality

dec2flt
Conditional totality. For every Rust string of byte length at most 3458764513820540928 bytes, the function terminates normally with a float result or parsing error, without panicking. This requirement includes executions with integer overflow checks enabled and applies to numeric, special, invalid, empty and sign-only inputs.

Conditional exact rounding

dec2flt
Conditional exact rounding. On acceptance of any numeric literal whose complete Rust string has byte length at most 576460752303421440 bytes, the returned float is its ordinary mathematical exact decimal value rounded to binary64 round-to-nearest, ties-to-even. This includes subnormal results, signed zero with the literal's lexical sign, and overflow to infinity with that sign. The explicit exponent has its ordinary mathematical meaning; no restriction on its digit count or value is added beyond the stated complete-string byte-length bound.
Configuration and exclusions — authored setup excerpts
The reference is upstream/traits.rs plus the nine upstream/dec2flt/ files. work/crate packages this supplied slice as one standalone no_std library, dec2flt-model, edition 2024. lib.rs, num/mod.rs, and num/imp/mod.rs restore the missing core::num::imp namespace through path attributes and re-exports of actual core primitives, not replacement arithmetic. The local ParseFloatError preserves the two payload-free error kinds and construction paths. GOAL.md observes Ok versus Err, not error formatting; the omitted formatting/error API is outside those observations. No external dependency or additional executable is part of extraction.
The configured tools in config.json and tool-identities.json select nightly-2026-06-01, whose rustc host is x86_64-unknown-linux-gnu (64-bit usize/isize, SSE2). rust-toolchain.toml also records that channel and target. Cargo's default features are empty: optimize_for_size is disabled, preserving the ordinary native shortcut. Development debug assertions are enabled; overflow-checks = true is explicit in both dev and release profiles. Thus checked arithmetic and assertion failure remain observable. The unchanged fpu code selects its no-op precision-setting branch on this target.

These results apply to the stated requirements, builds and platform premises. Trust and assumptions · Exact requirement collection

Requirements and results

32 requirements. Open a requirement for its full statement, proof or counterexample, and related source.

Requirements for dec2flt appear first. Supporting specifications and helper contracts follow.

RequirementRevised program
Conditional totality

For every Rust string of byte length at most 3 EiB, the function terminates normally with a float result or parsing error, without panicking. …

Proved — Conditional totality
Conditional exact rounding

On acceptance of any numeric literal whose complete Rust string has byte length at most ≈ 512 PiB, the returned float is its ordinary mathematical exact decimal value rounded to binary64 round-to-nearest, ties-to-even. …

Proved — Conditional exact rounding
Conditional numeric acceptance

Every numeric literal whose complete Rust string has byte length at most 3 EiB returns normally with Ok, without panicking, including executions with integer overflow checks enabled. …

Proved — Conditional numeric acceptance
Conditional invalid rejection

Every Rust string of byte length at most 3 EiB that is outside the numeric and special literal grammar returns normally with Err, without panicking, including executions with integer overflow checks enabled. …

Proved — Conditional invalid rejection
NaN acceptance

Every NaN literal returns Ok of a float satisfying is_nan().

Proved — NaN acceptance
Conditional accumulated-value diagnostic

Every accepted numeric literal whose complete Rust string has byte length at most 3 EiB is rounded to its accumulated-exponent value, retaining every significand digit and interpreting the explicit exponent using the …

Proved — Conditional accumulated-value diagnostic
Conditional equal-target bridge

On acceptance of a numeric literal whose complete Rust string has byte length at most 3 EiB and whose ordinary mathematical exact value and source-defined accumulated-exponent value have the same binary64 rounding …

Proved — Conditional equal-target bridge
Infinity

Every infinity literal returns Ok of the infinity with its lexical sign.

Proved — Infinity
No spurious NaNs

Every successful result for an input other than a NaN literal is not NaN.

Proved — No spurious NaNs
Numeric sign

Every successful numeric result has the literal's lexical sign, including results that underflow to zero or overflow to infinity.

Proved — Numeric sign
Selected exponent range

On a successful numeric parse, each raw pair selected by the dispatcher for final float assembly has a biased exponent in 0..=2047.

Proved — Selected exponent range
Selected magnitude sign

On a successful numeric parse, the assembled word of each raw pair selected for final float assembly has a clear sign bit.

Proved — Selected magnitude sign
Signed zero

On acceptance, a numeric literal denoting zero returns zero with its lexical sign.

Proved — Signed zero
Conditional abstract composition
Statement and local notation

Let A = 3 EiB and B = ≈ 512 PiB. …

Proved — Conditional abstract composition
Conditional component compliance
Statement and local notation

Let A = 3 EiB and B = ≈ 512 PiB. …

Proved — Conditional component compliance
Supporting specifications and helper contracts
Classification totality

Mathematical specification Classification totality. …

Proved — Classification totality
Rounding totality

Mathematical specification Rounding totality. …

Proved — Rounding totality
Conditional numeric acceptance

Every nonempty source-valid byte slice of length at most 3 EiB that forms an unsigned numeric literal returns normally with Some. …

Proved — Conditional numeric acceptance
Conditional invalid rejection

Every nonempty source-valid byte slice of length at most 3 EiB that is not an unsigned numeric literal returns normally with None, including executions with integer overflow checks enabled. …

Proved — Conditional invalid rejection
Rejection

For every byte slice and either value of the separate sign argument, an input other than an unsigned inf, infinity, or nan keyword returns None.

Proved — Rejection
Assembly correspondence

For every BiasedFp, the function returns normally with float bits equal to the bitwise OR of its mantissa and its biased exponent cast to u64 using Rust semantics and shifted left by 52. …

Proved — Assembly correspondence
Classification determinism

Mathematical specification Classification determinism. …

Proved — Classification determinism
Significand digit

Mathematical specification Significand digit. …

Proved — Significand digit
Exponent agreement

Mathematical specification Exponent agreement. …

Proved — Exponent agreement
Correctness or defer

For all i64 exponents q and all u64 mantissas w, a normal result is either a pair with negative biased exponent (deferral) or a pair whose assembled word is the nonnegative binary64 rounding of the exact value w * 10^q.

Proved — Correctness or defer
Native correctness or defer

For every Decimal record, on normal return, the result is either None or Some of the binary64 rounding of the exact mantissa * 10^exponent, with the record's sign. …

Proved — Native correctness or defer
Conditional accumulated-value diagnostic

For every source-valid unsigned numeric byte slice of length at most 3 EiB, any returned record with many_digits = false represents its accumulated-exponent value exactly as mantissa * 10^exponent. …

Proved — Conditional accumulated-value diagnostic
Record bounds

For every nonempty byte slice, any returned record has negative = false and mantissa < 10^19.

Proved — Record bounds
Rounding determinism

Mathematical specification Rounding determinism. …

Proved — Rounding determinism
Full-significand diagnostic

For every unsigned numeric literal, a normal result is a pair whose assembled word is the nonnegative binary64 rounding of its accumulated-exponent value, retaining the full significand's contribution to rounding.

Proved — Full-significand diagnostic
Infinity

For every byte slice and either value of the separate sign argument, an unsigned infinity keyword returns Some infinity with that sign.

Proved — Infinity
NaN

For every byte slice and either value of the separate sign argument, an unsigned NaN keyword returns Some of a NaN.

Proved — NaN

Full proof structure

Browse all 447 theorems and definitions

Read the Lean and prose explanations, and follow the dependencies between declarations.