\left(3 \cdot s\right) \cdot \log \left(\frac{1}{1 - \frac{u - 0.25}{0.75}}\right)
\begin{array}{l}
t_0 := \log \left(\mathsf{fma}\left(u, -1.3333333333333333, 1.3333333333333333\right)\right)\\
s \cdot \sqrt[3]{\left(\left(t_0 \cdot t_0\right) \cdot \log \left(e^{\mathsf{log1p}\left(\mathsf{fma}\left(u, -1.3333333333333333, 1.3333333333333333\right)\right)} - 1\right)\right) \cdot -27}
\end{array}
(FPCore (s u) :precision binary32 (* (* 3.0 s) (log (/ 1.0 (- 1.0 (/ (- u 0.25) 0.75))))))
(FPCore (s u)
:precision binary32
(let* ((t_0 (log (fma u -1.3333333333333333 1.3333333333333333))))
(*
s
(cbrt
(*
(*
(* t_0 t_0)
(log
(- (exp (log1p (fma u -1.3333333333333333 1.3333333333333333))) 1.0)))
-27.0)))))float code(float s, float u) {
return (3.0f * s) * logf(1.0f / (1.0f - ((u - 0.25f) / 0.75f)));
}
float code(float s, float u) {
float t_0 = logf(fmaf(u, -1.3333333333333333f, 1.3333333333333333f));
return s * cbrtf(((t_0 * t_0) * logf(expf(log1pf(fmaf(u, -1.3333333333333333f, 1.3333333333333333f))) - 1.0f)) * -27.0f);
}



Bits error versus s



Bits error versus u
Initial program 1.3
Simplified1.0
Applied add-cbrt-cube_binary321.0
Applied add-cbrt-cube_binary321.0
Applied cbrt-unprod_binary321.0
Applied expm1-log1p-u_binary321.1
Applied expm1-udef_binary321.1
Final simplification1.1
herbie shell --seed 2022077
(FPCore (s u)
:name "Disney BSSRDF, sample scattering profile, upper"
:precision binary32
:pre (and (and (<= 0.0 s) (<= s 256.0)) (and (<= 0.25 u) (<= u 1.0)))
(* (* 3.0 s) (log (/ 1.0 (- 1.0 (/ (- u 0.25) 0.75))))))