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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 30 Oct 2026 01:36AM UTC
Jobs 1
Files 771
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 01:24AM UTC coverage: 88.316% (+0.03%) from 88.285%
40985620493

push

github

web-flow
feat(posit): correctly rounded trigonometric, hyperbolic, pow, error and gamma functions, computed in efloat (#1871)

The rest of #1855's transcendental functions move off double onto the
efloat engine of #1870: sin, cos, tan, asin, acos, atan, atan2, cot,
sec, csc, sinh, cosh, tanh, asinh, acosh, atanh, pow (posit, int and
double exponents), erf, erfc, and tgamma and lgamma, which posit did not
have. Each is efloat's correctly rounded function rounded once into the
posit by posit_limbs::evaluate. efloat reduces trigonometric arguments
exactly at any magnitude (Payne-Hanek), so sin(x) is right for every
posit x.

evaluate() takes a Saturation policy, since an efloat inf or 0 from a
valid argument is an overflow or underflow past efloat's 2^(2^62)
range, which a posit saturates: overflow for expm1, sinh, cosh and
lgamma, both ends for the exp family, erfc, tgamma, and pow with x != 0.
Poles and domain errors are NaR, decided before evaluating: tgamma and
lgamma at 0 and the negative integers, atanh(+-1), cot(0), csc(0),
pow(0, y < 0); and asin/acos of |x| > 1, acosh(x < 1), atanh(|x| > 1),
pow(x < 0, non-integer) through efloat's NaN. pow keeps IEEE's special
cases (pow(x, 0) = 1, pow(0, 0) = 1). cot, sec and csc are 1 / tan,
cos, sin taken at 2W and rounded to W, inside evaluate's 1 ulp margin.

Cost (ns, posit<16,1> / <32,2> / <64,3> / <128,4> / <256,5>, main ->
now): sin 63/142/266/895/1435 -> 917/944/1094/1279/1635, pow
130/262/522/1298/2066 -> 1452/1498/1635/1868/2438, erf
82/157/283/898/1419 -> 5609/5658/6100/7794/11413 (efloat's erf
itself, at MPFR's speed: evaluate adds nothing measurable and retries
on none of 1024 arguments), tgamma 7.5-17 us.

elementary.cpp now covers all 33 functions: every posit up to 10 bits
for the unary ones, pairs at 5-6 bits for hypot, atan2 and pow, and
random posits at 16 to 256 bits, against the efloat function at
4 (fbits + 1) + 64 bits; exact values (sin(0), tgamma(5) = 24,
pow(9, 0.5) = 3, ...), poles, domain e... (continued)

96 of 96 new or added lines in 6 files covered. (100.0%)

4 existing lines in 1 file now uncovered.

55784 of 63164 relevant lines covered (88.32%)

8872909.64 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
90.6
-3.42% include/sw/universal/verification/correctly_rounded_reference.hpp
Jobs
ID Job ID Ran Files Coverage
1 40985620493.1 30 Oct 2026 01:36AM UTC 771
88.32
GitHub Action Run
Source Files on build 40985620493
  • Tree
  • List 771
  • Changed 11
  • Source Changed 6
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40985620493
  • f7aaf2e7 on github
  • Prev Build on main (#40981456672)
  • Next Build on main (#40998401082)
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