diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 14:14:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 14:41:07 +0300 |
commit | c47d669f247d4762cfeede867c43c638e40c14c3 (patch) | |
tree | 734299c81811955ebb56f211bd010a39f42dc6ef /intern/cycles/util/util_math_fast.h | |
parent | 177a0ca131794a15d775577e4fa25c1d9e695d13 (diff) |
Cleanup: comments (long lines) in cycles
Diffstat (limited to 'intern/cycles/util/util_math_fast.h')
-rw-r--r-- | intern/cycles/util/util_math_fast.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h index 872271666aa..dbed83ab84d 100644 --- a/intern/cycles/util/util_math_fast.h +++ b/intern/cycles/util/util_math_fast.h @@ -282,8 +282,10 @@ ccl_device float fast_acosf(float x) const float m = (f < 1.0f) ? 1.0f - (1.0f - f) : 1.0f; /* Based on http://www.pouet.net/topic.php?which=9132&page=2 * 85% accurate (ulp 0) - * Examined 2130706434 values of acos: 15.2000597 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // without "denormal crush" - * Examined 2130706434 values of acos: 15.2007108 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // with "denormal crush" + * Examined 2130706434 values of acos: + * 15.2000597 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // without "denormal crush" + * Examined 2130706434 values of acos: + * 15.2007108 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // with "denormal crush" */ const float a = sqrtf(1.0f - m) * (1.5707963267f + m * (-0.213300989f + m * (0.077980478f + m * -0.02164095f))); @@ -312,8 +314,10 @@ ccl_device float fast_atanf(float x) const float s = 1.0f - (1.0f - k); /* Crush denormals. */ const float t = s * s; /* http://mathforum.org/library/drmath/view/62672.html - * Examined 4278190080 values of atan: 2.36864877 avg ulp diff, 302 max ulp, 6.55651e-06 max error // (with denormals) - * Examined 4278190080 values of atan: 171160502 avg ulp diff, 855638016 max ulp, 6.55651e-06 max error // (crush denormals) + * Examined 4278190080 values of atan: + * 2.36864877 avg ulp diff, 302 max ulp, 6.55651e-06 max error // (with denormals) + * Examined 4278190080 values of atan: + * 171160502 avg ulp diff, 855638016 max ulp, 6.55651e-06 max error // (crush denormals) */ float r = s * madd(0.43157974f, t, 1.0f) / madd(madd(0.05831938f, t, 0.76443945f), t, 1.0f); if (a > 1.0f) { |