Re: Proposal: change precision for output functions

From: Date: Mon, 07 Jan 2019 21:39:10 +0000
Subject: Re: Proposal: change precision for output functions
Groups: php.internals 
Request: Send a blank email to internals+get-103699@lists.php.net to get a copy of this message
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/

« previous php.internals (#103699) next »