vendor/tomotopy/src/Utils/math.h in tomoto-0.2.2 vs vendor/tomotopy/src/Utils/math.h in tomoto-0.2.3

- old
+ new

@@ -139,12 +139,12 @@ } static constexpr float smallThreshold = (float)(0.001); float forSmall(float x) { if (x == 0) return -INFINITY; - return log(x + 2) - 0.5f / (x + 2) - 1 / 12.f / pow(x + 2, 2) - 1 / (x + 1) - 1 / x; + return logf(x + 2) - 0.5f / (x + 2) - 1 / 12.f / powf(x + 2, 2) - 1 / (x + 1) - 1 / x; } - float forLarge(float x) { return log(x) - 0.5f / x - 1 / 12.f / pow(x, 2); } + float forLarge(float x) { return logf(x) - 0.5f / x - 1 / 12.f / powf(x, 2); } float forNonFinite(float x) { if (std::isnan(x) || x < 0) return NAN; return INFINITY;} }; using LUT_digamma = LUT3<F_digamma, float, 1 * 1024, 1024, 100 * 64, 64, 1000 * 4, 4>; } \ No newline at end of file