Re: [PHP-DEV] BCMath and floats

2017-09-11 Thread Christoph M. Becker
On 11.09.2017 at 19:13, Sara Golemon wrote: > On Mon, Sep 11, 2017 at 8:36 AM, Christoph M. Becker > wrote: >> I already have proposed to introduce bcinit() which would take a string, >> int or float, and return a properly formatted string with the given or >> default scale, see

Re: [PHP-DEV] BCMath and floats

2017-09-11 Thread Sara Golemon
On Mon, Sep 11, 2017 at 8:36 AM, Christoph M. Becker wrote: > I already have proposed to introduce bcinit() which would take a string, > int or float, and return a properly formatted string with the given or > default scale, see . Nikita > suggested to ac

[PHP-DEV] BCMath and floats

2017-09-11 Thread Christoph M. Becker
Hi everybody! All BCMath functions expects strings as operands (in the strict sense; do not confuse with arguments). This of course can result in unexpected behavior if floats are passed, namely: * floats may be converted to a string in scientific notation * floats may be converted with a deci