Skip to content

docs(help): document the new NLP++ math functions - #197

Merged
ddehilster merged 1 commit into
VisualText:mainfrom
ddehilster:docs/nlpxx-math-functions
Jul 26, 2026
Merged

ddehilster merged 1 commit into
VisualText:mainfrom
ddehilster:docs/nlpxx-math-functions

Conversation

@ddehilster

Copy link
Copy Markdown
Member

Documentation companion to VisualText/nlp-engine#699, which adds a set of math functions to NLP++.

New pages

Page Returns
floor INT round down, toward −∞
ceiling INT round up, toward +∞
round INT nearest whole number, halfway away from zero
truncate INT discard the fraction, toward zero
sqrt FLOAT square root
pow FLOAT raise a number to a power
log FLOAT natural (base e) logarithm

Each follows the existing math-page shape (Purpose / Syntax / Returns / Remarks / Example / See Also), cross-linked so the four rounding functions point at each other and the power/log functions point at logten. The floor and truncate pages spell out where they diverge on negatives, since that's the easy thing to get wrong.

Table_of_Math_Functions.md gains the seven rows in alphabetical order, and index.md lists the new pages under Math Functions.

Validation

check-help-docs.ps1 -EnginePath c:\git\nlp-engine\lite:

broken links: 0   broken images: 0   orphaned pages: 1   table/index drift: 0

The seven new names no longer appear under "engine names with no help page". The one orphaned page (New_in_Current_Version) is pre-existing and untouched here.

One thing worth knowing

The examples deliberately avoid negative literals. Passing one directly doesn't currently parse in NLP++ — and the existing abs.md page documents abs(-7), which does not actually run. This isn't specific to the new functions (mod(-7,3) and logten(-1.0) fail identically), so I left abs.md alone rather than widen this PR, but the example there is misleading and worth a follow-up.

🤖 Generated with Claude Code

Adds help pages for the math functions introduced in nlp-engine#699:

  floor       round down, toward -infinity
  ceiling     round up, toward +infinity
  round       nearest whole number, halfway away from zero
  truncate    discard the fraction, toward zero
  sqrt        square root
  pow         raise a number to a power
  log         natural (base e) logarithm

Each page follows the existing math-page shape (Purpose / Syntax / Returns /
Remarks / Example / See Also), cross-linked so the four rounding functions
point at each other and the power and log functions point at logten. The
floor and truncate pages spell out where they diverge on negatives, since
that is the easy thing to get wrong.

Table_of_Math_Functions.md gains the seven rows in alphabetical order, and
index.md lists the new pages under Math Functions.

check-help-docs.ps1 against c:\git\nlp-engine\lite: 0 broken links, 0 broken
images, 0 table/index drift, and the seven names no longer appear under
"engine names with no help page".

Note: the examples avoid negative literals. Passing one directly, as the
existing abs page does with abs(-7), does not currently parse in NLP++.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 9c25d69 into VisualText:main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant