Hi guys,

In Pharo 2.0, the expression "Number readFrom: '2.5850009999999998e+04' "
would answer 25850.01 , but in Pharo 3.0 it answers: 2.5850009999999997
 which is a kind of WTF to me.

Checking the differences it seems in Pharo 2.0 ExtendedNumberParser (used
from Number >> readFrom: )  implemented:

allowPlusSign
^true

However, in Pharo 3.0 it seems subclasses of NumberParser have been merged
directly in NumberParser class (and so Number >> readFrom: uses this class
now).

But.. (and this is the difference), NumberParser implements:

allowPlusSign
^false

So I wonder...was this on purpose or a side effect? Why would we want to
reject using + as part of the exponential notion??

So in my case now I must do an override to:

NumberParser >> allowPlusSignInExponent
^ true

Thoughts?


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to