Repository navigation
docs(help): document the new NLP++ math functions - #197
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation companion to VisualText/nlp-engine#699, which adds a set of math functions to NLP++.
New pages
floorceilingroundtruncatesqrtpowlogEach 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. Thefloorandtruncatepages spell out where they diverge on negatives, since that's the easy thing to get wrong.Table_of_Math_Functions.mdgains the seven rows in alphabetical order, andindex.mdlists the new pages under Math Functions.Validation
check-help-docs.ps1 -EnginePath c:\git\nlp-engine\lite: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.mdpage documentsabs(-7), which does not actually run. This isn't specific to the new functions (mod(-7,3)andlogten(-1.0)fail identically), so I leftabs.mdalone rather than widen this PR, but the example there is misleading and worth a follow-up.🤖 Generated with Claude Code