Skip to content

Commit

Permalink
Prettier error for asin (JuliaLang#40010)
Browse files Browse the repository at this point in the history
Fonts with ligatures display `"asin(x) is not defined for |x|>1."` as `|x▷1`. The spaces fix this. For `acos` the message is already fine.
  • Loading branch information
karajan9 authored and ElOceanografo committed May 4, 2021
1 parent 2cd9548 commit a0d6c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/special/trig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ end
flipsign(Float32(pi/2 - 2*(s + s*tRt)), x)
end

@noinline asin_domain_error(x) = throw(DomainError(x, "asin(x) is not defined for |x|>1."))
@noinline asin_domain_error(x) = throw(DomainError(x, "asin(x) is not defined for |x| > 1."))
function asin(x::T) where T<:Union{Float32, Float64}
# Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
# we approximate asin(x) on [0,0.5] by
Expand Down

0 comments on commit a0d6c4b

Please sign in to comment.