s \cdot \log \left(\frac{1}{1 - 4 \cdot u}\right)
\begin{array}{l}
t_0 := \mathsf{log1p}\left(u \cdot -4\right)\\
s \cdot \left(-\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\right)
\end{array}
(FPCore (s u) :precision binary32 (* s (log (/ 1.0 (- 1.0 (* 4.0 u))))))
(FPCore (s u) :precision binary32 (let* ((t_0 (log1p (* u -4.0)))) (* s (- (cbrt (* t_0 (* t_0 t_0)))))))
float code(float s, float u) {
return s * logf(1.0f / (1.0f - (4.0f * u)));
}
float code(float s, float u) {
float t_0 = log1pf(u * -4.0f);
return s * -cbrtf(t_0 * (t_0 * t_0));
}



Bits error versus s



Bits error versus u
Results
Initial program 12.4
Simplified0.2
Applied add-cbrt-cube_binary320.2
Final simplification0.2
herbie shell --seed 2022077
(FPCore (s u)
:name "Disney BSSRDF, sample scattering profile, lower"
:precision binary32
:pre (and (and (<= 0.0 s) (<= s 256.0)) (and (<= 2.328306437e-10 u) (<= u 0.25)))
(* s (log (/ 1.0 (- 1.0 (* 4.0 u))))))