\Yii::trace(23.10, 'debug');
23.10
23.10000000000000142108547152020037174224853515625
| Q | A
| ---------------- | ---
| Yii version | 2.0.?
| PHP version | 5.6
| Operating system | mac os 10.12.6
What version of Yii is that?
Yii version : 2.0.13
On Fri, Feb 23, 2018 at 11:32 PM, Alexander Makarov <
[email protected]> wrote:
What version of Yii is that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/yiisoft/yii2/issues/15752#issuecomment-368089726, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ATixVKCDsP-FrcDFJXEHYHxX8O89TbRwks5tXv0ygaJpZM4SRBVi
.
The problem is here with the function var_export(23.10, true). Which subsequently drills down to how actually floating point numbers are dealt in a language.
PHP manual warns on _floating point numbers_:
Floating point numbers have limited precision. Although it depends on the system, PHP typically uses the IEEE 754 double precision format, which will give a maximum relative error due to rounding in the order of 1.11e-16.
Most helpful comment
The problem is here with the function
var_export(23.10, true). Which subsequently drills down to how actually floating point numbers are dealt in a language.PHP manual warns on _floating point numbers_: