MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_integer

Function is_integer

crates/literal/src/float.rs:28–30  ·  view source on GitHub ↗
(v: f64)

Source from the content-addressed store, hash-verified

26}
27
28pub fn is_integer(v: f64) -> bool {
29 v.is_finite() && v.fract() == 0.0
30}
31
32fn format_nan(case: Case) -> String {
33 let nan = match case {

Callers 2

is_integerMethod · 0.85
to_stringFunction · 0.85

Calls 1

is_finiteMethod · 0.45

Tested by

no test coverage detected