File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 139139end
140140
141141@testset " literal pow matches runtime pow matches optimized pow" begin
142- two = 2
143- @test 1.0000000105367122 ^ 2 == 1.0000000105367122 ^ two
144- @test 1.0041504f0 ^ 2 == 1.0041504f0 ^ two
142+ let two = 2
143+ @test 1.0000000105367122 ^ 2 == 1.0000000105367122 ^ two
144+ @test 1.0041504f0 ^ 2 == 1.0041504f0 ^ two
145+ end
145146
146147 function g2 (start, two, N)
147148 x = start
@@ -192,11 +193,13 @@ end
192193 finv (x) = f (x, - 1 )
193194 f2 (x) = f (x, 2 )
194195 f3 (x) = f (x, 3 )
195- x = 1.0000000105367122
196- @test x^ 2 == f (x, 2 ) == f2 (x) == x* x == Float64 (big (x)* big (x))
197- @test x^ 3 == f (x, 3 ) == f3 (x) == x* x* x == Float64 (big (x)* big (x)* big (x))
198- x = 1.000000007393669
199- @test x^- 1 == f (x, - 1 ) == finv (x) == 1 / x == inv (x) == Float64 (1 / big (x)) == Float64 (inv (big (x)))
196+ let x = 1.0000000105367122
197+ @test x^ 2 == f (x, 2 ) == f2 (x) == x* x == Float64 (big (x)* big (x))
198+ @test x^ 3 == f (x, 3 ) == f3 (x) == x* x* x == Float64 (big (x)* big (x)* big (x))
199+ end
200+ let x = 1.000000007393669
201+ @test x^- 1 == f (x, - 1 ) == finv (x) == 1 / x == inv (x) == Float64 (1 / big (x)) == Float64 (inv (big (x)))
202+ end
200203end
201204
202205@testset " curried approximation" begin
You can’t perform that action at this time.
0 commit comments