Details
-
Type:
Task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Fix Version/s: N/A
-
Component/s: None
-
Labels:None
Description
Even after all these years there is a steady stream of bugs in decimal math.
We need a proactive approach instead, to try to find as many decimal bugs as
possible.
Suggestion: RQG testing of the expression
ABS(CAST(a + b AS DOUBLE)/(CAST(a AS DOUBLE) + CAST(b AS DOUBLE)) - 1) < 0.0001
where RQG randomly generates a and b, and the operation is one of +,
-, *, /, mod.
One should try also very small numbers (0.00...{~50 times}...01) as well as
large ones.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-6851 Decimal multiplication loses precision for no good reason
-
- Open
-
-
MDEV-6852 Sequence of decimal division and multiplications returns 0 instead of the real result
-
- Open
-
-
MDEV-6853 Unexpected zero result on 1 % <very small decimal> (wrong default precision of the returned result?)
-
- Open
-
-
MDEV-6856 <negative value> MOD <fractional divisor> returns negative zero
-
- Open
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
This query works okay in 5.5.40 candidate, but wrong in MySQL 5.5 (apparently that's the same problem as the one Sergei Golubchik solved in the post-merge fix).
MySQL [test]> select 0.0000000001 % 1; +------------------+ | 0.0000000001 % 1 | +------------------+ | 0.1000000000 | +------------------+ 1 row in set (0.00 sec)