Disney BSSRDF, PDF of scattering profile

Percentage Accurate: 99.6% → 99.6%
Time: 17.8s
Alternatives: 17
Speedup: N/A×

Specification

?
\[\left(0 \leq s \land s \leq 256\right) \land \left(10^{-6} < r \land r < 1000000\right)\]
\[\begin{array}{l} \\ \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (/ (* 0.25 (exp (/ (- r) s))) (* (* (* 2.0 PI) s) r))
  (/ (* 0.75 (exp (/ (- r) (* 3.0 s)))) (* (* (* 6.0 PI) s) r))))
float code(float s, float r) {
	return ((0.25f * expf((-r / s))) / (((2.0f * ((float) M_PI)) * s) * r)) + ((0.75f * expf((-r / (3.0f * s)))) / (((6.0f * ((float) M_PI)) * s) * r));
}
function code(s, r)
	return Float32(Float32(Float32(Float32(0.25) * exp(Float32(Float32(-r) / s))) / Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * s) * r)) + Float32(Float32(Float32(0.75) * exp(Float32(Float32(-r) / Float32(Float32(3.0) * s)))) / Float32(Float32(Float32(Float32(6.0) * Float32(pi)) * s) * r)))
end
function tmp = code(s, r)
	tmp = ((single(0.25) * exp((-r / s))) / (((single(2.0) * single(pi)) * s) * r)) + ((single(0.75) * exp((-r / (single(3.0) * s)))) / (((single(6.0) * single(pi)) * s) * r));
end
\begin{array}{l}

\\
\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r}
\end{array}

Sampling outcomes in binary32 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (/ (* 0.25 (exp (/ (- r) s))) (* (* (* 2.0 PI) s) r))
  (/ (* 0.75 (exp (/ (- r) (* 3.0 s)))) (* (* (* 6.0 PI) s) r))))
float code(float s, float r) {
	return ((0.25f * expf((-r / s))) / (((2.0f * ((float) M_PI)) * s) * r)) + ((0.75f * expf((-r / (3.0f * s)))) / (((6.0f * ((float) M_PI)) * s) * r));
}
function code(s, r)
	return Float32(Float32(Float32(Float32(0.25) * exp(Float32(Float32(-r) / s))) / Float32(Float32(Float32(Float32(2.0) * Float32(pi)) * s) * r)) + Float32(Float32(Float32(0.75) * exp(Float32(Float32(-r) / Float32(Float32(3.0) * s)))) / Float32(Float32(Float32(Float32(6.0) * Float32(pi)) * s) * r)))
end
function tmp = code(s, r)
	tmp = ((single(0.25) * exp((-r / s))) / (((single(2.0) * single(pi)) * s) * r)) + ((single(0.75) * exp((-r / (single(3.0) * s)))) / (((single(6.0) * single(pi)) * s) * r));
end
\begin{array}{l}

\\
\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r}
\end{array}

Alternative 1: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{0.25 \cdot e^{0 - \frac{r}{s}}}{r \cdot \left(s \cdot \left(2 \cdot \pi\right)\right)} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (/ (* 0.25 (exp (- 0.0 (/ r s)))) (* r (* s (* 2.0 PI))))
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))))
float code(float s, float r) {
	return ((0.25f * expf((0.0f - (r / s)))) / (r * (s * (2.0f * ((float) M_PI))))) + ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r));
}
function code(s, r)
	return Float32(Float32(Float32(Float32(0.25) * exp(Float32(Float32(0.0) - Float32(r / s)))) / Float32(r * Float32(s * Float32(Float32(2.0) * Float32(pi))))) + Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)))
end
function tmp = code(s, r)
	tmp = ((single(0.25) * exp((single(0.0) - (r / s)))) / (r * (s * (single(2.0) * single(pi))))) + ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r));
end
\begin{array}{l}

\\
\frac{0.25 \cdot e^{0 - \frac{r}{s}}}{r \cdot \left(s \cdot \left(2 \cdot \pi\right)\right)} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Final simplification99.7%

    \[\leadsto \frac{0.25 \cdot e^{0 - \frac{r}{s}}}{r \cdot \left(s \cdot \left(2 \cdot \pi\right)\right)} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  6. Add Preprocessing

Alternative 2: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
  (/ (/ (/ (/ 0.125 (exp (/ r s))) PI) s) r)))
float code(float s, float r) {
	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / expf((r / s))) / ((float) M_PI)) / s) / r);
}
function code(s, r)
	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / exp(Float32(r / s))) / Float32(pi)) / s) / r))
end
function tmp = code(s, r)
	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / exp((r / s))) / single(pi)) / s) / r);
end
\begin{array}{l}

\\
\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Step-by-step derivation
    1. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. distribute-frac-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. neg-sub0N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  6. Applied egg-rr99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  7. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. exp-diffN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. 1-expN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. PI-lowering-PI.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  8. Applied egg-rr99.6%

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  9. Final simplification99.6%

    \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}{r} \]
  10. Add Preprocessing

Alternative 3: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{0.125}{\pi} \cdot \left(\frac{e^{0 - \frac{r}{s}}}{s} + \frac{e^{\frac{r}{s} \cdot -0.3333333333333333}}{s}\right)}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (/
  (*
   (/ 0.125 PI)
   (+ (/ (exp (- 0.0 (/ r s))) s) (/ (exp (* (/ r s) -0.3333333333333333)) s)))
  r))
float code(float s, float r) {
	return ((0.125f / ((float) M_PI)) * ((expf((0.0f - (r / s))) / s) + (expf(((r / s) * -0.3333333333333333f)) / s))) / r;
}
function code(s, r)
	return Float32(Float32(Float32(Float32(0.125) / Float32(pi)) * Float32(Float32(exp(Float32(Float32(0.0) - Float32(r / s))) / s) + Float32(exp(Float32(Float32(r / s) * Float32(-0.3333333333333333))) / s))) / r)
end
function tmp = code(s, r)
	tmp = ((single(0.125) / single(pi)) * ((exp((single(0.0) - (r / s))) / s) + (exp(((r / s) * single(-0.3333333333333333))) / s))) / r;
end
\begin{array}{l}

\\
\frac{\frac{0.125}{\pi} \cdot \left(\frac{e^{0 - \frac{r}{s}}}{s} + \frac{e^{\frac{r}{s} \cdot -0.3333333333333333}}{s}\right)}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Taylor expanded in r around inf

    \[\leadsto \color{blue}{\frac{\frac{1}{8} \cdot \frac{e^{-1 \cdot \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)} + \frac{1}{8} \cdot \frac{e^{\frac{-1}{3} \cdot \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}}{r}} \]
  4. Simplified99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{\pi} \cdot \left(\frac{e^{0 - \frac{r}{s}}}{s} + \frac{e^{\frac{r}{s} \cdot -0.3333333333333333}}{s}\right)}{r}} \]
  5. Add Preprocessing

Alternative 4: 99.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{-3}}{s}}\right)}{\pi \cdot \left(r \cdot s\right)} \end{array} \]
(FPCore (s r)
 :precision binary32
 (/ (* 0.125 (+ (exp (- 0.0 (/ r s))) (exp (/ (/ r -3.0) s)))) (* PI (* r s))))
float code(float s, float r) {
	return (0.125f * (expf((0.0f - (r / s))) + expf(((r / -3.0f) / s)))) / (((float) M_PI) * (r * s));
}
function code(s, r)
	return Float32(Float32(Float32(0.125) * Float32(exp(Float32(Float32(0.0) - Float32(r / s))) + exp(Float32(Float32(r / Float32(-3.0)) / s)))) / Float32(Float32(pi) * Float32(r * s)))
end
function tmp = code(s, r)
	tmp = (single(0.125) * (exp((single(0.0) - (r / s))) + exp(((r / single(-3.0)) / s)))) / (single(pi) * (r * s));
end
\begin{array}{l}

