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

stillwater-sc / universal / 29689875238
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: losborn_bugfix_elreal_subnormal_blocks_aug26
DEFAULT BRANCH: master
Ran 19 Jul 2026 02:39PM UTC
Jobs 1
Files 696
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

19 Jul 2026 01:57PM UTC coverage: 84.722% (+0.05%) from 84.677%
29689875238

push

github

web-flow
feat(efloat): implement math/hyperbolic.hpp (sinh, cosh, tanh, asinh, acosh, atanh) (#1156)

* feat(efloat): implement math/hyperbolic.hpp (sinh, cosh, tanh, asinh, acosh, atanh)

Adds the hyperbolic and inverse-hyperbolic library for efloat, matching the
repository-wide math structure (cf. posit/math/hyperbolic.hpp). Built on efloat's
own exp/expm1/log1p/sqrt so accuracy tracks the operand's full working precision
rather than double.

Numerical care:
- sinh uses the expm1 form u(u+2)/(2(u+1)) for |x|<0.5 (no cancellation as x->0)
  and the direct (e^x-e^-x)/2 otherwise (correct +/-inf overflow via exp).
- cosh uses (e^|x|+e^-|x|)/2 -- a sum of positives, never cancels.
- tanh uses w/(w+2), w=expm1(2|x|), saturating to 1 for huge |x|; sign applied.
- asinh/acosh use the log1p forms that stay accurate near 0 and near x=1.
- atanh uses 0.5*log1p(2x/(1-x)).

All special-value results match <cmath>: cosh(+/-inf)=+inf, tanh(+/-inf)=+/-1,
acosh(x<1) and acosh(-inf) -> NaN (FE_INVALID), atanh(+/-1) -> +/-inf
(FE_DIVBYZERO), atanh(|x|>1) and atanh(+/-inf) -> NaN (FE_INVALID). Signed zero
is preserved. constexpr-compatible.

Regression test elastic/efloat/math/hyperbolic.cpp covers accuracy vs <cmath>,
special values/domain errors, and high-precision oracle identities at 512 bits
(cosh^2-sinh^2==1, tanh==sinh/cosh, and asinh/acosh/atanh round-trips all agree
to < 2^-200). Wired into mathlib.hpp; the math test CMake globs it automatically.

Resolves #1114

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(efloat): assert exception flags on hyperbolic domain errors + self-contained header (CodeRabbit #1156)

- Section 8 now asserts the side-effect flags, not just the return value:
  InvalidOperation for acosh(x<1)/acosh(-inf)/atanh(|x|>1)/atanh(inf), and
  DivisionByZero for the atanh(+/-1) poles (clearing flags before each). These
  were an explicit PR objective that went unchecked.
- hyperbolic.hpp now includes <type_traits> and beha... (continued)

122 of 125 new or added lines in 1 file covered. (97.6%)

2 existing lines in 1 file now uncovered.

49668 of 58625 relevant lines covered (84.72%)

6897871.82 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
97.6
include/sw/universal/number/efloat/math/hyperbolic.hpp

Coverage Regressions

Lines Coverage ∆ File
2
89.78
-0.55% include/sw/universal/number/posito/posito_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 29689875238.1 19 Jul 2026 02:39PM UTC 696
84.72
GitHub Action Run
Source Files on build 29689875238
  • Tree
  • List 696
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29689875238
  • ac86505f on github
  • Prev Build on main (#29688711546)
  • Next Build on main (#29692704351)
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