V3.96: mixed-precision ArXiv paper prep and UNUM2 number system#506
V3.96: mixed-precision ArXiv paper prep and UNUM2 number system#506Ravenwater merged 15 commits intomainfrom
Conversation
When exponent is a large negative (e.g. -72), the shift `1ull << -exponent` exceeds 63 bits, causing undefined behavior. Add `exponent > -64` guard so both positive and negative extremes fall through to the safe ipow() path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create self-contained papers/ directory for systems and position paper artifacts that can be zipped and shared with reviewers: - papers/systems-paper/iterative_refinement.cpp: Carson & Higham three-precision LU-IR across IEEE, posit, cfloat, dd, cross-family - papers/systems-paper/conjugate_gradient.cpp: CG for SPD systems with single-precision and two-precision (low preconditioner) configurations - papers/systems-paper/idrs.cpp: IDR(s) for non-symmetric systems with shadow space dimension sweep and number system comparison Move paper docs from docs/papers/ to papers/docs/ for co-location. Add UNIVERSAL_BUILD_PAPERS CMake option (wired into BUILD_ALL cascade). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Plain article class (12pt) with full section structure, TODO placeholders, 29 BibTeX references (14 from JOSS + 15 new), and Makefile for local builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ites Add all four arithmetic operations (sub, mul, div plus existing add) via blocktriple pipeline, port conversion/assignment/logic regression tests from original posit, and fix three bugs discovered during testing: - convert_ieee754() extractBits too small: nbits+4 lost IEEE sticky bits causing false midpoint ties; now uses max(numeric_limits<Real>::digits, nbits+4) - Integer assignment via blocktriple had hidden-bit off-by-one in round(); rerouted through convert_ieee754(static_cast<double>(rhs)) - Literal comparison operators accessed private _block member; replaced with delegation to posit-posit comparison operators Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
positRegime::value() used manual division (1.0l / uint64_t(1) << -e2) for negative exponents, which produced wrong results under clang due to a codegen issue in this template context. Replace with std::ldexp() matching the original posit implementation. posit::setbits(uint64_t) used an uninitialized blockbinary temporary leaving upper MSU bits as garbage. Replace with _block.setbits(value) which properly masks the MSU. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On MSVC, LONG_DOUBLE_SUPPORT is 0 but the long double comparison operators were not guarded, causing ambiguous conversion errors since the posit(long double) constructor was correctly excluded. Add matching #if LONG_DOUBLE_SUPPORT guards to friend declarations, operator implementations, and test code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Skeletal implementation of Unum 2.0 * Fix point multiplication bug and add support for reverse interval * Added pow() and abs() + some optimizations * Refactor according to Codacy suggestions * Added op table/matrix for efficient operations * Fix unum2 includes * Fix operation matrix bug in unum2_impl.hpp * unum2_fwd.hpp, static test and improvements * Change bitset::_Find_first() to manually finding the bit for compatibility reasons * Make unum2 friend class a little more specific on class lattice * Make lattice parameters public to bypass MSVC build fails
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR adds extensive new mixed-precision applications and solver case studies, a large redesign and feature expansion of unum2 and posit2 (including arithmetic, conversion, and rounding fixes), numerous new tests and test runners, paper artifacts/LaTeX scaffolding, CMake build options for paper artifacts, and various small internal fixes (block boundaries, includes, exponent handling). Changes
Sequence Diagram(s)(Skipped — changes are broad and include multiple independent features rather than a single multi-component sequential flow that benefits from a sequence diagram.) Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request Test Coverage Report for Build 21914780216Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
mixed-precision ArXiv paper prep and UNUM2 number system
Summary by CodeRabbit
New Features
Documentation
Chores