\\
\frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{-3}}{s}}\right)}{\pi \cdot \left(r \cdot s\right)}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Simplified96.5%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \frac{\frac{1}{8}}{r \cdot s} \cdot \color{blue}{\frac{e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}}{\mathsf{PI}\left(\right)}} \]
    2. frac-timesN/A

      \[\leadsto \frac{\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)\right), \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
  5. Applied egg-rr99.5%

    \[\leadsto \color{blue}{\frac{0.125 \cdot \left(e^{\frac{-r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\left(r \cdot s\right) \cdot \pi}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\left(\frac{r}{-3 \cdot s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    2. associate-/r*N/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\left(\frac{\frac{r}{-3}}{s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    3. remove-double-negN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\left(\frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(r\right)\right)\right)}{-3}}{s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\left(\frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(r\right)\right)\right)}{\mathsf{neg}\left(3\right)}}{s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    5. frac-2negN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\left(\frac{\frac{\mathsf{neg}\left(r\right)}{3}}{s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    6. /-lowering-/.f32N/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{3}\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    7. frac-2negN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(r\right)\right)\right)}{\mathsf{neg}\left(3\right)}\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    8. remove-double-negN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\left(\frac{r}{\mathsf{neg}\left(3\right)}\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\left(\frac{r}{-3}\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
    10. /-lowering-/.f3299.5%

      \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(r, -3\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
  7. Applied egg-rr99.5%

    \[\leadsto \frac{0.125 \cdot \left(e^{\frac{-r}{s}} + e^{\color{blue}{\frac{\frac{r}{-3}}{s}}}\right)}{\left(r \cdot s\right) \cdot \pi} \]
  8. Final simplification99.5%

    \[\leadsto \frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{-3}}{s}}\right)}{\pi \cdot \left(r \cdot s\right)} \]
  9. Add Preprocessing

Alternative 5: 99.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\pi \cdot \left(r \cdot s\right)} \end{array} \]
(FPCore (s r)
 :precision binary32
 (/ (* 0.125 (+ (exp (- 0.0 (/ r s))) (exp (/ r (* s -3.0))))) (* PI (* r s))))
float code(float s, float r) {
	return (0.125f * (expf((0.0f - (r / s))) + expf((r / (s * -3.0f))))) / (((float) M_PI) * (r * s));
}
function code(s, r)
	return Float32(Float32(Float32(0.125) * Float32(exp(Float32(Float32(0.0) - Float32(r / s))) + exp(Float32(r / Float32(s * Float32(-3.0)))))) / Float32(Float32(pi) * Float32(r * s)))
end
function tmp = code(s, r)
	tmp = (single(0.125) * (exp((single(0.0) - (r / s))) + exp((r / (s * single(-3.0)))))) / (single(pi) * (r * s));
end
\begin{array}{l}

\\
\frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\pi \cdot \left(r \cdot s\right)}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Simplified96.5%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \frac{\frac{1}{8}}{r \cdot s} \cdot \color{blue}{\frac{e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}}{\mathsf{PI}\left(\right)}} \]
    2. frac-timesN/A

      \[\leadsto \frac{\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)\right), \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
  5. Applied egg-rr99.5%

    \[\leadsto \color{blue}{\frac{0.125 \cdot \left(e^{\frac{-r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\left(r \cdot s\right) \cdot \pi}} \]
  6. Final simplification99.5%

    \[\leadsto \frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\pi \cdot \left(r \cdot s\right)} \]
  7. Add Preprocessing

Alternative 6: 74.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + r \cdot \left(0.16666666666666666 \cdot \frac{r}{s \cdot \left(s \cdot s\right)} + \frac{0.5}{s \cdot s}\right)\right) + 1}}{\pi}}{s}}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
  (/
   (/
    (/
     (/
      0.125
      (+
       (*
        r
        (+
         (/ 1.0 s)
         (*
          r
          (+ (* 0.16666666666666666 (/ r (* s (* s s)))) (/ 0.5 (* s s))))))
       1.0))
     PI)
    s)
   r)))
float code(float s, float r) {
	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / ((r * ((1.0f / s) + (r * ((0.16666666666666666f * (r / (s * (s * s)))) + (0.5f / (s * s)))))) + 1.0f)) / ((float) M_PI)) / s) / r);
}
function code(s, r)
	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / Float32(Float32(r * Float32(Float32(Float32(1.0) / s) + Float32(r * Float32(Float32(Float32(0.16666666666666666) * Float32(r / Float32(s * Float32(s * s)))) + Float32(Float32(0.5) / Float32(s * s)))))) + Float32(1.0))) / Float32(pi)) / s) / r))
end
function tmp = code(s, r)
	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / ((r * ((single(1.0) / s) + (r * ((single(0.16666666666666666) * (r / (s * (s * s)))) + (single(0.5) / (s * s)))))) + single(1.0))) / single(pi)) / s) / r);
end
\begin{array}{l}

\\
\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + r \cdot \left(0.16666666666666666 \cdot \frac{r}{s \cdot \left(s \cdot s\right)} + \frac{0.5}{s \cdot s}\right)\right) + 1}}{\pi}}{s}}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Step-by-step derivation
    1. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. distribute-frac-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. neg-sub0N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  6. Applied egg-rr99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  7. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. exp-diffN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. 1-expN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. PI-lowering-PI.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  8. Applied egg-rr99.6%

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  9. Taylor expanded in r around 0

    \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \color{blue}{\left(1 + r \cdot \left(r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) + \frac{1}{s}\right)\right)}\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  10. Step-by-step derivation
    1. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \left(r \cdot \left(r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) + \frac{1}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) + \frac{1}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. +-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\left(\frac{1}{s}\right), \left(r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(r \cdot \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \left(\frac{1}{6} \cdot \frac{r}{{s}^{3}} + \frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\left(\frac{1}{6} \cdot \frac{r}{{s}^{3}}\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \left(\frac{r}{{s}^{3}}\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \left({s}^{3}\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. cube-multN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \left(s \cdot \left(s \cdot s\right)\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \left(s \cdot {s}^{2}\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \left({s}^{2}\right)\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \left(s \cdot s\right)\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \left(\frac{\frac{1}{2} \cdot 1}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \left(\frac{\frac{1}{2}}{{s}^{2}}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    17. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \mathsf{/.f32}\left(\frac{1}{2}, \left({s}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    18. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \mathsf{/.f32}\left(\frac{1}{2}, \left(s \cdot s\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    19. *-lowering-*.f3272.3%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\frac{1}{6}, \mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(s, s\right)\right)\right)\right), \mathsf{/.f32}\left(\frac{1}{2}, \mathsf{*.f32}\left(s, s\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  11. Simplified72.3%

    \[\leadsto \frac{\frac{\frac{\frac{0.125}{\color{blue}{1 + r \cdot \left(\frac{1}{s} + r \cdot \left(0.16666666666666666 \cdot \frac{r}{s \cdot \left(s \cdot s\right)} + \frac{0.5}{s \cdot s}\right)\right)}}}{\pi}}{s}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  12. Final simplification72.3%

    \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + r \cdot \left(0.16666666666666666 \cdot \frac{r}{s \cdot \left(s \cdot s\right)} + \frac{0.5}{s \cdot s}\right)\right) + 1}}{\pi}}{s}}{r} \]
  13. Add Preprocessing

Alternative 7: 71.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r + \frac{\frac{0.16666666666666666 \cdot \left(r \cdot \left(r \cdot r\right)\right)}{s} + r \cdot \left(r \cdot 0.5\right)}{s}}{s} + 1}}{\pi}}{s}}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
  (/
   (/
    (/
     (/
      0.125
      (+
       (/
        (+
         r
         (/ (+ (/ (* 0.16666666666666666 (* r (* r r))) s) (* r (* r 0.5))) s))
        s)
       1.0))
     PI)
    s)
   r)))
float code(float s, float r) {
	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / (((r + ((((0.16666666666666666f * (r * (r * r))) / s) + (r * (r * 0.5f))) / s)) / s) + 1.0f)) / ((float) M_PI)) / s) / r);
}
function code(s, r)
	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / Float32(Float32(Float32(r + Float32(Float32(Float32(Float32(Float32(0.16666666666666666) * Float32(r * Float32(r * r))) / s) + Float32(r * Float32(r * Float32(0.5)))) / s)) / s) + Float32(1.0))) / Float32(pi)) / s) / r))
