unit("m ^ (1)") throws an error
Author: mlameiCTCreated Dec 18, 2025Updated Jul 9, 2026
Labelsquestion
The issues section is used only for bug reports. Please use the Discussions section to ask questions and share ideas and suggestions.
Describe the bug
wrapping the power in brackets brakes unit() parser
To Reproduce
- try
unit("m ^ (1)")
will throw:
SyntaxError: In "km ^ (1)", "^" must be followed by a floating-point number
Source: josdejong/mathjs