'MySQL division precision
mysql> SELECT 100 / 35600.00 * 35600.00;
+---------------------------+
| 100 / 35600.00 * 35600.00 |
+---------------------------+
| 99.999973 |
+---------------------------+
mysql> SELECT TRUNCATE(100 / 35600.00, 30) * 35600.00;
+-----------------------------------------+
| TRUNCATE(100 / 35600.00, 30) * 35600.00 |
+-----------------------------------------+
| 99.999972800000000000000000000000 |
+-----------------------------------------+
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
