Skip to content

Commit

Permalink
account for platform-dependent resolutions of floating point types
Browse files Browse the repository at this point in the history
 in the implementation of the incomplete gamma functions
  • Loading branch information
rabauke committed Feb 26, 2024
1 parent 230a6f4 commit f1bfdac
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 148 deletions.
12 changes: 11 additions & 1 deletion tests/test_special_functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,17 @@ TEMPLATE_TEST_CASE("special_functions", "", float, double, long double) {
tuple{T(40.0l), T(42.0l), T(6.4193141067359395324846555212831384747500e-01l)},
tuple{T(40.0l), T(44.0l), T(7.4692196604585985651799646842674920219553e-01l)},
tuple{T(40.0l), T(46.0l), T(8.3074626260026305803119722265978017795290e-01l)},
tuple{T(40.0l), T(48.0l), T(8.9272353393334340495239865479281817396499e-01l)})};
tuple{T(40.0l), T(48.0l), T(8.9272353393334340495239865479281817396499e-01l)},
tuple{T(1.5l), T(1.5l), T(6.0837482372891104452263956393811907145684e-01l)},
tuple{T(2.5l), T(2.5l), T(5.8411981300449207971638842051359432116885e-01l)},
tuple{T(5.0l), T(5.0l), T(5.5950671493478758855741833433667176473146e-01l)},
tuple{T(7.5l), T(7.5l), T(5.4858278877427476415333667828004548935195e-01l)},
tuple{T(10.0l), T(10.0l), T(5.4207028552814779168583514294066541824736e-01l)},
tuple{T(15.0l), T(15.0l), T(5.3434629105599036841653301199610536182359e-01l)},
tuple{T(20.0l), T(20.0l), T(5.2974273316076001268780964582628191728763e-01l)},
tuple{T(25.0l), T(25.0l), T(5.2660153144365064327519039021012474577736e-01l)},
tuple{T(30.0l), T(30.0l), T(5.2428301389368006904272177096520321237314e-01l)},
tuple{T(40.0l), T(40.0l), T(5.2102886106105516334095689757755319315557e-01l)})};
const T s{x_yref.x[0]};
const T x{x_yref.x[1]};
const T y{trng::math::GammaP(s, x)};
Expand Down
Loading

0 comments on commit f1bfdac

Please sign in to comment.