Mwlib seemed to be unable to handle the following:
{{#expr:(1E5round0)E5}}
Which wasn't too surprising, as this should really already make parser functions throw a syntax error.
Mwlib seemed to be unable to handle the following:
{{#expr:(1E5round0)E5}}
Which wasn't too surprising, as this should really already make parser functions throw a syntax error.
Ruslik00 wrote:
In fact an error appears in any expression that contains parentheses () before E operator: {{#expr:(1)E5}}. It can be fixed by inserting multiplication: {{#expr:(1)*1E5}}.
ralf_wikimedia wrote:
really guys, e shouldn't be an operator. this is just braindamaged.
thinks like "e e e" and "1e2e5" should raise a syntax error. the current mediawiki version evaluates them happily. wtf!
I've implemented that in mwlib.
I'm setting the component to ParserFunctions, since this issue should really be fixed there.
please read https://en.wikipedia.org/wiki/Scientific_notation
sumanah wrote:
Pinging Umherirrender in case you want to make an attempt at fixing this issue in ParserFunctions.
the value E is defined as EXPR_EXPONENT in Expr.php I think due to which it is even the expressions given above are being executed. This is given as one of the expression parsers I think to remove this would fix the issue of giving the error on using e? correct me if I am wrong