On 23 Jun 2016 1:41 am, "Sergei Golubchik" <[email protected]> wrote:
>
> Hi, Jesse!
>
> It is based on the popular dtoa.c by David M. Gay.
> The original source code is here: http://www.netlib.org/fp/dtoa.c
> The math is explained here: http://ampl.com/REFS/rounding.pdf
>

Thanks Sergei,

>From what I can tell that library is focused on extracting the decimal
digits from a double. I actually managed to do that part (in a slightly
hackish way) using PHP's sprintf(), and the digits themselves do match.

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.

> Regards,
> Sergei
> Chief Architect MariaDB
> and [email protected]
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to