Skip to content

Epic: Numeric Backends #49

@veggerby

Description

@veggerby

Goal

Expand numeric support beyond int/double/decimal to enable broader use cases.

Purpose

Support high-precision calculations (BigInteger), performance-critical float operations, and long integer measurements. Enable users to choose the appropriate numeric type for their domain while maintaining type safety and dimensional consistency.

Scope

  • Calculator<T> implementations for long, float, and BigInteger
  • Parsing and JSON converters aligned with new backends
  • Benchmarks validating no regressions for existing types

Deliverables

  1. LongCalculator, FloatCalculator, and BigIntegerCalculator implementations
  2. Corresponding Measurement<long>, Measurement<float>, Measurement<BigInteger> support
  3. Parsing extensions for all new numeric types
  4. JSON converters for all new measurement types
  5. Comprehensive unit tests for arithmetic operations and conversions
  6. Benchmarks demonstrating performance characteristics

Acceptance Criteria

  • New calculators and measurements available with full arithmetic support
  • Parsing and JSON converters support the new types correctly
  • Benchmark run shows no regression beyond existing performance gates
  • All calculator implementations follow the same patterns as existing types
  • Edge cases (overflow, underflow, precision loss) are documented and tested
  • XML docs added for all new public types and members

Technical Notes

  • Follow existing Int32Calculator and DoubleCalculator patterns exactly
  • Ensure dimensional operations (multiply, divide, power) work correctly
  • BigInteger may have different overflow semantics; document clearly
  • Float precision loss should be documented with guidance on when to use

Risk & Mitigation

Risk: BigInteger operations may have unexpected performance characteristics
Mitigation: Comprehensive benchmarks; document performance trade-offs clearly

Risk: Float precision loss may surprise users
Mitigation: Document precision limitations; add guidance on appropriate use cases

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions