From c2a1650fe90dd4966a56a6ebdceeabef49780527 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 30 Aug 2022 20:11:07 +0200 Subject: [PATCH] avoid one invalidation of `isinf` when loading Static.jl (#46493) --- stdlib/TOML/src/print.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/TOML/src/print.jl b/stdlib/TOML/src/print.jl index 059414152f727..46c5ecc357fbd 100644 --- a/stdlib/TOML/src/print.jl +++ b/stdlib/TOML/src/print.jl @@ -78,7 +78,7 @@ printvalue(f::MbyFunc, io::IO, value::Integer; _...) = Base.print(io, Int64(value)) # TOML specifies 64-bit signed long range for integer printvalue(f::MbyFunc, io::IO, value::AbstractFloat; _...) = Base.print(io, isnan(value) ? "nan" : - isinf(value) ? string(value > 0 ? "+" : "-", "inf") : + !(isfinite(value)::Bool) ? string(value > 0 ? "+" : "-", "inf") : Float64(value)) # TOML specifies IEEE 754 binary64 for float function printvalue(f::MbyFunc, io::IO, value::AbstractString; _...) Base.print(io, "\"")