As we all know some rational numbers have errors when represented as floating point as witnessed here :
SELECT SUM( TEST )
FROM (
SELECT @N := @N +1 AS rownumber, 1/3 AS TEST
FROM INFORMATION_SCHEMA.COLUMNS, (
SELECT @N :=0
)dummyRowNums
LIMIT 3000
) AS test
I have extensive use of rational numbers arithmetics in my system and im looking for an approach to make it as precise as possible, is there any out of the box solution to this?
Its not a duplicate of this SO question as I'm asking how to do rational arithmetic right on mysql, while there they discuss why rational arithmetic is broken.