Skip to content

Commit b10b1dd

Browse files
ranochaKristofferC
authored andcommitted
avoid one invalidation of isinf when loading Static.jl (#46493)
(cherry picked from commit c2a1650)
1 parent 8421c03 commit b10b1dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/TOML/src/print.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ printvalue(f::MbyFunc, io::IO, value::Integer; _...) =
7878
Base.print(io, Int64(value)) # TOML specifies 64-bit signed long range for integer
7979
printvalue(f::MbyFunc, io::IO, value::AbstractFloat; _...) =
8080
Base.print(io, isnan(value) ? "nan" :
81-
isinf(value) ? string(value > 0 ? "+" : "-", "inf") :
81+
!(isfinite(value)::Bool) ? string(value > 0 ? "+" : "-", "inf") :
8282
Float64(value)) # TOML specifies IEEE 754 binary64 for float
8383
function printvalue(f::MbyFunc, io::IO, value::AbstractString; _...)
8484
Base.print(io, "\"")

0 commit comments

Comments
 (0)