Repository navigation
docs: explain exponents on parenthesized units - #3714
Hugohong258 wants to merge 4 commits into
Conversation
|
Thanks for the contribution, this is pretty nice as far as it goes. Since this is just one small change to the docs, I think we would prefer if someone, perhaps you, could identify the most appropriate place(s) in the documentation to address the unit min[ute]/function min[imum] and unit sec[ond]/function sec[ant] clashes to minimize those confusions as well, so that we can close #2771 in a single PR. Any chance you could add a proposed change to the documentation for that? Thanks for considering. |
|
Oh I see, you have #3709 already for that. OK, please could you (a) combine the two PRs into one and mark that as resolving #2771, and (b) add further mentions of the min/sec conflict in the documentation in some or all of the following list of places? Thank you so much.
Thanks again. |
|
OK, reviewed. I see you decided not to say anything on the |
math.unit('(m/s)^2')throws a syntax error, although parentheses are supported for grouping units. The units guide now explains that exponents must follow individual units and showsmath.unit('m^2/s^2')andmath.evaluate('(m/s)^2')as alternatives.The units guide and expression syntax page also explain that, by default,
minandsecresolve to the minimum and secant functions in expressions, and show the unambiguous unit names andmath.unit()alternatives. The unit list now includessecand calls out both name clashes. A user-supplied scope can override these symbols. This incorporates the documentation from #3709 and addresses the maintainer's follow-up on #3714. No parser behavior changes.Fixes #2771
Fixes #2095
Validation on Windows, Node 24.15.0, using the existing dependency installation from the earlier checkout:
npm run test:src: 6,652 passing, 22 pending.git diff --checkpassed. No website build or full lint run was performed.