Repository navigation
Add a page on how precision and accuracy are implemented - #50
Merged
Merged
Conversation
How the kernel tracks the error of arbitrary-precision numbers, as WMA does: PrecisionReal's decimal precision and 64-bit value, the error rules for sums and products, condition numbers for functions, zero values, special points, complex parts, the second pass of N, and SetPrecision. Ends with how to add precision to a new function. The user-level description is in the Mathics3 Manual (Mathics3/mathics-core#2069). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
LGTM - thanks! |
Member
|
I will be going looking over these docs for content and stupid stuff. (Grammarly-kind of punctuation, phrasing, and spelling. It is a little drier, but so be it.) So there will probably be small changes to this text and other text. |
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.
Following the suggestion in Mathics3/mathics-core#2067: the developer side of the precision work in mathics-core #2050–#2067. The user side is in the Manual, Mathics3/mathics-core#2069.
A new page,
code-overview/precision-and-accuracy, placed after "Rules" in the Code Overview:MachineRealversusPrecisionReal, andPrecisionReal's_precision10(a decimal precision that can be any real number) and_extended(64 bits of a low-precision value). It also says which property to read where (precision/precision10,value/extended_value) and why to usefrom_value.eval_add_numbers/eval_multiply_numbers; the guard digitsnumerifygives exact constants;MPMathFunction.condition_numbersandeval_mpmath_function_by_condition;_change_withinfor zero values and zero arguments;special_point_value/indeterminate_at; complex parts; the second pass ofNwith$MaxExtraPrecision;SetPrecision.sphinx-build -b html docs: no warning mentions the new page, and the build gives no more warnings than master does.🤖 Generated with Claude Code