Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
There is indeed a naming conflict between The best way to circumvent this naming conflict is to not use Concretely, I see one issue that may be improved upon, handling a negative value:
We can do that by adding another condition in the expression parser here: mathjs/src/expression/parse.js Line 1062 in c35a801 Making it recon with a negative values too: (state.token === 'in' && isConstantNode(node)) ||
(state.token === 'in' && isOperatorNode(node) && node.fn === 'unaryMinus' && isConstantNode(node.args[0])) || I have to think though though if this really does address this concern and whether it doesn't introduce new issues. Anyone any thoughts in this regard? |
Beta Was this translation helpful? Give feedback.
-
This could be something on my end, but I'm noticing that 'in' is not always being processed as 'inch' in arithmetic, and instead is attempting the 'to' function. Seems to only occur with negative values or subtraction.
Works:
https://math.rad.cm/?title=&precision=6&expression=-3+inch+-+4+inch
Does not work:
https://math.rad.cm/?title=&precision=6&expression=-3+in+-+4+in
Beta Was this translation helpful? Give feedback.
All reactions