请考虑以下代码:
0.1 + 0.2 == 0.3 -> false
0.1 + 0.2 -> 0.30000000000000004
为什么会出现这些不准确之处?
language-agnostic math floating-point floating-accuracy
什么是最简单的最基本的方法来确定数字/变量是奇数还是甚至在PHP中?这与mod有关吗?
我已经尝试了一些脚本,但是谷歌目前还没有提供.
php variables numbers
floating-accuracy ×1
floating-point ×1
language-agnostic ×1
math ×1
numbers ×1
php ×1
variables ×1