Re: Proposal: change precision for output functions

php.internals

Legale Legage

7 years ago
What proposal? I'm talking about elementary arithmetic. Take a look here: Https://jdoodle.com/embed/v0/Tgu On Jan 7, 2019 10:32 PM, Semen Dubina <php@sam002.net> wrote: > > > > 07.01.2019, 22:17, "Legale.legale" <legale.legale@gmail.com>: > > I think your solution by changing precision is not good enough because float summation is still not working properly. > > > > <?php > > var_dump(0.1 + 0.7); > > > > returns: > > > > 0.7999999999 > > > > expected: 0.8 > > > > Hi! > > If you are about the proposal, then '0.1 + 0.7 !== 0.8'. > Why you expected 0.8? > Check, plz: https://3v4l.org/Ughn2 > >  -- Semen V. Dubina https://sam002.net/

Semen Dubina

7 years ago
> 08.01.2019, 00:39, "Legale.legale" <legale.legale@gmail.com>: > What proposal? I'm talking about elementary arithmetic. > > Take a look here: > Https://jdoodle.com/embed/v0/Tgu
Yes, floating-point arithmetic says: '0.8!=0.1+0.7'. jdoodle.com/a/Thv Will we discuss this now? -- Semen V. Dubina https://sam002.net/