actually the problem arose from some old code that I tried to load and
failed to.

So I guess at some point in the past (pharo4 or prior) it was working :

---
PPExpressParserTests>>testReal3
        self parse: '-1.1333e3333' rule: #literal.
        self assert: (result value = -1.1333e3333).
        self assert: (PPSmalltalkParser parseExpression: '-
1.1333e3333') = result rbNode
---

nicolas

On Fri, 2019-12-20 at 10:21 +0100, Sven Van Caekenberghe wrote:
> Yes, the difference is not good.
> 
> Indeed, 
> 
>   Float fmax. "1.7976931348623157e308"
> 
> The reason
> 
>   Number readFrom: '7.5e333'.
> 
> gives infinity is actual not because of the reading, but because of
> 
>   75e332 asFloat.
> 
> Which is probably correct.
> 
> The failure of
> 
>   Number readFrom: '7.5e3333'.
> 
> is because of NumberParser>>#readExponent
> 
> However, the test at the end is probably wrong.
> 
>   Float emax
> 
> is a binary number, not a decimal one, IIUC.
> 
> Nicolas (nice) ?
> 
> > On 19 Dec 2019, at 19:28, tbrunz <[email protected]> wrote:
> > 
> > I would expect that both would result in +Inf.
> > 
> > A IEEE-754 'double' overflows around 2e308.
> > 
> > Surely both cases should behave the same way..??
> > 
> > -t
> > 
> > 
> > 
> > --
> > Sent from: 
> > http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
> > 
> 
> 
-- 
Nicolas Anquetil
RMod team -- Inria Lille


Reply via email to