Hello,
I am currently working my way through the Julia documentation and the examples and stumble over the Euler number e. In Julia V0.6 I could still call them, but in Julia V1.0.1 I get the message “ERROR: UndefVarError: e not defined”. Does this constant no longer belong to the Julia base, is the documentation no longer correct?
Yes, that’s right. But the attempt to rework the documentation is not successful (possibly a language problem for me) because the example no longer works under V1.0:
julia> e
e = 2.7182818284590...
But julia> MathConstants.e works! Thank you for this hint!
Cheers,
Guenter
here the Link. This is pi but the next example is e. But I am very happy to see that someone is working on the documentary. The example for the constant catalan has been adapted!
Yeah, that sounds pretty weird! In version 0.6 the “quite normal” e works. I don’t think the implementation under V1.0 is well solved from the IT point of view!
e was considered too common a variable name to assign by default, particularly in situations like this:
julia> try
error()
catch
@show e
end
e = ℯ = 2.7182818284590...
(people often use e for the exception object so if they forgot it on the catch they kept logging/showing Euler’s constant). The unicode version (\euler) was not considered too short, so that export was kept. If you want the ASCII export, you can put using Base.MathConstants at the top of your function.