Skip to content

Commit

Permalink
test f* function with one argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander committed Jan 13, 2024
1 parent f45f111 commit 861b2f1
Show file tree
Hide file tree
Showing 11 changed files with 44,171 additions and 7 deletions.
32 changes: 25 additions & 7 deletions source/himalaya/mh2_eft/ThresholdLoopFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,14 @@ double g(double r) noexcept

double f1(double r) noexcept
{
if (r == 0.) {
return 0;
}

const double r2 = sqr(r);

if (is_zero(r, 0.01)) {
return 18./7.*r2;
if (std::fabs(r) < 0.01) {
return r2*(18./7 + 6./7*r2*(7 + 5*std::log(r2)));
}

const double d = r2 - 1;
Expand All @@ -478,10 +482,14 @@ double f1(double r) noexcept

double f2(double r) noexcept
{
if (r == 0.) {
return 0;
}

const double r2 = sqr(r);

if (is_zero(r, 0.01)) {
return 22./9.*r2;
if (std::fabs(r) < 0.01) {
return r2*(22./9 + 2./9*r2*(23 + 17*std::log(r2)));
}

const double d = r2 - 1;
Expand All @@ -498,11 +506,16 @@ double f2(double r) noexcept

double f3(double r) noexcept
{
if (is_zero(r, 1e-6)) {
return 4./3.;
if (r == 0.) {
return 4./3;
}

const double r2 = sqr(r);

if (is_zero(r, 1e-6)) {
return 4./3 + 2./3*r2*(13 + 6*std::log(r2));
}

const double d = r2 - 1;

if (is_equal(std::fabs(r), 1., 0.01)) {
Expand All @@ -518,11 +531,16 @@ double f3(double r) noexcept

double f4(double r) noexcept
{
if (is_zero(r, 1e-6)) {
if (r == 0.) {
return 12./7.;
}

const double r2 = sqr(r);

if (is_zero(r, 1e-6)) {
return 12./7 + 2./7*r2*(37 + 18*std::log(r2));
}

const double d = r2 - 1;

if (is_equal(std::fabs(r), 1., 0.01)) {
Expand Down
146 changes: 146 additions & 0 deletions test/data/f1_.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
0 0
0.05 0.00630460475817347
0.1 0.0242938547018057
0.15 0.0522313029319074
0.2 0.0883469368623725
0.25 0.131038854842681
0.3 0.178924759803624
0.35 0.230840307182088
0.4 0.285818157821581
0.45 0.343061485563424
0.5 0.401917686943558
0.55 0.461854557849988
0.6 0.522439636897915
0.65 0.58332271999505
0.7 0.644221263069468
0.75 0.704908294859515
0.8 0.765202455328139
0.85 0.824959807004785
0.9 0.884067111710167
0.95 0.942436311990352
1. 1.
1.05 1.05670769460087
1.1 1.11252277972501
1.15 1.16741998395255
1.2 1.22138330341281
1.25 1.27440428823995
1.3 1.32648062757347
1.35 1.37761498008385
1.4 1.42781400673457
1.45 1.47708757038713
1.5 1.52544807326572
1.55 1.5729099085065
1.6 1.61948900625463
1.65 1.66520245822531
1.7 1.71006820746416
1.75 1.75410479234749
1.8 1.79733113575135
1.85 1.83976637186859
1.9 1.88142970442821
1.95 1.92234029112154
2. 1.96251714990736
2.05 2.00197908358546
2.1 2.04074461962238
2.15 2.07883196270673
2.2 2.11625895792183
2.25 2.15304306276514
2.3 2.18920132652905
2.35 2.22475037579607
2.4 2.25970640500067
2.45 2.29408517117707
2.5 2.32790199215267
2.55 2.36117174756423
2.6 2.39390888217343
2.65 2.4261274110413
2.7 2.45784092619167
2.75 2.48906260445299
2.8 2.51980521621781
2.85 2.55008113490149
2.9 2.57990234691764
2.95 2.60928046201766
3. 2.63822672386764
3.05 2.66675202075718
3.1 2.69486689635334
3.15 2.72258156042789
3.2 2.7499058994997
3.25 2.77684948734469
3.3 2.80342159533524
3.35 2.82963120257901
3.4 2.85548700583347
3.45 2.88099742917825
3.5 2.90617063343189
3.55 2.93101452530378
3.6 2.95553676627511
3.65 2.97974478120547
3.7 3.00364576666399
3.75 3.02724669898588
3.8 3.05055434205653
3.85 3.0735752548268
3.9 3.09631579856398
3.95 3.11878214384382
4. 3.14098027728945
4.05 3.16291600806374
4.1 3.18459497412175
4.15 3.20602264823045
4.2 3.22720434376263
4.25 3.24814522027253
4.3 3.26885028886027
4.35 3.28932441733245
4.4 3.30957233516611
4.45 3.32959863828305
4.5 3.34940779364169
4.55 3.36900414365306
4.6 3.38839191042774
4.65 3.40757519986027
4.7 3.42655800555719
4.75 3.44534421261499
4.8 3.46393760125379
4.85 3.48234185031255
4.9 3.50056054061129
4.95 3.51859715818566
5. 3.53645509739909
0.9 0.884067111710167
0.99 0.988554343782905
0.999 0.998856971485806
0.9999 0.999885712571486
0.99999 0.999988571411429
0.999999 0.999998857142686
0.9999999 0.999999885714284
0.99999999 0.999999988571429
0.999999999 0.999999998857143
0.9999999999 0.99999999988571
0.99999999999 0.99999999998857
0.999999999999 0.99999999999886
0.9999999999999 0.99999999999989
0.99999999999999 0.99999999999999
1. 1.
1.1 1.11252277972501
1.01 1.01141137233964
1.001 1.00114268565723
1.0001 1.00011428399994
1.00001 1.00001142855429
1.000001 1.00000114285697
1.0000001 1.00000011428571
1.00000001 1.00000001142857
1.000000001 1.00000000114286
1.0000000001 1.00000000011429
1.00000000001 1.00000000001143
1.000000000001 1.00000000000114
1.0000000000001 1.00000000000011
1.00000000000001 1.00000000000001
1. 1.
0.1 0.0242938547018057
0.01 0.000256808027154226
0.001 2.57137536194125e-6
0.0001 2.5714278419708e-8
1.e-5 2.57142856216035e-10
1.e-6 2.57142857131615e-12
1.e-7 2.57142857142725e-14
1.e-8 2.57142857142856e-16
1.e-9 2.57142857142857e-18
1.e-10 2.57142857142857e-20
1.e-11 2.57142857142857e-22
1.e-12 2.57142857142857e-24
1.e-13 2.57142857142857e-26
1.e-14 2.57142857142857e-28
1.e-15 2.57142857142857e-30
146 changes: 146 additions & 0 deletions test/data/f2_.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
0 0
0.05 0.00600075084435775
0.1 0.0231757281998757
0.15 0.0499610684959213
0.2 0.0847491022626568
0.25 0.126072020488032
0.3 0.172651681551255
0.35 0.223401247129679
0.4 0.277408777907616
0.45 0.33391518347223
0.5 0.392291812752649
0.55 0.452019847065317
0.6 0.512672233125305
0.65 0.573898245908807
0.7 0.63541049226924
0.75 0.696974063918502
0.8 0.758397529601582
0.85 0.819525474935047
0.9 0.880232331623147
0.95 0.940417274506647
1. 1.
1.05 1.05891723081836
1.1 1.11711981887933
1.15 1.17457034099403
1.2 1.23124110085434
1.25 1.28711246639657
1.3 1.34217148439378
1.35 1.39641072457242
1.4 1.44982731407678
1.45 1.50242213006367
1.5 1.55419912389152
1.55 1.60516475500992
1.6 1.65532751645243
1.65 1.70469753694626
1.7 1.75328624720441
1.75 1.80110610006413
1.8 1.84817033586295
1.85 1.89449278586966
1.9 1.94008770776586
1.95 1.98496964815048
2. 2.02915332784983
2.05 2.07265354648988
2.1 2.11548510334896
2.15 2.15766273197801
2.2 2.19920104646749
2.25 2.24011449756849
2.3 2.28041733715156
2.35 2.32012358971829
2.4 2.35924702987599
2.45 2.39780116485053
2.5 2.43579922125121
2.55 2.4732541354195
2.6 2.51017854679284
2.65 2.54658479379936
2.7 2.58248491187118
2.75 2.61789063322486
2.8 2.65281338810964
2.85 2.68726430726839
2.9 2.72125422539381
2.95 2.75479368539478
3. 2.78789294331534
3.05 2.82056197377214
3.1 2.85281047579656
3.15 2.88464787898487
3.2 2.91608334987439
3.25 2.94712579847671
3.3 2.97778388490934
3.35 3.00806602607681
3.4 3.03798040236021
3.45 3.0675349642807
3.5 3.0967374391087
3.55 3.12559533739526
3.6 3.15411595940654
3.65 3.18230640144586
3.7 3.21017356205104
3.75 3.23772414805739
3.8 3.26496468051885
3.85 3.29190150048196
3.9 3.31854077460885
3.95 3.34488850064677
4. 3.37095051274293
4.05 3.39673248660448
4.1 3.42223994450417
4.15 3.44747826013284
4.2 3.4724526633008
4.25 3.49716824449012
4.3 3.52162995926078
4.35 3.54584263251333
4.4 3.56981096261165
4.45 3.59353952536877
4.5 3.61703277789967
4.55 3.64029506234439
4.6 3.66333060946526
4.65 3.68614354212192
4.7 3.70873787862782
4.75 3.73111753599202
4.8 3.75328633304971
4.85 3.7752479934854
4.9 3.79700614875203
4.95 3.81856434088973
5. 3.83992602524761
0.9 0.880232331623147
0.99 0.988134889832425
0.999 0.998814681555649
0.9999 0.999881480148222
0.99999 0.999988148134815
0.999999 0.999998814814681
0.9999999 0.99999988148148
0.99999999 0.999999988148148
0.999999999 0.999999998814815
0.9999999999 0.99999999988148
0.99999999999 0.99999999998815
0.999999999999 0.99999999999881
0.9999999999999 0.99999999999988
0.99999999999999 0.99999999999999
1. 1.
1.1 1.11711981887933
1.01 1.01183844537401
1.001 1.00118505177787
1.0001 1.00011851718511
1.00001 1.00001185183852
1.000001 1.00000118518505
1.0000001 1.00000011851852
1.00000001 1.00000001185185
1.000000001 1.00000000118519
1.0000000001 1.00000000011852
1.00000000001 1.00000000001185
1.000000000001 1.00000000000119
1.0000000000001 1.00000000000012
1.00000000000001 1.00000000000001
1. 1.
0.1 0.0231757281998757
0.01 0.000244147522974592
0.001 2.44439736349333e-6
0.0001 2.44444379966315e-8
1.e-5 2.4444444362569e-10
1.e-6 2.44444444434517e-12
1.e-7 2.44444444444328e-14
1.e-8 2.44444444444443e-16
1.e-9 2.44444444444444e-18
1.e-10 2.44444444444444e-20
1.e-11 2.44444444444444e-22
1.e-12 2.44444444444444e-24
1.e-13 2.44444444444444e-26
1.e-14 2.44444444444444e-28
1.e-15 2.44444444444444e-30
Loading

0 comments on commit 861b2f1

Please sign in to comment.