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

stillwater-sc / universal / 41078839508
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 30 Oct 2026 03:34PM UTC
Jobs 1
Files 772
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

30 Oct 2026 03:14PM UTC coverage: 88.337% (+0.02%) from 88.317%
41078839508

push

github

web-flow
feat(integer): ipow is the exact integer power of integer, positional and einteger (#1877)

The second half of #1875. On the integer-valued types ipow(a, b) is the
right primitive: an exact power by squaring in the type's own arithmetic. It
now has one contract on all three:

- a^0 == 1 for every a, 0^0 included, as std::pow has it
- a negative b gives 1 / a^|b| truncated, as integer division truncates: 1
  for a == 1, +-1 for a == -1 by the parity of b, 0 for |a| > 1, and the
  type's division by zero for a == 0
- a result past the range behaves as the type's operator*= does
- no square past the exponent's last bit, which could overflow for nothing

integer: ipow covers every IntegerNumberType (it bound only the default
before), and a long long overload takes an exponent that need not fit in
nbits. A negative exponent used to be shifted logically and looped nbits
times, returning garbage. pow(integer, integer) and pow(integer, int) are
ipow; they went through double, so 3^40 came back with its low bits lost.
pow(integer, double) still goes through double.

positional: ipow(positional, positional) joins ipow(positional, unsigned),
and the unsigned one no longer squares past the last bit.

einteger: ipow(einteger, einteger) and ipow(einteger, long long), new. Two
einteger bugs fixed on the way:
- x *= x gave 0: operator*= cleared *this, which is also rhs, before reading
  it. Nothing in the tree squared an einteger in place.
- operator==(einteger<bt>, long long) compared against einteger<uint32_t>,
  so it did not compile for any other limb type.

Tests: static/integer/binary/math/pow.cpp against a native modular
reference, exhaustive at integer<8>, plus negative exponents, wide powers to
integer<1024>, and 3^40; static/integer/decimal/math/pow.cpp and
elastic/einteger/math/pow.cpp against native products, digit strings and
repeated multiplication. Docs: integer.md gets an Integer power section;
positional.md and einteger.md point to it. misc.cpp loses... (continued)

68 of 68 new or added lines in 4 files covered. (100.0%)

55857 of 63232 relevant lines covered (88.34%)

8867020.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 41078839508.1 30 Oct 2026 03:34PM UTC 772
88.34
GitHub Action Run
Source Files on build 41078839508
  • Tree
  • List 772
  • Changed 6
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41078839508
  • b1d9eea6 on github
  • Prev Build on main (#41077701965)
  • Next Build on main (#41095445131)
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