How skysaksham/long-numeric-arithmetic works
Long Numeric Arithmetic is a C++ library for representing and working with very large signed numbers. Its documented workflow converts strings to Numbers, performs supported arithmetic or factorial calculation, then converts or prints results; comparisons are also supported. The core representation uses base-10^9 digit blocks, with comparison and same-sign integer addition implemented in sampled source. Decimal storage and comparison are present, but decimal arithmetic is not implemented. Utility implementations were not sampled, so their internal wiring is omitted.
Main entry points: NUMBER.h Number · NUMBER.cpp Comparison operators · addition.cpp Same-sign addition · factorialbase9.cpp Factorial
Components 9
Number representation
- Number
include/NUMBER.h - Comparison operators
src/NUMBER.cpp
Arithmetic operations
- Same-sign addition
src/operations/addition.cpp - Factorial
src/special_ops/factorialbase9.cpp
Conversion and comparison
- String parsing
include/NumberUtils.h - String formatting
include/NumberUtils.h - Number printing
include/NumberUtils.h - Comparison
src/Compare.cpp
Other components
- Library caller
Connections 10
- Library caller → String parsing: parses strings
- Library caller → String formatting: converts to string
- Library caller → Number printing: prints number
- Library caller → Same-sign addition: adds numbers
- Library caller → Factorial: calculates factorial
- Library caller → Comparison operators: compares numbers
- Comparison operators → Comparison: calls comparison
- Same-sign addition → Number: reads and returns
- Factorial → Number: constructs result
- Comparison → Number: reads representation