end
function tmp = code(s, r)
	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / (((r + ((((single(0.16666666666666666) * (r * (r * r))) / s) + (r * (r * single(0.5)))) / s)) / s) + single(1.0))) / single(pi)) / s) / r);
end
\begin{array}{l}

\\
\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r + \frac{\frac{0.16666666666666666 \cdot \left(r \cdot \left(r \cdot r\right)\right)}{s} + r \cdot \left(r \cdot 0.5\right)}{s}}{s} + 1}}{\pi}}{s}}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Step-by-step derivation
    1. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. distribute-frac-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. neg-sub0N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  6. Applied egg-rr99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  7. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. exp-diffN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. 1-expN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. PI-lowering-PI.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  8. Applied egg-rr99.6%

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  9. Taylor expanded in s around -inf

    \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot r + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{r}^{3}}{s} + \frac{1}{2} \cdot {r}^{2}}{s}}{s}\right)}\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  10. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(1 + \left(\mathsf{neg}\left(\frac{-1 \cdot r + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{r}^{3}}{s} + \frac{1}{2} \cdot {r}^{2}}{s}}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. unsub-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(1 - \frac{-1 \cdot r + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{r}^{3}}{s} + \frac{1}{2} \cdot {r}^{2}}{s}}{s}\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \left(\frac{-1 \cdot r + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{r}^{3}}{s} + \frac{1}{2} \cdot {r}^{2}}{s}}{s}\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(-1 \cdot r + -1 \cdot \frac{\frac{1}{6} \cdot \frac{{r}^{3}}{s} + \frac{1}{2} \cdot {r}^{2}}{s}\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  11. Simplified69.8%

    \[\leadsto \frac{\frac{\frac{\frac{0.125}{\color{blue}{1 - \frac{\left(-r\right) - \frac{\frac{0.16666666666666666 \cdot \left(r \cdot \left(r \cdot r\right)\right)}{s} + r \cdot \left(r \cdot 0.5\right)}{s}}{s}}}}{\pi}}{s}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  12. Final simplification69.8%

    \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r + \frac{\frac{0.16666666666666666 \cdot \left(r \cdot \left(r \cdot r\right)\right)}{s} + r \cdot \left(r \cdot 0.5\right)}{s}}{s} + 1}}{\pi}}{s}}{r} \]
  13. Add Preprocessing

Alternative 8: 58.1% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + \frac{\frac{r \cdot 0.5}{s}}{s}\right) + 1}}{\pi}}{s}}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
  (/
   (/ (/ (/ 0.125 (+ (* r (+ (/ 1.0 s) (/ (/ (* r 0.5) s) s))) 1.0)) PI) s)
   r)))
float code(float s, float r) {
	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / ((r * ((1.0f / s) + (((r * 0.5f) / s) / s))) + 1.0f)) / ((float) M_PI)) / s) / r);
}
function code(s, r)
	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / Float32(Float32(r * Float32(Float32(Float32(1.0) / s) + Float32(Float32(Float32(r * Float32(0.5)) / s) / s))) + Float32(1.0))) / Float32(pi)) / s) / r))
end
function tmp = code(s, r)
	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / ((r * ((single(1.0) / s) + (((r * single(0.5)) / s) / s))) + single(1.0))) / single(pi)) / s) / r);
end
\begin{array}{l}

\\
\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + \frac{\frac{r \cdot 0.5}{s}}{s}\right) + 1}}{\pi}}{s}}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Step-by-step derivation
    1. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. distribute-frac-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. neg-sub0N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  6. Applied egg-rr99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  7. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. exp-diffN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. 1-expN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. PI-lowering-PI.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  8. Applied egg-rr99.6%

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  9. Taylor expanded in r around 0

    \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \color{blue}{\left(1 + r \cdot \left(\frac{1}{2} \cdot \frac{r}{{s}^{2}} + \frac{1}{s}\right)\right)}\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  10. Step-by-step derivation
    1. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \left(r \cdot \left(\frac{1}{2} \cdot \frac{r}{{s}^{2}} + \frac{1}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{2} \cdot \frac{r}{{s}^{2}} + \frac{1}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. +-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + \frac{1}{2} \cdot \frac{r}{{s}^{2}}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + \frac{\frac{1}{2} \cdot r}{{s}^{2}}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + \frac{\frac{1}{2}}{{s}^{2}} \cdot r\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + \frac{\frac{1}{2} \cdot 1}{{s}^{2}} \cdot r\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \left(\frac{1}{s} + \left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) \cdot r\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. +-lowering-+.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\left(\frac{1}{s}\right), \left(\left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) \cdot r\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\left(\frac{1}{2} \cdot \frac{1}{{s}^{2}}\right) \cdot r\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\frac{\frac{1}{2} \cdot 1}{{s}^{2}} \cdot r\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\frac{\frac{1}{2}}{{s}^{2}} \cdot r\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\frac{\frac{1}{2} \cdot r}{{s}^{2}}\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\frac{\frac{1}{2} \cdot r}{s \cdot s}\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \left(\frac{\frac{\frac{1}{2} \cdot r}{s}}{s}\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{/.f32}\left(\left(\frac{\frac{1}{2} \cdot r}{s}\right), s\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{2} \cdot r\right), s\right), s\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    17. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(r \cdot \frac{1}{2}\right), s\right), s\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    18. *-lowering-*.f3255.2%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{+.f32}\left(\mathsf{/.f32}\left(1, s\right), \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(r, \frac{1}{2}\right), s\right), s\right)\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  11. Simplified55.2%

    \[\leadsto \frac{\frac{\frac{\frac{0.125}{\color{blue}{1 + r \cdot \left(\frac{1}{s} + \frac{\frac{r \cdot 0.5}{s}}{s}\right)}}}{\pi}}{s}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  12. Final simplification55.2%

    \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{r \cdot \left(\frac{1}{s} + \frac{\frac{r \cdot 0.5}{s}}{s}\right) + 1}}{\pi}}{s}}{r} \]
  13. Add Preprocessing

Alternative 9: 56.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r - \frac{\left(r \cdot r\right) \cdot -0.5}{s}}{s} + 1}}{\pi}}{s}}{r} \end{array} \]
(FPCore (s r)
 :precision binary32
 (+
  (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
  (/ (/ (/ (/ 0.125 (+ (/ (- r (/ (* (* r r) -0.5) s)) s) 1.0)) PI) s) r)))
float code(float s, float r) {
	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / (((r - (((r * r) * -0.5f) / s)) / s) + 1.0f)) / ((float) M_PI)) / s) / r);
}
function code(s, r)
	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / Float32(Float32(Float32(r - Float32(Float32(Float32(r * r) * Float32(-0.5)) / s)) / s) + Float32(1.0))) / Float32(pi)) / s) / r))
end
function tmp = code(s, r)
	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / (((r - (((r * r) * single(-0.5)) / s)) / s) + single(1.0))) / single(pi)) / s) / r);
end
\begin{array}{l}

