Epsilon: Stop parsing numbers with multiple decimal dots?

Created on 2 May 2018  路  6Comments  路  Source: numworks/epsilon

At the moment, we decided to be as forgiving as possible and parse 1.2.3 as 1.2 implicit-multiplication .3, which yields 1.2 x 0.3 = 0.36.

Should we keep it that way, or is that be misleading?

question

Most helpful comment

I think it is misleading and should instead error out. If one wants to multiply two decimals like that, they should do 1.2(.3). That's the way it is taught in most textbooks as well.

All 6 comments

It's misleading and just feels wrong. Also, while Python accepts .1 as a number, it does not accept 1.2.3 so the behavior of the calculator is inconsistent between the Calculation app and the Python app.

Voting for misleading/to-change as well

Thanks @boricj and @adriweb for chiming in!

the behavior of the calculator is inconsistent between the Calculation app and the Python app

That's a good point, but note that there are cases where we definitely do not want to handle expressions just like Python. For example, Python won't parse 2sin(2) while this is definitely something we want to parse everywhere else.

Yeah - my answer was in general :)
(Based on experience with the rest, mostly - for instance on the TI-83PCE, 1.2.3 will be a syntax error on the second dot)

I think it is misleading and should instead error out. If one wants to multiply two decimals like that, they should do 1.2(.3). That's the way it is taught in most textbooks as well.

Numbers with multiple decimal dots are no longer parsed in 1.9.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

0b101 picture 0b101  路  4Comments

XanderLeaDaren picture XanderLeaDaren  路  4Comments

TheElectronWill picture TheElectronWill  路  3Comments

M4xi1m3 picture M4xi1m3  路  3Comments

theTisch21 picture theTisch21  路  3Comments