@@ -667,16 +667,19 @@ end
667
667
@test string (parse (BigFloat, " 0.1" )) == " 0.10000002"
668
668
@test string (parse (BigFloat, " 0.5" )) == " 0.5"
669
669
@test string (parse (BigFloat, " -9.9" )) == " -9.9000015"
670
+ @test string (parse (BigFloat, " 1e6" )) == " 1.0e6"
670
671
end
671
672
setprecision (40 ) do
672
673
@test string (parse (BigFloat, " 0.1" )) == " 0.10000000000002"
673
674
@test string (parse (BigFloat, " 0.5" )) == " 0.5"
674
675
@test string (parse (BigFloat, " -9.9" )) == " -9.8999999999942"
676
+ @test string (parse (BigFloat, " 1e6" )) == " 1.0e6"
675
677
end
676
678
setprecision (123 ) do
677
679
@test string (parse (BigFloat, " 0.1" )) == " 0.0999999999999999999999999999999999999953"
678
680
@test string (parse (BigFloat, " 0.5" )) == " 0.5"
679
681
@test string (parse (BigFloat, " -9.9" )) == " -9.8999999999999999999999999999999999997"
682
+ @test string (parse (BigFloat, " 1e6" )) == " 1.0e6"
680
683
end
681
684
end
682
685
@testset " eps" begin
@@ -998,18 +1001,18 @@ end
998
1001
999
1002
test_show_bigfloat (big " 1.23456789" , contains_e= false , starts= " 1.23" )
1000
1003
test_show_bigfloat (big " -1.23456789" , contains_e= false , starts= " -1.23" )
1001
- test_show_bigfloat (big " 2.3457645687563543266576889678956787e10000" , starts= " 2.345" , ends= " e+10000 " )
1004
+ test_show_bigfloat (big " 2.3457645687563543266576889678956787e10000" , starts= " 2.345" , ends= " e10000 " )
1002
1005
test_show_bigfloat (big " -2.3457645687563543266576889678956787e-10000" , starts= " -2.345" , ends= " e-10000" )
1003
1006
test_show_bigfloat (big " 42.0" , contains_e= false , starts= " 42.0" )
1004
1007
test_show_bigfloat (big " 420.0" , contains_e= false , starts= " 420.0" ) # '0's have to be added on the right before point
1005
1008
test_show_bigfloat (big " -420.0" , contains_e= false , starts= " -420.0" )
1006
1009
test_show_bigfloat (big " 420000.0" , contains_e= false , starts= " 420000.0" )
1007
1010
test_show_bigfloat (big " 654321.0" , contains_e= false , starts= " 654321.0" )
1008
1011
test_show_bigfloat (big " -654321.0" , contains_e= false , starts= " -654321.0" )
1009
- test_show_bigfloat (big " 6543210.0" , contains_e= true , starts= " 6.5" , ends= " e+06 " )
1012
+ test_show_bigfloat (big " 6543210.0" , contains_e= true , starts= " 6.5" , ends= " e6 " )
1010
1013
test_show_bigfloat (big " 0.000123" , contains_e= false , starts= " 0.000123" )
1011
1014
test_show_bigfloat (big " -0.000123" , contains_e= false , starts= " -0.000123" )
1012
- test_show_bigfloat (big " 0.00001234" , contains_e= true , starts= " 1.23" , ends= " e-05 " )
1015
+ test_show_bigfloat (big " 0.00001234" , contains_e= true , starts= " 1.23" , ends= " e-5 " )
1013
1016
1014
1017
for to_string in [string,
1015
1018
x-> sprint (show, x),
0 commit comments