• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dblock / excalc-rs / 35948400238
98%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2026 02:43AM UTC
Jobs 1
Files 10
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2026 02:42AM UTC coverage: 99.649% (-0.05%) from 99.701%
35948400238

push

github

dblock
Implement number theory functions (gcd, lcm, fib, primes, Mersenne, perfect, Fermat, sigma/tau/phi)

Adds src/functions/number_theory.rs with a deterministic Miller-Rabin
primality test (valid for the full u64 range) backing gcd, lcm, fib,
isprime, moebius, mersenne, perfect, fermat, safeprime, primec, primen,
mersennegen, mersgen, genmers, sigma, tau, and phi/eind.

Notable clarifications resolved during implementation (see docs/functions/number-theory.md
for details):
- mersenne(p) is the literal 2^p - 1 for exponent p (not an upper bound
  on the result), despite an inconsistent worked example in the
  original manual.
- mersennegen/mersgen/genmers search generators in [2, 63] via
  primality testing rather than a hardcoded list of known Mersenne
  primes.
- fermat(k) is computed generically via the 2^(2^k)+1 formula for any
  k in [0, 9], not just the historically known-prime k <= 4.
- primec/primen's "1 counts as prime" note in the pre-existing docs
  didn't match the worked examples; implemented to match the examples
  instead (primec doesn't count 1; primen(1) is a special-cased
  override of the otherwise-conventional 1-indexed prime enumeration).

Wires these into eval.rs::call_function, moves
docs/functions/number-theory.md from planned to v1, updates DESIGN.md's
scope/catalog, adds a README Examples block (also exercises eval.rs's
dispatch arms via tests/readme_examples.rs), and updates CHANGELOG.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

420 of 422 new or added lines in 2 files covered. (99.53%)

1421 of 1426 relevant lines covered (99.65%)

301.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
99.5
src/functions/number_theory.rs
Jobs
ID Job ID Ran Files Coverage
1 35948400238.1 24 Sep 2026 02:43AM UTC 10
99.65
GitHub Action Run
Source Files on build 35948400238
  • Tree
  • List 10
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35948400238
  • 91c2696a on github
  • Prev Build on master (#35947491791)
  • Next Build on master (#35949183403)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc