g_math 0.4.27

Multi-domain fixed-point arithmetic with geometric extension: Lie groups, manifolds, ODE solvers, tensors, fiber bundles — pure Rust, zero-float, deterministic
Documentation
name: decimal-precision

# Publicly proves gMath's decimal-domain correctness on every push/PR. Two jobs:
#
#  1. lib-tests - the decimal_fixed module tests (incl. the d256 divmod
#     root-cause regression, banker's rounding, and DecimalFixed mul/div) across
#     the embedded/balanced/scientific profiles. DecimalFixed is i128-backed on
#     every profile, so the arithmetic fixes are profile-agnostic; this confirms
#     they hold across the cfg-gated profile code.
#
#  2. contract-harness - the full contract sweep against mootable/decimal-scaled's
#     independent, adversarial mpmath corpus (pinned). Grades BOTH user-reachable
#     decimal paths (imperative DecimalFixed + canonical gmath()/FASC) for all 15
#     transcendentals, plus atan2 and add/sub/mul/div, at 0 LSB.
#
# Uses NO third-party or GitHub-authored actions - checkout is a plain `git fetch`
# (gMath is a public repo) and the ubuntu runner already ships stable Rust. This
# keeps the repo runnable under the most restrictive "Allow <owner> actions"
# policy (and trivially satisfies "require actions pinned to a full SHA", since no
# actions are used). Free on this public repo.

on:
  push:
  pull_request:

jobs:
  lib-tests:
    strategy:
      fail-fast: false
      matrix:
        profile: [embedded, balanced, scientific]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout (plain git - no external actions)
        run: |
          git init -q
          git remote add origin "https://github.com/${{ github.repository }}.git"
          git fetch -q --depth 1 origin "${{ github.sha }}"
          git checkout -q FETCH_HEAD

      - name: cargo test --lib decimal_fixed (${{ matrix.profile }})
        env:
          GMATH_PROFILE: ${{ matrix.profile }}
        run: cargo test --lib decimal_fixed

  contract-harness:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout (plain git - no external actions)
        run: |
          git init -q
          git remote add origin "https://github.com/${{ github.repository }}.git"
          git fetch -q --depth 1 origin "${{ github.sha }}"
          git checkout -q FETCH_HEAD

      # Oracle #2: decimal-scaled's adversarial golden corpus, pinned to the
      # exact commit gMath was validated against. Not vendored into this repo.
      - name: Fetch decimal-scaled golden corpus (pinned)
        run: |
          git clone https://github.com/mootable/decimal-scaled.git "${{ runner.temp }}/decimal-scaled"
          git -C "${{ runner.temp }}/decimal-scaled" checkout e6c7497832be437cf464d07b841609a0b92aac87

      # Balanced profile: the harness is cfg-gated to q128_128 (DecimalFixed<28>
      # needs compute dp 77 for guard digits). Single-threaded: the sweep swaps
      # the panic hook around catch_unwind. Prebuilt tables -> build is seconds.
      - name: Decimal contract validation (balanced, oracle #1 + oracle #2)
        env:
          GMATH_PROFILE: balanced
          GMATH_DECIMAL_SCALED_GOLDEN: ${{ runner.temp }}/decimal-scaled
        run: cargo test --test decimal_contract_validation -- --test-threads=1 --nocapture