maria-developers team mailing list archive
Mailing list archive
Re: Formatting rules for double => varchar assignment
On Jun 23, Jesse Schalken wrote:
> Where I'm stuck is how MariaDB decides between scientific and regular
> decimal notation. The number of significant digits, their position relative
> to the decimal point, and the target column length all seem to play a part,
> but I can't deduce exactly how.
This is done in our my_gcvt() function.
Its goal is to minimize the information loss, given the limited target
column length. There are different cases to consider, comments in the
function explain some of them.
Chief Architect MariaDB