\\
\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r - \frac{\left(r \cdot r\right) \cdot -0.5}{s}}{s} + 1}}{\pi}}{s}}{r}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
    2. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
    3. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
  4. Applied egg-rr99.7%

    \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
  5. Step-by-step derivation
    1. times-fracN/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. PI-lowering-PI.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. distribute-frac-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    14. neg-sub0N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    15. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    16. /-lowering-/.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  6. Applied egg-rr99.6%

    \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  7. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. exp-diffN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. 1-expN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. un-div-invN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. exp-lowering-exp.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. PI-lowering-PI.f3299.6%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  8. Applied egg-rr99.6%

    \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  9. Taylor expanded in s around -inf

    \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \color{blue}{\left(1 + -1 \cdot \frac{-1 \cdot r + \frac{-1}{2} \cdot \frac{{r}^{2}}{s}}{s}\right)}\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  10. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(1 + \left(\mathsf{neg}\left(\frac{-1 \cdot r + \frac{-1}{2} \cdot \frac{{r}^{2}}{s}}{s}\right)\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    2. unsub-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(1 - \frac{-1 \cdot r + \frac{-1}{2} \cdot \frac{{r}^{2}}{s}}{s}\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    3. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \left(\frac{-1 \cdot r + \frac{-1}{2} \cdot \frac{{r}^{2}}{s}}{s}\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    4. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(-1 \cdot r + \frac{-1}{2} \cdot \frac{{r}^{2}}{s}\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    5. +-commutativeN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(\frac{-1}{2} \cdot \frac{{r}^{2}}{s} + -1 \cdot r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    6. mul-1-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(\frac{-1}{2} \cdot \frac{{r}^{2}}{s} + \left(\mathsf{neg}\left(r\right)\right)\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    7. unsub-negN/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(\frac{-1}{2} \cdot \frac{{r}^{2}}{s} - r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    8. --lowering--.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\left(\frac{-1}{2} \cdot \frac{{r}^{2}}{s}\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    9. associate-*r/N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\left(\frac{\frac{-1}{2} \cdot {r}^{2}}{s}\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    10. /-lowering-/.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\mathsf{/.f32}\left(\left(\frac{-1}{2} \cdot {r}^{2}\right), s\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    11. *-lowering-*.f32N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{-1}{2}, \left({r}^{2}\right)\right), s\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    12. unpow2N/A

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{-1}{2}, \left(r \cdot r\right)\right), s\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
    13. *-lowering-*.f3253.7%

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{\_.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{-1}{2}, \mathsf{*.f32}\left(r, r\right)\right), s\right), r\right), s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
  11. Simplified53.7%

    \[\leadsto \frac{\frac{\frac{\frac{0.125}{\color{blue}{1 - \frac{\frac{-0.5 \cdot \left(r \cdot r\right)}{s} - r}{s}}}}{\pi}}{s}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
  12. Final simplification53.7%

    \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r - \frac{\left(r \cdot r\right) \cdot -0.5}{s}}{s} + 1}}{\pi}}{s}}{r} \]
  13. Add Preprocessing

Alternative 10: 13.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\\ \mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{t\_0 \cdot t\_0}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + \left(1 - \frac{\frac{r \cdot r}{s} \cdot -0.05555555555555555 + r \cdot 0.3333333333333333}{s}\right)\right)}{\pi \cdot \left(r \cdot s\right)}\\ \end{array} \end{array} \]
(FPCore (s r)
 :precision binary32
 (let* ((t_0 (* r (* (* s PI) -6.0))))
   (if (<= s 1.4459999874816276e-5)
     (/
      (- (/ (/ 0.015625 (* (* s PI) (* s PI))) (* r r)) (/ 0.5625 (* t_0 t_0)))
      (- (/ (/ 0.125 (* s PI)) r) (/ 0.75 (* 6.0 (* r (* s PI))))))
     (/
      (*
       0.125
       (+
        (exp (- 0.0 (/ r s)))
        (-
         1.0
         (/
          (+ (* (/ (* r r) s) -0.05555555555555555) (* r 0.3333333333333333))
          s))))
      (* PI (* r s))))))
float code(float s, float r) {
	float t_0 = r * ((s * ((float) M_PI)) * -6.0f);
	float tmp;
	if (s <= 1.4459999874816276e-5f) {
		tmp = (((0.015625f / ((s * ((float) M_PI)) * (s * ((float) M_PI)))) / (r * r)) - (0.5625f / (t_0 * t_0))) / (((0.125f / (s * ((float) M_PI))) / r) - (0.75f / (6.0f * (r * (s * ((float) M_PI))))));
	} else {
		tmp = (0.125f * (expf((0.0f - (r / s))) + (1.0f - (((((r * r) / s) * -0.05555555555555555f) + (r * 0.3333333333333333f)) / s)))) / (((float) M_PI) * (r * s));
	}
	return tmp;
}
function code(s, r)
	t_0 = Float32(r * Float32(Float32(s * Float32(pi)) * Float32(-6.0)))
	tmp = Float32(0.0)
	if (s <= Float32(1.4459999874816276e-5))
		tmp = Float32(Float32(Float32(Float32(Float32(0.015625) / Float32(Float32(s * Float32(pi)) * Float32(s * Float32(pi)))) / Float32(r * r)) - Float32(Float32(0.5625) / Float32(t_0 * t_0))) / Float32(Float32(Float32(Float32(0.125) / Float32(s * Float32(pi))) / r) - Float32(Float32(0.75) / Float32(Float32(6.0) * Float32(r * Float32(s * Float32(pi)))))));
	else
		tmp = Float32(Float32(Float32(0.125) * Float32(exp(Float32(Float32(0.0) - Float32(r / s))) + Float32(Float32(1.0) - Float32(Float32(Float32(Float32(Float32(r * r) / s) * Float32(-0.05555555555555555)) + Float32(r * Float32(0.3333333333333333))) / s)))) / Float32(Float32(pi) * Float32(r * s)));
	end
	return tmp
end
function tmp_2 = code(s, r)
	t_0 = r * ((s * single(pi)) * single(-6.0));
	tmp = single(0.0);
	if (s <= single(1.4459999874816276e-5))
		tmp = (((single(0.015625) / ((s * single(pi)) * (s * single(pi)))) / (r * r)) - (single(0.5625) / (t_0 * t_0))) / (((single(0.125) / (s * single(pi))) / r) - (single(0.75) / (single(6.0) * (r * (s * single(pi))))));
	else
		tmp = (single(0.125) * (exp((single(0.0) - (r / s))) + (single(1.0) - (((((r * r) / s) * single(-0.05555555555555555)) + (r * single(0.3333333333333333))) / s)))) / (single(pi) * (r * s));
	end
	tmp_2 = tmp;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\\
\mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{t\_0 \cdot t\_0}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + \left(1 - \frac{\frac{r \cdot r}{s} \cdot -0.05555555555555555 + r \cdot 0.3333333333333333}{s}\right)\right)}{\pi \cdot \left(r \cdot s\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if s < 1.44599999e-5

    1. Initial program 99.9%

      \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
    2. Add Preprocessing
    3. Taylor expanded in r around 0

      \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\color{blue}{\frac{1}{4}}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{3}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), \mathsf{*.f32}\left(3, s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(6, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right)\right) \]
    4. Step-by-step derivation
      1. Simplified4.6%

        \[\leadsto \frac{\color{blue}{0.25}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
      2. Taylor expanded in r around 0

        \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{/.f32}\left(\color{blue}{\frac{3}{4}}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(6, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right)\right) \]
      3. Step-by-step derivation
        1. Simplified4.6%

          \[\leadsto \frac{0.25}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{\color{blue}{0.75}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
        2. Step-by-step derivation
          1. frac-2negN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{4}\right)}{\color{blue}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}}\right)\right) \]
          2. div-invN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\left(\mathsf{neg}\left(\frac{3}{4}\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}}\right)\right) \]
          3. *-lowering-*.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\mathsf{neg}\left(\frac{3}{4}\right)\right), \color{blue}{\left(\frac{1}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}\right)}\right)\right) \]
          4. metadata-evalN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \left(\frac{\color{blue}{1}}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}\right)\right)\right) \]
          5. /-lowering-/.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)\right)}\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)\right)\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 6\right) \cdot s\right)\right)\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)\right)\right)\right)\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(r \cdot \color{blue}{\left(\mathsf{neg}\left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)}\right)\right)\right)\right) \]
          10. *-lowering-*.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \color{blue}{\left(\mathsf{neg}\left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)}\right)\right)\right)\right) \]
          11. associate-*r*N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \left(\mathsf{neg}\left(\left(s \cdot \mathsf{PI}\left(\right)\right) \cdot 6\right)\right)\right)\right)\right)\right) \]
          12. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \left(\left(s \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right)\right) \]
          13. *-lowering-*.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\left(s \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right)\right) \]
          14. *-lowering-*.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right), \left(\mathsf{neg}\left(\color{blue}{6}\right)\right)\right)\right)\right)\right)\right) \]
          15. PI-lowering-PI.f32N/A

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), \left(\mathsf{neg}\left(6\right)\right)\right)\right)\right)\right)\right) \]
          16. metadata-eval4.6%

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), -6\right)\right)\right)\right)\right) \]
        3. Applied egg-rr4.6%

          \[\leadsto \frac{0.25}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{-0.75 \cdot \frac{1}{r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)}} \]
        4. Applied egg-rr8.4%

          \[\leadsto \color{blue}{\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{\left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right) \cdot \left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right)}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{\left(r \cdot \left(s \cdot \pi\right)\right) \cdot 6}}} \]

        if 1.44599999e-5 < s

        1. Initial program 98.2%

          \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
        2. Simplified98.0%

          \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \frac{\frac{1}{8}}{r \cdot s} \cdot \color{blue}{\frac{e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}}{\mathsf{PI}\left(\right)}} \]
          2. frac-timesN/A

            \[\leadsto \frac{\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
          3. /-lowering-/.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)\right), \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        5. Applied egg-rr97.3%

          \[\leadsto \color{blue}{\frac{0.125 \cdot \left(e^{\frac{-r}{s}} + e^{\frac{r}{s \cdot -3}}\right)}{\left(r \cdot s\right) \cdot \pi}} \]
        6. Taylor expanded in s around -inf

          \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \color{blue}{\left(1 + -1 \cdot \frac{\frac{-1}{18} \cdot \frac{{r}^{2}}{s} + \frac{1}{3} \cdot r}{s}\right)}\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \left(1 + \left(\mathsf{neg}\left(\frac{\frac{-1}{18} \cdot \frac{{r}^{2}}{s} + \frac{1}{3} \cdot r}{s}\right)\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          2. unsub-negN/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \left(1 - \frac{\frac{-1}{18} \cdot \frac{{r}^{2}}{s} + \frac{1}{3} \cdot r}{s}\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          3. --lowering--.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \left(\frac{\frac{-1}{18} \cdot \frac{{r}^{2}}{s} + \frac{1}{3} \cdot r}{s}\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          4. /-lowering-/.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\left(\frac{-1}{18} \cdot \frac{{r}^{2}}{s} + \frac{1}{3} \cdot r\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          5. +-lowering-+.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\left(\frac{-1}{18} \cdot \frac{{r}^{2}}{s}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\left(\frac{{r}^{2}}{s} \cdot \frac{-1}{18}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          7. *-lowering-*.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\left(\frac{{r}^{2}}{s}\right), \frac{-1}{18}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          8. /-lowering-/.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\left({r}^{2}\right), s\right), \frac{-1}{18}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\left(r \cdot r\right), s\right), \frac{-1}{18}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          10. *-lowering-*.f32N/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(r, r\right), s\right), \frac{-1}{18}\right), \left(\frac{1}{3} \cdot r\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          11. *-commutativeN/A

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(r, r\right), s\right), \frac{-1}{18}\right), \left(r \cdot \frac{1}{3}\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
          12. *-lowering-*.f3245.1%

            \[\leadsto \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right), \mathsf{\_.f32}\left(1, \mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(r, r\right), s\right), \frac{-1}{18}\right), \mathsf{*.f32}\left(r, \frac{1}{3}\right)\right), s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(r, s\right), \mathsf{PI.f32}\left(\right)\right)\right) \]
        8. Simplified45.1%

          \[\leadsto \frac{0.125 \cdot \left(e^{\frac{-r}{s}} + \color{blue}{\left(1 - \frac{\frac{r \cdot r}{s} \cdot -0.05555555555555555 + r \cdot 0.3333333333333333}{s}\right)}\right)}{\left(r \cdot s\right) \cdot \pi} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification14.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{\left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right) \cdot \left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right)}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.125 \cdot \left(e^{0 - \frac{r}{s}} + \left(1 - \frac{\frac{r \cdot r}{s} \cdot -0.05555555555555555 + r \cdot 0.3333333333333333}{s}\right)\right)}{\pi \cdot \left(r \cdot s\right)}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 11: 15.6% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r}{s} + 1}}{\pi}}{s}}{r} \end{array} \]
      (FPCore (s r)
       :precision binary32
       (+
        (* (/ (exp (/ r (* s -3.0))) (* s (* PI 6.0))) (/ 0.75 r))
        (/ (/ (/ (/ 0.125 (+ (/ r s) 1.0)) PI) s) r)))
      float code(float s, float r) {
      	return ((expf((r / (s * -3.0f))) / (s * (((float) M_PI) * 6.0f))) * (0.75f / r)) + ((((0.125f / ((r / s) + 1.0f)) / ((float) M_PI)) / s) / r);
      }
      
      function code(s, r)
      	return Float32(Float32(Float32(exp(Float32(r / Float32(s * Float32(-3.0)))) / Float32(s * Float32(Float32(pi) * Float32(6.0)))) * Float32(Float32(0.75) / r)) + Float32(Float32(Float32(Float32(Float32(0.125) / Float32(Float32(r / s) + Float32(1.0))) / Float32(pi)) / s) / r))
      end
      
      function tmp = code(s, r)
      	tmp = ((exp((r / (s * single(-3.0)))) / (s * (single(pi) * single(6.0)))) * (single(0.75) / r)) + ((((single(0.125) / ((r / s) + single(1.0))) / single(pi)) / s) / r);
      end
      
      \begin{array}{l}
      
      \\
      \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r}{s} + 1}}{\pi}}{s}}{r}
      \end{array}
      
      Derivation
      1. Initial program 99.6%

        \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}} \cdot \frac{3}{4}}{\color{blue}{\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)} \cdot r}\right)\right) \]
        2. times-fracN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \color{blue}{\frac{\frac{3}{4}}{r}}\right)\right) \]
        3. *-lowering-*.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{1}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), s\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\frac{e^{\frac{\mathsf{neg}\left(r\right)}{3 \cdot s}}}{\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \color{blue}{\left(\frac{\frac{3}{4}}{r}\right)}\right)\right) \]
      4. Applied egg-rr99.7%

        \[\leadsto \frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{\frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r}} \]
      5. Step-by-step derivation
        1. times-fracN/A

          \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot \frac{e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        2. associate-*r/N/A

          \[\leadsto \mathsf{+.f32}\left(\left(\frac{\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}}{r}\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        3. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s} \cdot e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right), r\right), \mathsf{*.f32}\left(\color{blue}{\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right)}, \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        4. *-lowering-*.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{\left(2 \cdot \mathsf{PI}\left(\right)\right) \cdot s}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(\mathsf{PI}\left(\right) \cdot s\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{4}}{2 \cdot \left(s \cdot \mathsf{PI}\left(\right)\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        7. associate-/r*N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{\frac{1}{4}}{2}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\left(\frac{\frac{1}{8}}{s \cdot \mathsf{PI}\left(\right)}\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        9. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(s \cdot \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        10. *-lowering-*.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        11. PI-lowering-PI.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \left(e^{\frac{\mathsf{neg}\left(r\right)}{s}}\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{-3}\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        12. exp-lowering-exp.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\frac{\mathsf{neg}\left(r\right)}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        13. distribute-frac-negN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(\mathsf{neg}\left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        14. neg-sub0N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\left(0 - \frac{r}{s}\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        15. --lowering--.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \left(\frac{r}{s}\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        16. /-lowering-/.f3299.6%

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right), \mathsf{exp.f32}\left(\mathsf{\_.f32}\left(0, \mathsf{/.f32}\left(r, s\right)\right)\right)\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
      6. Applied egg-rr99.6%

        \[\leadsto \color{blue}{\frac{\frac{0.125}{s \cdot \pi} \cdot e^{0 - \frac{r}{s}}}{r}} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
      7. Step-by-step derivation
        1. associate-*l/N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{s \cdot \mathsf{PI}\left(\right)}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right) \cdot s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        3. associate-/r*N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}}{s}\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        4. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8} \cdot e^{0 - \frac{r}{s}}}{\mathsf{PI}\left(\right)}\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\color{blue}{\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right)}, \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        5. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot e^{0 - \frac{r}{s}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\color{blue}{\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)}\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        6. exp-diffN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{e^{0}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        7. 1-expN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{8} \cdot \frac{1}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        8. un-div-invN/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{\frac{1}{8}}{e^{\frac{r}{s}}}\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        9. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \left(e^{\frac{r}{s}}\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(\color{blue}{r}, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        10. exp-lowering-exp.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\left(\frac{r}{s}\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        11. /-lowering-/.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        12. PI-lowering-PI.f3299.6%

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \color{blue}{\mathsf{*.f32}\left(s, -3\right)}\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
      8. Applied egg-rr99.6%

        \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{0.125}{e^{\frac{r}{s}}}}{\pi}}{s}}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
      9. Taylor expanded in r around 0

        \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \color{blue}{\left(1 + \frac{r}{s}\right)}\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
      10. Step-by-step derivation
        1. +-lowering-+.f32N/A

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \left(\frac{r}{s}\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
        2. /-lowering-/.f3215.5%

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{8}, \mathsf{+.f32}\left(1, \mathsf{/.f32}\left(r, s\right)\right)\right), \mathsf{PI.f32}\left(\right)\right), s\right), r\right), \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{exp.f32}\left(\mathsf{/.f32}\left(r, \mathsf{*.f32}\left(s, -3\right)\right)\right), \mathsf{*.f32}\left(s, \mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), 6\right)\right)\right), \mathsf{/.f32}\left(\frac{3}{4}, r\right)\right)\right) \]
      11. Simplified15.5%

        \[\leadsto \frac{\frac{\frac{\frac{0.125}{\color{blue}{1 + \frac{r}{s}}}}{\pi}}{s}}{r} + \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} \]
      12. Final simplification15.5%

        \[\leadsto \frac{e^{\frac{r}{s \cdot -3}}}{s \cdot \left(\pi \cdot 6\right)} \cdot \frac{0.75}{r} + \frac{\frac{\frac{\frac{0.125}{\frac{r}{s} + 1}}{\pi}}{s}}{r} \]
      13. Add Preprocessing

      Alternative 12: 12.8% accurate, 4.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\\ \mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{t\_0 \cdot t\_0}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}{\pi}\\ \end{array} \end{array} \]
      (FPCore (s r)
       :precision binary32
       (let* ((t_0 (* r (* (* s PI) -6.0))))
         (if (<= s 1.4459999874816276e-5)
           (/
            (- (/ (/ 0.015625 (* (* s PI) (* s PI))) (* r r)) (/ 0.5625 (* t_0 t_0)))
            (- (/ (/ 0.125 (* s PI)) r) (/ 0.75 (* 6.0 (* r (* s PI))))))
           (/
            (/
             (+
              (/ 0.25 r)
              (/
               (+ -0.16666666666666666 (* 0.125 (/ (* r 0.5555555555555556) s)))
               s))
             s)
            PI))))
      float code(float s, float r) {
      	float t_0 = r * ((s * ((float) M_PI)) * -6.0f);
      	float tmp;
      	if (s <= 1.4459999874816276e-5f) {
      		tmp = (((0.015625f / ((s * ((float) M_PI)) * (s * ((float) M_PI)))) / (r * r)) - (0.5625f / (t_0 * t_0))) / (((0.125f / (s * ((float) M_PI))) / r) - (0.75f / (6.0f * (r * (s * ((float) M_PI))))));
      	} else {
      		tmp = (((0.25f / r) + ((-0.16666666666666666f + (0.125f * ((r * 0.5555555555555556f) / s))) / s)) / s) / ((float) M_PI);
      	}
      	return tmp;
      }
      
      function code(s, r)
      	t_0 = Float32(r * Float32(Float32(s * Float32(pi)) * Float32(-6.0)))
      	tmp = Float32(0.0)
      	if (s <= Float32(1.4459999874816276e-5))
      		tmp = Float32(Float32(Float32(Float32(Float32(0.015625) / Float32(Float32(s * Float32(pi)) * Float32(s * Float32(pi)))) / Float32(r * r)) - Float32(Float32(0.5625) / Float32(t_0 * t_0))) / Float32(Float32(Float32(Float32(0.125) / Float32(s * Float32(pi))) / r) - Float32(Float32(0.75) / Float32(Float32(6.0) * Float32(r * Float32(s * Float32(pi)))))));
      	else
      		tmp = Float32(Float32(Float32(Float32(Float32(0.25) / r) + Float32(Float32(Float32(-0.16666666666666666) + Float32(Float32(0.125) * Float32(Float32(r * Float32(0.5555555555555556)) / s))) / s)) / s) / Float32(pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(s, r)
      	t_0 = r * ((s * single(pi)) * single(-6.0));
      	tmp = single(0.0);
      	if (s <= single(1.4459999874816276e-5))
      		tmp = (((single(0.015625) / ((s * single(pi)) * (s * single(pi)))) / (r * r)) - (single(0.5625) / (t_0 * t_0))) / (((single(0.125) / (s * single(pi))) / r) - (single(0.75) / (single(6.0) * (r * (s * single(pi))))));
      	else
      		tmp = (((single(0.25) / r) + ((single(-0.16666666666666666) + (single(0.125) * ((r * single(0.5555555555555556)) / s))) / s)) / s) / single(pi);
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\\
      \mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\
      \;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{t\_0 \cdot t\_0}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if s < 1.44599999e-5

        1. Initial program 99.9%

          \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
        2. Add Preprocessing
        3. Taylor expanded in r around 0

          \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\color{blue}{\frac{1}{4}}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{/.f32}\left(\mathsf{*.f32}\left(\frac{3}{4}, \mathsf{exp.f32}\left(\mathsf{/.f32}\left(\mathsf{neg.f32}\left(r\right), \mathsf{*.f32}\left(3, s\right)\right)\right)\right), \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(6, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right)\right) \]
        4. Step-by-step derivation
          1. Simplified4.6%

            \[\leadsto \frac{\color{blue}{0.25}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Taylor expanded in r around 0

            \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{/.f32}\left(\color{blue}{\frac{3}{4}}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(6, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right)\right) \]
          3. Step-by-step derivation
            1. Simplified4.6%

              \[\leadsto \frac{0.25}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{\color{blue}{0.75}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
            2. Step-by-step derivation
              1. frac-2negN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\frac{\mathsf{neg}\left(\frac{3}{4}\right)}{\color{blue}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}}\right)\right) \]
              2. div-invN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \left(\left(\mathsf{neg}\left(\frac{3}{4}\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}}\right)\right) \]
              3. *-lowering-*.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\left(\mathsf{neg}\left(\frac{3}{4}\right)\right), \color{blue}{\left(\frac{1}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}\right)}\right)\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \left(\frac{\color{blue}{1}}{\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)}\right)\right)\right) \]
              5. /-lowering-/.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right) \cdot r\right)\right)}\right)\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(\left(6 \cdot \mathsf{PI}\left(\right)\right) \cdot s\right)\right)\right)\right)\right)\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 6\right) \cdot s\right)\right)\right)\right)\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(\mathsf{neg}\left(r \cdot \left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)\right)\right)\right)\right) \]
              9. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \left(r \cdot \color{blue}{\left(\mathsf{neg}\left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)}\right)\right)\right)\right) \]
              10. *-lowering-*.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \color{blue}{\left(\mathsf{neg}\left(s \cdot \left(\mathsf{PI}\left(\right) \cdot 6\right)\right)\right)}\right)\right)\right)\right) \]
              11. associate-*r*N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \left(\mathsf{neg}\left(\left(s \cdot \mathsf{PI}\left(\right)\right) \cdot 6\right)\right)\right)\right)\right)\right) \]
              12. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \left(\left(s \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right)\right) \]
              13. *-lowering-*.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\left(s \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\mathsf{neg}\left(6\right)\right)}\right)\right)\right)\right)\right) \]
              14. *-lowering-*.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right), \left(\mathsf{neg}\left(\color{blue}{6}\right)\right)\right)\right)\right)\right)\right) \]
              15. PI-lowering-PI.f32N/A

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), \left(\mathsf{neg}\left(6\right)\right)\right)\right)\right)\right)\right) \]
              16. metadata-eval4.6%

                \[\leadsto \mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(2, \mathsf{PI.f32}\left(\right)\right), s\right), r\right)\right), \mathsf{*.f32}\left(\frac{-3}{4}, \mathsf{/.f32}\left(1, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), -6\right)\right)\right)\right)\right) \]
            3. Applied egg-rr4.6%

              \[\leadsto \frac{0.25}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \color{blue}{-0.75 \cdot \frac{1}{r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)}} \]
            4. Applied egg-rr8.4%

              \[\leadsto \color{blue}{\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{\left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right) \cdot \left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right)}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{\left(r \cdot \left(s \cdot \pi\right)\right) \cdot 6}}} \]

            if 1.44599999e-5 < s

            1. Initial program 98.2%

              \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
            2. Simplified98.0%

              \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
            3. Add Preprocessing
            4. Taylor expanded in s around inf

              \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \frac{\frac{1}{18} \cdot r + \frac{1}{2} \cdot r}{{s}^{2}} + \frac{1}{4} \cdot \frac{1}{r}\right) - \frac{1}{6} \cdot \frac{1}{s}}{s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
            5. Simplified41.8%

              \[\leadsto \frac{\color{blue}{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}}{\pi} \]
          4. Recombined 2 regimes into one program.
          5. Final simplification14.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;s \leq 1.4459999874816276 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\frac{0.015625}{\left(s \cdot \pi\right) \cdot \left(s \cdot \pi\right)}}{r \cdot r} - \frac{0.5625}{\left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right) \cdot \left(r \cdot \left(\left(s \cdot \pi\right) \cdot -6\right)\right)}}{\frac{\frac{0.125}{s \cdot \pi}}{r} - \frac{0.75}{6 \cdot \left(r \cdot \left(s \cdot \pi\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}{\pi}\\ \end{array} \]
          6. Add Preprocessing

          Alternative 13: 9.9% accurate, 12.2× speedup?

          \[\begin{array}{l} \\ \frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}{\pi} \end{array} \]
          (FPCore (s r)
           :precision binary32
           (/
            (/
             (+
              (/ 0.25 r)
              (/ (+ -0.16666666666666666 (* 0.125 (/ (* r 0.5555555555555556) s))) s))
             s)
            PI))
          float code(float s, float r) {
          	return (((0.25f / r) + ((-0.16666666666666666f + (0.125f * ((r * 0.5555555555555556f) / s))) / s)) / s) / ((float) M_PI);
          }
          
          function code(s, r)
          	return Float32(Float32(Float32(Float32(Float32(0.25) / r) + Float32(Float32(Float32(-0.16666666666666666) + Float32(Float32(0.125) * Float32(Float32(r * Float32(0.5555555555555556)) / s))) / s)) / s) / Float32(pi))
          end
          
          function tmp = code(s, r)
          	tmp = (((single(0.25) / r) + ((single(-0.16666666666666666) + (single(0.125) * ((r * single(0.5555555555555556)) / s))) / s)) / s) / single(pi);
          end
          
          \begin{array}{l}
          
          \\
          \frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
          3. Add Preprocessing
          4. Taylor expanded in s around inf

            \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\left(\frac{1}{8} \cdot \frac{\frac{1}{18} \cdot r + \frac{1}{2} \cdot r}{{s}^{2}} + \frac{1}{4} \cdot \frac{1}{r}\right) - \frac{1}{6} \cdot \frac{1}{s}}{s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
          5. Simplified10.0%

            \[\leadsto \frac{\color{blue}{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666 + 0.125 \cdot \frac{r \cdot 0.5555555555555556}{s}}{s}}{s}}}{\pi} \]
          6. Add Preprocessing

          Alternative 14: 9.0% accurate, 21.0× speedup?

          \[\begin{array}{l} \\ \frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666}{s}}{s}}{\pi} \end{array} \]
          (FPCore (s r)
           :precision binary32
           (/ (/ (+ (/ 0.25 r) (/ -0.16666666666666666 s)) s) PI))
          float code(float s, float r) {
          	return (((0.25f / r) + (-0.16666666666666666f / s)) / s) / ((float) M_PI);
          }
          
          function code(s, r)
          	return Float32(Float32(Float32(Float32(Float32(0.25) / r) + Float32(Float32(-0.16666666666666666) / s)) / s) / Float32(pi))
          end
          
          function tmp = code(s, r)
          	tmp = (((single(0.25) / r) + (single(-0.16666666666666666) / s)) / s) / single(pi);
          end
          
          \begin{array}{l}
          
          \\
          \frac{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666}{s}}{s}}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
          3. Add Preprocessing
          4. Taylor expanded in s around inf

            \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\frac{1}{4} \cdot \frac{1}{r} - \frac{1}{6} \cdot \frac{1}{s}}{s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
          5. Step-by-step derivation
            1. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{4} \cdot \frac{1}{r} - \frac{1}{6} \cdot \frac{1}{s}\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            2. sub-negN/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\left(\frac{1}{4} \cdot \frac{1}{r} + \left(\mathsf{neg}\left(\frac{1}{6} \cdot \frac{1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            3. +-lowering-+.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\left(\frac{1}{4} \cdot \frac{1}{r}\right), \left(\mathsf{neg}\left(\frac{1}{6} \cdot \frac{1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            4. associate-*r/N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\left(\frac{\frac{1}{4} \cdot 1}{r}\right), \left(\mathsf{neg}\left(\frac{1}{6} \cdot \frac{1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\left(\frac{\frac{1}{4}}{r}\right), \left(\mathsf{neg}\left(\frac{1}{6} \cdot \frac{1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            6. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \left(\mathsf{neg}\left(\frac{1}{6} \cdot \frac{1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            7. associate-*r/N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \left(\mathsf{neg}\left(\frac{\frac{1}{6} \cdot 1}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            8. metadata-evalN/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \left(\mathsf{neg}\left(\frac{\frac{1}{6}}{s}\right)\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            9. distribute-neg-fracN/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \left(\frac{\mathsf{neg}\left(\frac{1}{6}\right)}{s}\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \left(\frac{\frac{-1}{6}}{s}\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
            11. /-lowering-/.f328.9%

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\mathsf{+.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, r\right), \mathsf{/.f32}\left(\frac{-1}{6}, s\right)\right), s\right), \mathsf{PI.f32}\left(\right)\right) \]
          6. Simplified8.9%

            \[\leadsto \frac{\color{blue}{\frac{\frac{0.25}{r} + \frac{-0.16666666666666666}{s}}{s}}}{\pi} \]
          7. Add Preprocessing

          Alternative 15: 9.0% accurate, 25.7× speedup?

          \[\begin{array}{l} \\ \frac{1}{\frac{s \cdot \pi}{\frac{0.25}{r}}} \end{array} \]
          (FPCore (s r) :precision binary32 (/ 1.0 (/ (* s PI) (/ 0.25 r))))
          float code(float s, float r) {
          	return 1.0f / ((s * ((float) M_PI)) / (0.25f / r));
          }
          
          function code(s, r)
          	return Float32(Float32(1.0) / Float32(Float32(s * Float32(pi)) / Float32(Float32(0.25) / r)))
          end
          
          function tmp = code(s, r)
          	tmp = single(1.0) / ((s * single(pi)) / (single(0.25) / r));
          end
          
          \begin{array}{l}
          
          \\
          \frac{1}{\frac{s \cdot \pi}{\frac{0.25}{r}}}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
          3. Add Preprocessing
          4. Taylor expanded in r around 0

            \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\frac{1}{4}}{r \cdot s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
          5. Step-by-step derivation
            1. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
            2. *-lowering-*.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
          6. Simplified8.7%

            \[\leadsto \frac{\color{blue}{\frac{0.25}{r \cdot s}}}{\pi} \]
          7. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{1}{4}}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
            2. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            4. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            5. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
            6. PI-lowering-PI.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
          8. Applied egg-rr8.7%

            \[\leadsto \color{blue}{\frac{0.25}{r \cdot \left(s \cdot \pi\right)}} \]
          9. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{\frac{1}{4}}{r}}{\color{blue}{s \cdot \mathsf{PI}\left(\right)}} \]
            2. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{s \cdot \mathsf{PI}\left(\right)}{\frac{\frac{1}{4}}{r}}}} \]
            3. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(1, \color{blue}{\left(\frac{s \cdot \mathsf{PI}\left(\right)}{\frac{\frac{1}{4}}{r}}\right)}\right) \]
            4. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(1, \mathsf{/.f32}\left(\left(s \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\frac{\frac{1}{4}}{r}\right)}\right)\right) \]
            5. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(1, \mathsf{/.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI}\left(\right)\right), \left(\frac{\color{blue}{\frac{1}{4}}}{r}\right)\right)\right) \]
            6. PI-lowering-PI.f32N/A

              \[\leadsto \mathsf{/.f32}\left(1, \mathsf{/.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), \left(\frac{\frac{1}{4}}{r}\right)\right)\right) \]
            7. /-lowering-/.f328.7%

              \[\leadsto \mathsf{/.f32}\left(1, \mathsf{/.f32}\left(\mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right), \mathsf{/.f32}\left(\frac{1}{4}, \color{blue}{r}\right)\right)\right) \]
          10. Applied egg-rr8.7%

            \[\leadsto \color{blue}{\frac{1}{\frac{s \cdot \pi}{\frac{0.25}{r}}}} \]
          11. Add Preprocessing

          Alternative 16: 9.0% accurate, 33.0× speedup?

          \[\begin{array}{l} \\ \frac{0.25}{s \cdot \left(r \cdot \pi\right)} \end{array} \]
          (FPCore (s r) :precision binary32 (/ 0.25 (* s (* r PI))))
          float code(float s, float r) {
          	return 0.25f / (s * (r * ((float) M_PI)));
          }
          
          function code(s, r)
          	return Float32(Float32(0.25) / Float32(s * Float32(r * Float32(pi))))
          end
          
          function tmp = code(s, r)
          	tmp = single(0.25) / (s * (r * single(pi)));
          end
          
          \begin{array}{l}
          
          \\
          \frac{0.25}{s \cdot \left(r \cdot \pi\right)}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
          3. Add Preprocessing
          4. Taylor expanded in r around 0

            \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\frac{1}{4}}{r \cdot s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
          5. Step-by-step derivation
            1. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
            2. *-lowering-*.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
          6. Simplified8.7%

            \[\leadsto \frac{\color{blue}{\frac{0.25}{r \cdot s}}}{\pi} \]
          7. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{1}{4}}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
            2. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            4. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            5. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
            6. PI-lowering-PI.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
          8. Applied egg-rr8.7%

            \[\leadsto \color{blue}{\frac{0.25}{r \cdot \left(s \cdot \pi\right)}} \]
          9. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{s}\right)\right)\right) \]
            2. associate-*r*N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \left(\left(r \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{s}\right)\right) \]
            3. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\left(r \cdot \mathsf{PI}\left(\right)\right), \color{blue}{s}\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\left(\mathsf{PI}\left(\right) \cdot r\right), s\right)\right) \]
            5. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI}\left(\right), r\right), s\right)\right) \]
            6. PI-lowering-PI.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(\mathsf{*.f32}\left(\mathsf{PI.f32}\left(\right), r\right), s\right)\right) \]
          10. Applied egg-rr8.7%

            \[\leadsto \frac{0.25}{\color{blue}{\left(\pi \cdot r\right) \cdot s}} \]
          11. Final simplification8.7%

            \[\leadsto \frac{0.25}{s \cdot \left(r \cdot \pi\right)} \]
          12. Add Preprocessing

          Alternative 17: 9.0% accurate, 33.0× speedup?

          \[\begin{array}{l} \\ \frac{0.25}{r \cdot \left(s \cdot \pi\right)} \end{array} \]
          (FPCore (s r) :precision binary32 (/ 0.25 (* r (* s PI))))
          float code(float s, float r) {
          	return 0.25f / (r * (s * ((float) M_PI)));
          }
          
          function code(s, r)
          	return Float32(Float32(0.25) / Float32(r * Float32(s * Float32(pi))))
          end
          
          function tmp = code(s, r)
          	tmp = single(0.25) / (r * (s * single(pi)));
          end
          
          \begin{array}{l}
          
          \\
          \frac{0.25}{r \cdot \left(s \cdot \pi\right)}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{0.25 \cdot e^{\frac{-r}{s}}}{\left(\left(2 \cdot \pi\right) \cdot s\right) \cdot r} + \frac{0.75 \cdot e^{\frac{-r}{3 \cdot s}}}{\left(\left(6 \cdot \pi\right) \cdot s\right) \cdot r} \]
          2. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{0.125}{r \cdot s} \cdot \left(e^{0 - \frac{r}{s}} + e^{\frac{\frac{r}{s}}{-3}}\right)}{\pi}} \]
          3. Add Preprocessing
          4. Taylor expanded in r around 0

            \[\leadsto \mathsf{/.f32}\left(\color{blue}{\left(\frac{\frac{1}{4}}{r \cdot s}\right)}, \mathsf{PI.f32}\left(\right)\right) \]
          5. Step-by-step derivation
            1. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
            2. *-lowering-*.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, s\right)\right), \mathsf{PI.f32}\left(\right)\right) \]
          6. Simplified8.7%

            \[\leadsto \frac{\color{blue}{\frac{0.25}{r \cdot s}}}{\pi} \]
          7. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{1}{4}}{\color{blue}{\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)}} \]
            2. /-lowering-/.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \color{blue}{\left(\left(r \cdot s\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
            3. associate-*l*N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \left(r \cdot \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            4. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \color{blue}{\left(s \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
            5. *-lowering-*.f32N/A

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
            6. PI-lowering-PI.f328.7%

              \[\leadsto \mathsf{/.f32}\left(\frac{1}{4}, \mathsf{*.f32}\left(r, \mathsf{*.f32}\left(s, \mathsf{PI.f32}\left(\right)\right)\right)\right) \]
          8. Applied egg-rr8.7%

            \[\leadsto \color{blue}{\frac{0.25}{r \cdot \left(s \cdot \pi\right)}} \]
          9. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2024145 
          (FPCore (s r)
            :name "Disney BSSRDF, PDF of scattering profile"
            :precision binary32
            :pre (and (and (<= 0.0 s) (<= s 256.0)) (and (< 1e-6 r) (< r 1000000.0)))
            (+ (/ (* 0.25 (exp (/ (- r) s))) (* (* (* 2.0 PI) s) r)) (/ (* 0.75 (exp (/ (- r) (* 3.0 s)))) (* (* (* 6.0 PI) s) r))))