-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugdocumentationConcerns about or enhancements to the mathjs documentationConcerns about or enhancements to the mathjs documentation
Description
Describe the bug
The documentation at https://mathjs.org/docs/expressions/parsing.html#parser has this example:
// create a parser
const parser = math.parser()
...
// define variables and functions
parser.evaluate('x = 7 / 2') // 3.5
parser.evaluate('x + 3') // 6.5
parser.evaluate('f(x, y) = x^y') // f(x, y)
parser.evaluate('f(2, 3)') // 8
// get and set variables and functions
const x = parser.get('x') // x = 7Shouldn't the last line return 3.5 instead of 7?
e.g.
const x = parser.get('x') // x = 3.5Metadata
Metadata
Assignees
Labels
bugdocumentationConcerns about or enhancements to the mathjs documentationConcerns about or enhancements to the mathjs documentation