Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit f5e9f3c

Browse files
committedFeb 26, 2014
Fix doc example of @test_approx_eq_eps precision argument
`e-2` means Euler's number minus two. I guess original author wanted to mean `10^-2`
1 parent 8854bad commit f5e9f3c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎doc/stdlib/test.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ As floating point comparisons can be imprecise, two additional macros exist taki
5757

5858
julia> @test_approx_eq 1. 0.9999999999999
5959

60-
julia> @test_approx_eq_eps 1. 0.999 e-2
60+
julia> @test_approx_eq_eps 1. 0.999 1e-2
6161

62-
julia> @test_approx_eq_eps 1. 0.999 e-3
63-
ERROR: assertion failed: |1.0 - 0.999| < -0.2817181715409549
62+
julia> @test_approx_eq_eps 1. 0.999 1e-3
63+
ERROR: assertion failed: |1.0 - 0.999| <= 0.001
6464
1.0 = 1.0
6565
0.999 = 0.999
66-
in test_approx_eq at test.jl:75
66+
difference = 0.0010000000000000009 > 0.001
67+
in error at error.jl:22
68+
in test_approx_eq at test.jl:68
6769

6870
Handlers
6971
________

0 commit comments

Comments
 (0)
This repository has been archived.