MCPcopy Create free account
hub / github.com/catboost/catboost / fast_exp

Function fast_exp

library/cpp/fast_exp/fast_exp.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33double fast_exp(double x) {
34 double arg = x;
35 double res = 1;
36
37 const auto& expTable = HugeSingletonWithPriority<TTable, 0>()->ExpTable;
38
39 for (int iter = 0; iter < 4; ++iter) {
40 TDoubleInt dd;
41 dd.FVal = arg;
42 double chk = expTable[dd.IVal >> 48];
43 dd.IVal &= 0xffff000000000000ll;
44 res *= chk;
45 arg -= dd.FVal;
46 }
47
48 return res * (1 + arg);
49}
50
51void FastExpInplace(double* x, size_t count) {
52#if defined(_x86_64_) || defined(_i386_)

Callers 11

FastExpInplaceFunction · 0.85
LogisticFunction · 0.85
ApplyLearningRateFunction · 0.85
ExpApproxIfFunction · 0.85
UpdateApproxDeltasFunction · 0.85
EvalSingleThreadMethod · 0.85
CalcPdfMethod · 0.85
CalcPdfDer1Method · 0.85
CalcPdfDer2Method · 0.85
CalcCdfMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected