diff --git a/src/IrrationalConstants.jl b/src/IrrationalConstants.jl index e9c2b27..c61978f 100644 --- a/src/IrrationalConstants.jl +++ b/src/IrrationalConstants.jl @@ -26,7 +26,8 @@ export logten, # log(10) logπ, # log(π) log2π, # log(2π) - log4π # log(4π) + log4π, # log(4π) + invℯ, inve # 1 / ℯ include("stats.jl") diff --git a/src/stats.jl b/src/stats.jl index c221961..ce1dacc 100644 --- a/src/stats.jl +++ b/src/stats.jl @@ -28,3 +28,6 @@ @irrational logπ 1.1447298858494001741 log(big(π)) @irrational log2π 1.8378770664093454836 log(2 * big(π)) @irrational log4π 2.5310242469692907930 log(4 * big(π)) + +@irrational invℯ 0.367879441171442321595 inv(big(ℯ)) +const inve = invℯ # ASCII alias diff --git a/test/runtests.jl b/test/runtests.jl index 0bab199..0ac1257 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -40,3 +40,7 @@ end @test isapprox(log(4pi), log4π) end +@testset "1/e" begin + @test isapprox(invℯ, exp(-1)) + @test isapprox(inve, exp(-1)) +end