Skip to content

Commit

Permalink
avoid one invalidation of isinf when loading Static.jl (#46493)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha authored Aug 30, 2022
1 parent d1706d4 commit c2a1650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/TOML/src/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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, "\"")
Expand Down

0 comments on commit c2a1650

Please sign in to comment.