com php-src: Add better value to test: tests/basic/precision.phpt
| From: | Jakub Zelenka | Date: | Sun, 26 Jun 2016 12:26:43 +0000 |
| Subject: | com php-src: Add better value to test: tests/basic/precision.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92666@lists.php.net to get a copy of this message | ||
Commit: b509b24e353c4ec84be839a61dec1b49ce8e02b7
Author: Yasuo Ohgaki <yohgaki@php.net> Mon, 31 Aug 2015 19:20:28 +0900
Committer: Jakub Zelenka <bukka@php.net> Sun, 26 Jun 2016 13:26:43 +0100
Parents: 086835f2b31d1220c725e5a19f86668dcebf4b10
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b509b24e353c4ec84be839a61dec1b49ce8e02b7
Log:
Add better value to test
Changed paths:
M tests/basic/precision.phpt
Diff:
diff --git a/tests/basic/precision.phpt b/tests/basic/precision.phpt
index 097e2c4..9c50fa7 100644
--- a/tests/basic/precision.phpt
+++ b/tests/basic/precision..phpt
@@ -5,7 +5,7 @@ precision=14
serialize_precision=17
--FILE--
<?php
-$v = array(123456789.012345678901234567890, 10/3, 987e100);
+$v = array(123456789.012345678901234567890, 10/3, 987e100, 10.0000001);
echo "INI".PHP_EOL;
ini_set('precision', -1);
@@ -82,76 +82,83 @@ INI
-1
-1
OUTPUTS
-123456789.01234567 3.3333333333333335 9.87E+102
-string(72) "a:3:{i:0;d:123456789.01234567;i:1;d:3.3333333333333335;i:2;d:9.87E+102;}"
+123456789.01234567 3.3333333333333335 9.87E+102 10.0000001
+string(89)
"a:4:{i:0;d:123456789.01234567;i:1;d:3.3333333333333335;i:2;d:9.87E+102;i:3;d:10.0000001;}"
array (
0 => 123456789..01234567,
1 => 3.3333333333333335,
2 => 9.87E+102,
+ 3 => 10.0000001,
)
INI
0
0
OUTPUTS
-1.0E+8 3 1.0E+103
-string(47) "a:3:{i:0;d:1.0E+8;i:1;d:3.0E+0;i:2;d:1.0E+103;}"
+1.0E+8 3 1.0E+103 1.0E+1
+string(60) "a:4:{i:0;d:1.0E+8;i:1;d:3.0E+0;i:2;d:1.0E+103;i:3;d:1.0E+1;}"
array (
0 => 1.0E+8,
1 => 3.0E+0,
2 => 1.0E+103,
+ 3 => 1.0E+1,
)
INI
9
9
OUTPUTS
-123456789 3.33333333 9.87E+102
-string(55) "a:3:{i:0;d:123456789;i:1;d:3.33333333;i:2;d:9.87E+102;}"
+123456789 3.33333333 9.87E+102 10.0000001
+string(72) "a:4:{i:0;d:123456789;i:1;d:3.33333333;i:2;d:9.87E+102;i:3;d:10.0000001;}"
array (
0 => 123456789,
1 => 3.33333333,
2 => 9.87E+102,
+ 3 => 10.0000001,
)
INI
14
14
OUTPUTS
-123456789.01235 3.3333333333333 9.87E+102
-string(66) "a:3:{i:0;d:123456789.01235;i:1;d:3.3333333333333;i:2;d:9.87E+102;}"
+123456789.01235 3.3333333333333 9.87E+102 10.0000001
+string(83)
"a:4:{i:0;d:123456789.01235;i:1;d:3.3333333333333;i:2;d:9.87E+102;i:3;d:10.0000001;}"
array (
0 => 123456789.01235,
1 => 3.3333333333333,
2 => 9.87E+102,
+ 3 => 10.0000001,
)
INI
17
17
OUTPUTS
-123456789.01234567 3.3333333333333335 9.8700000000000007E+102
-string(86)
"a:3:{i:0;d:123456789.01234567;i:1;d:3.3333333333333335;i:2;d:9.8700000000000007E+102;}"
+123456789.01234567 3.3333333333333335 9.8700000000000007E+102 10.000000099999999
+string(111)
"a:4:{i:0;d:123456789.01234567;i:1;d:3.3333333333333335;i:2;d:9.8700000000000007E+102;i:3;d:10.000000099999999;}"
array (
0 => 123456789.01234567,
1 => 3.3333333333333335,
2 => 9.8700000000000007E+102,
+ 3 => 10.000000099999999,
)
INI
25
25
OUTPUTS
-123456789.0123456716537476 3.33333333333333348136307 9.870000000000000687310143E+102
-string(109)
"a:3:{i:0;d:123456789.0123456716537476;i:1;d:3.33333333333333348136307;i:2;d:9.870000000000000687310143E+102;}"
+123456789.0123456716537476 3.33333333333333348136307 9.870000000000000687310143E+102
10.0000000999999993922529
+string(141)
"a:4:{i:0;d:123456789.0123456716537476;i:1;d:3.33333333333333348136307;i:2;d:9.870000000000000687310143E+102;i:3;d:10.0000000999999993922529;}"
array (
0 => 123456789.0123456716537476,
1 => 3.33333333333333348136307,
2 => 9.870000000000000687310143E+102,
+ 3 => 10.0000000999999993922529,
)
INI
100
100
OUTPUTS
-123456789.01234567165374755859375 3.333333333333333481363069950020872056484222412109375
9.87000000000000068731014283095442748328521861543465424509123736073120616987695396574376473706259651E+102
-string(218)
"a:3:{i:0;d:123456789.01234567165374755859375;i:1;d:3.333333333333333481363069950020872056484222412109375;i:2;d:9.87000000000000068731014283095442748328521861543465424509123736073120616987695396574376473706259651E+102;}"
+123456789.01234567165374755859375 3.333333333333333481363069950020872056484222412109375
9.87000000000000068731014283095442748328521861543465424509123736073120616987695396574376473706259651E+102
10.0000000999999993922529029077850282192230224609375
+string(277)
"a:4:{i:0;d:123456789.01234567165374755859375;i:1;d:3.333333333333333481363069950020872056484222412109375;i:2;d:9.87000000000000068731014283095442748328521861543465424509123736073120616987695396574376473706259651E+102;i:3;d:10.0000000999999993922529029077850282192230224609375;}"
array (
0 => 123456789.01234567165374755859375,
1 => 3.333333333333333481363069950020872056484222412109375,
2 =>
9.87000000000000068731014283095442748328521861543465424509123736073120616987695396574376473706259651E+102,
+ 3 => 10.0000000999999993922529029077850282192230224609375,
)