11.6.1 Arithmetic Operators

The usual arithmetic operators are available. The precision of
the result is determined according to the following rules:

In the case of
-,
+, and
*, the result
is calculated with BIGINT
(64-bit) precision if both operands are integers.

If both operands are integers and any of them are unsigned,
the result is an unsigned integer. For subtraction, if the
NO_UNSIGNED_SUBTRACTION
SQL mode is enabled, the result is signed even if any
operand is unsigned.

If any of the operands of a
+,
-,
/,
*,
% is a real or
string value, the precision of the result is the precision
of the operand with the maximum precision.

These rules are applied for each operation, such that nested
calculations imply the precision of each component. Hence,
(14620 / 9432456) / (24250 / 9432456),
resolves first to (0.0014) / (0.0026), with
the final result having 8 decimal places
(0.57692308).

Because of these rules and the way they are applied, care should
be taken to ensure that components and subcomponents of a
calculation use the appropriate level of precision. See
Section 11.10, “Cast Functions and Operators”.