Conversation
Convert decimal to double, use std::sqrt, convert back. Added baseline, benchmarks, and build scripts. Updated .gitignore.
- Add decimal lookup table for 1/sqrt(x) approximation - Implement SoftFloat-style remainder elimination - Add safety checks to prevent inf/NaN results - Maintain C++14 compatibility with out-of-line definitions Performance: ~4-5x speedup over baseline implementation
Replace Padé approximation with 32-entry lookup table approach, reducing Newton-Raphson iterations from 3-5 to 1-3 based on precision. - Add sqrt lookup tables for [0.1, 1.0) range with interpolation - Reduce iterations: decimal32 (1), decimal64 (2), decimal128 (3) - Maintain existing normalization and exponent handling Performance: Fewer divisions per sqrt call with faster convergence. Known issues: Some precision gaps remain, particularly for decimal32. Further optimization needed for interpolation and edge cases.
Replace Padé approximation with 1/sqrt(x) lookup table and linear interpolation, reducing Newton iterations from 3-5 to 1-2.
Replace Padé + Newton-Raphson with decimal-native lookup table algorithm. Uses 128-entry table with linear interpolation for initial approximation, then remainder elimination refinement using multiplication only (no division). Reduces iterations from 3-5 to 1-3. Experimental: precision tuning may be needed.
Add alignment support for {fmt} and <format>
…conversion issues
Fix #1329 via rework frexp
Improve sqrt with SoftFloat-style lookup table and integer arithmetic
Fix C++17 check for windows platforms
Test tuning and improvement
Reduce sqrt128 multiply cost: mul128By64, precompute target, 128-bit sig_z²
Tuning tests cover optimize zero
Reuse `r.ptr` instead of using strlen to get return size
Member
Author
|
There's conflicts from removing the package management so doing this manually |
|
An automated preview of the documentation is available at https://1340.decimal.prtest3.cppalliance.org/libs/decimal/doc/html/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-18 15:44:02 UTC |
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.
No description provided.