Beckmann Distribution sample, tan2theta, alphax == alphay

Percentage Accurate: 55.7% → 99.0%
Time: 10.2s
Alternatives: 11
Speedup: 10.5×

Specification

?
\[\left(0.0001 \leq \alpha \land \alpha \leq 1\right) \land \left(2.328306437 \cdot 10^{-10} \leq u0 \land u0 \leq 1\right)\]
\[\begin{array}{l} \\ \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \end{array} \]
(FPCore (alpha u0)
 :precision binary32
 (* (* (- alpha) alpha) (log (- 1.0 u0))))
float code(float alpha, float u0) {
	return (-alpha * alpha) * logf((1.0f - u0));
}
real(4) function code(alpha, u0)
    real(4), intent (in) :: alpha
    real(4), intent (in) :: u0
    code = (-alpha * alpha) * log((1.0e0 - u0))
end function
function code(alpha, u0)
	return Float32(Float32(Float32(-alpha) * alpha) * log(Float32(Float32(1.0) - u0)))
end
function tmp = code(alpha, u0)
	tmp = (-alpha * alpha) * log((single(1.0) - u0));
end
\begin{array}{l}

\\
\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right)
\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 11 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: 55.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \end{array} \]
(FPCore (alpha u0)
 :precision binary32
 (* (* (- alpha) alpha) (log (- 1.0 u0))))
float code(float alpha, float u0) {
	return (-alpha * alpha) * logf((1.0f - u0));
}
real(4) function code(alpha, u0)
    real(4), intent (in) :: alpha
    real(4), intent (in) :: u0
    code = (-alpha * alpha) * log((1.0e0 - u0))
end function
function code(alpha, u0)
	return Float32(Float32(Float32(-alpha) * alpha) * log(Float32(Float32(1.0) - u0)))
end
function tmp = code(alpha, u0)
	tmp = (-alpha * alpha) * log((single(1.0) - u0));
end
\begin{array}{l}

\\
\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right)
\end{array}

Alternative 1: 99.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\alpha \cdot \left(-\alpha\right)\right) \cdot \mathsf{log1p}\left(-u0\right) \end{array} \]
(FPCore (alpha u0) :precision binary32 (* (* alpha (- alpha)) (log1p (- u0))))
float code(float alpha, float u0) {
	return (alpha * -alpha) * log1pf(-u0);
}
function code(alpha, u0)
	return Float32(Float32(alpha * Float32(-alpha)) * log1p(Float32(-u0)))
end
\begin{array}{l}

\\
\left(\alpha \cdot \left(-\alpha\right)\right) \cdot \mathsf{log1p}\left(-u0\right)
\end{array}
Derivation
  1. Initial program 58.0%

    \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-log.f32N/A

      \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \color{blue}{\log \left(1 - u0\right)} \]
    2. lift--.f32N/A

      \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \log \color{blue}{\left(1 - u0\right)} \]
    3. sub-negN/A

      \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \log \color{blue}{\left(1 + \left(\mathsf{neg}\left(u0\right)\right)\right)} \]
    4. lower-log1p.f32N/A

      \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right)} \]
    5. lower-neg.f3299.1

      \[\leadsto \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \mathsf{log1p}\left(\color{blue}{-u0}\right) \]
  4. Applied rewrites99.1%

    \[\leadsto \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \color{blue}{\mathsf{log1p}\left(-u0\right)} \]
  5. Final simplification99.1%

    \[\leadsto \left(\alpha \cdot \left(-\alpha\right)\right) \cdot \mathsf{log1p}\left(-u0\right) \]
  6. Add Preprocessing

Alternative 2: 93.8% accurate, 3.0× speedup?

\[\begin{array}{l} \\ u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right)\right)\right) \end{array} \]
(FPCore (alpha u0)
 :precision binary32
 (*
  u0
  (fma
   alpha
   alpha
   (* (* alpha alpha) (* u0 (fma u0 (fma u0 0.25 0.3333333333333333) 0.5))))))
float code(float alpha, float u0) {
	return u0 * fmaf(alpha, alpha, ((alpha * alpha) * (u0 * fmaf(u0, fmaf(u0, 0.25f, 0.3333333333333333f), 0.5f))));
}
function code(alpha, u0)
	return Float32(u0 * fma(alpha, alpha, Float32(Float32(alpha * alpha) * Float32(u0 * fma(u0, fma(u0, Float32(0.25), Float32(0.3333333333333333)), Float32(0.5))))))
end
\begin{array}{l}

\\
u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right)\right)\right)
\end{array}
Derivation
  1. Initial program 58.0%

    \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
  2. Add Preprocessing
  3. Taylor expanded in u0 around 0

    \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right)\right) + {\alpha}^{2}\right)} \]
  4. Step-by-step derivation
    1. lower-*.f32N/A

      \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right)\right) + {\alpha}^{2}\right)} \]
    2. lower-fma.f32N/A

      \[\leadsto u0 \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right), {\alpha}^{2}\right)} \]
  5. Applied rewrites93.0%

    \[\leadsto \color{blue}{u0 \cdot \mathsf{fma}\left(u0, \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot 0.25, \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right), \alpha \cdot \alpha\right)} \]
  6. Step-by-step derivation
    1. Applied rewrites93.1%

      \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \color{blue}{\alpha}, \left(\alpha \cdot \alpha\right) \cdot \left(\mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right) \cdot u0\right)\right) \]
    2. Final simplification93.1%

      \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right)\right)\right) \]
    3. Add Preprocessing

    Alternative 3: 93.4% accurate, 3.4× speedup?

    \[\begin{array}{l} \\ u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right), 1\right)\right) \end{array} \]
    (FPCore (alpha u0)
     :precision binary32
     (*
      u0
      (*
       (* alpha alpha)
       (fma u0 (fma u0 (fma u0 0.25 0.3333333333333333) 0.5) 1.0))))
    float code(float alpha, float u0) {
    	return u0 * ((alpha * alpha) * fmaf(u0, fmaf(u0, fmaf(u0, 0.25f, 0.3333333333333333f), 0.5f), 1.0f));
    }
    
    function code(alpha, u0)
    	return Float32(u0 * Float32(Float32(alpha * alpha) * fma(u0, fma(u0, fma(u0, Float32(0.25), Float32(0.3333333333333333)), Float32(0.5)), Float32(1.0))))
    end
    
    \begin{array}{l}
    
    \\
    u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right), 1\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 58.0%

      \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-log.f32N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \color{blue}{\log \left(1 - u0\right)} \]
      2. lift--.f32N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \log \color{blue}{\left(1 - u0\right)} \]
      3. sub-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \log \color{blue}{\left(1 + \left(\mathsf{neg}\left(u0\right)\right)\right)} \]
      4. lower-log1p.f32N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right) \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right)} \]
      5. lower-neg.f3299.1

        \[\leadsto \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \mathsf{log1p}\left(\color{blue}{-u0}\right) \]
    4. Applied rewrites99.1%

      \[\leadsto \left(\left(-\alpha\right) \cdot \alpha\right) \cdot \color{blue}{\mathsf{log1p}\left(-u0\right)} \]
    5. Step-by-step derivation
      1. lift-*.f32N/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\alpha \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      3. /-rgt-identityN/A

        \[\leadsto \left(\color{blue}{\frac{\alpha}{1}} \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right) \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      4. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{\mathsf{neg}\left(\alpha\right)}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      5. lift-/.f32N/A

        \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\mathsf{neg}\left(\alpha\right)}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      6. lift-/.f3298.8

        \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{-\alpha}}} \cdot \mathsf{log1p}\left(-u0\right) \]
      7. lift-/.f32N/A

        \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\mathsf{neg}\left(\alpha\right)}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      8. lift-neg.f32N/A

        \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \frac{\alpha}{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(\alpha\right)}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      10. frac-2negN/A

        \[\leadsto \frac{\alpha}{\color{blue}{\frac{-1}{\alpha}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      11. lower-/.f3298.8

        \[\leadsto \frac{\alpha}{\color{blue}{\frac{-1}{\alpha}}} \cdot \mathsf{log1p}\left(-u0\right) \]
    6. Applied rewrites98.8%

      \[\leadsto \color{blue}{\frac{\alpha}{\frac{-1}{\alpha}}} \cdot \mathsf{log1p}\left(-u0\right) \]
    7. Step-by-step derivation
      1. lift-/.f32N/A

        \[\leadsto \color{blue}{\frac{\alpha}{\frac{-1}{\alpha}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      2. lift-/.f32N/A

        \[\leadsto \frac{\alpha}{\color{blue}{\frac{-1}{\alpha}}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \color{blue}{\left(\frac{\alpha}{-1} \cdot \alpha\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\alpha \cdot \alpha}{-1}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      5. +-rgt-identityN/A

        \[\leadsto \frac{\alpha \cdot \color{blue}{\left(\alpha + 0\right)}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      6. distribute-rgt-outN/A

        \[\leadsto \frac{\color{blue}{\alpha \cdot \alpha + 0 \cdot \alpha}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      7. lift-*.f32N/A

        \[\leadsto \frac{\alpha \cdot \alpha + \color{blue}{0 \cdot \alpha}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      8. lift-fma.f32N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      9. +-lft-identityN/A

        \[\leadsto \frac{\color{blue}{0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      10. lift-+.f32N/A

        \[\leadsto \frac{\color{blue}{0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)}}{-1} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      11. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)}{\mathsf{neg}\left(-1\right)}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      12. neg-sub0N/A

        \[\leadsto \frac{\color{blue}{0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)}}{\mathsf{neg}\left(-1\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \frac{0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)}{\color{blue}{1}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      14. /-rgt-identityN/A

        \[\leadsto \color{blue}{\left(0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      15. sub-negN/A

        \[\leadsto \color{blue}{\left(0 + \left(\mathsf{neg}\left(\left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)\right)\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      16. metadata-evalN/A

        \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(0\right)\right)} + \left(\mathsf{neg}\left(\left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)\right)\right) \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      17. distribute-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(0 + \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)\right)\right)} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      18. flip-+N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{0 \cdot 0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right) \cdot \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)}{0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)}}\right)\right) \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
      19. distribute-neg-frac2N/A

        \[\leadsto \color{blue}{\frac{0 \cdot 0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right) \cdot \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)}{\mathsf{neg}\left(\left(0 - \left(0 + \mathsf{fma}\left(\alpha, \alpha, 0 \cdot \alpha\right)\right)\right)\right)}} \cdot \mathsf{log1p}\left(\mathsf{neg}\left(u0\right)\right) \]
    8. Applied rewrites98.7%

      \[\leadsto \color{blue}{\frac{\alpha \cdot \left(\alpha \cdot \left(\alpha \cdot \alpha\right)\right)}{\alpha \cdot \left(-\alpha\right)}} \cdot \mathsf{log1p}\left(-u0\right) \]
    9. Taylor expanded in u0 around 0

      \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right)\right) + {\alpha}^{2}\right)} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto u0 \cdot \color{blue}{\left({\alpha}^{2} + u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right)\right)\right)} \]
      2. *-lft-identityN/A

        \[\leadsto u0 \cdot \left(\color{blue}{1 \cdot {\alpha}^{2}} + u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{3} \cdot {\alpha}^{2}\right)\right)\right) \]
      3. distribute-lft-inN/A

        \[\leadsto u0 \cdot \left(1 \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{2} \cdot {\alpha}^{2} + \color{blue}{\left(u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right)\right) + u0 \cdot \left(\frac{1}{3} \cdot {\alpha}^{2}\right)\right)}\right)\right) \]
      4. associate-+r+N/A

        \[\leadsto u0 \cdot \left(1 \cdot {\alpha}^{2} + u0 \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {\alpha}^{2} + u0 \cdot \left(\frac{1}{4} \cdot \left({\alpha}^{2} \cdot u0\right)\right)\right) + u0 \cdot \left(\frac{1}{3} \cdot {\alpha}^{2}\right)\right)}\right) \]
    11. Applied rewrites92.8%

      \[\leadsto \color{blue}{u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, \mathsf{fma}\left(u0, 0.25, 0.3333333333333333\right), 0.5\right), 1\right)\right)} \]
    12. Add Preprocessing

    Alternative 4: 91.9% accurate, 3.5× speedup?

    \[\begin{array}{l} \\ u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right) \end{array} \]
    (FPCore (alpha u0)
     :precision binary32
     (*
      u0
      (fma
       alpha
       alpha
       (* (* alpha alpha) (* u0 (fma u0 0.3333333333333333 0.5))))))
    float code(float alpha, float u0) {
    	return u0 * fmaf(alpha, alpha, ((alpha * alpha) * (u0 * fmaf(u0, 0.3333333333333333f, 0.5f))));
    }
    
    function code(alpha, u0)
    	return Float32(u0 * fma(alpha, alpha, Float32(Float32(alpha * alpha) * Float32(u0 * fma(u0, Float32(0.3333333333333333), Float32(0.5))))))
    end
    
    \begin{array}{l}
    
    \\
    u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 58.0%

      \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
    2. Add Preprocessing
    3. Taylor expanded in u0 around 0

      \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f32N/A

        \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
      2. lower-fma.f32N/A

        \[\leadsto u0 \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right)} \]
      3. *-commutativeN/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \frac{1}{3} \cdot \color{blue}{\left(u0 \cdot {\alpha}^{2}\right)} + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right) \]
      4. associate-*r*N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\left(\frac{1}{3} \cdot u0\right) \cdot {\alpha}^{2}} + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right) \]
      5. distribute-rgt-outN/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{{\alpha}^{2} \cdot \left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right)}, {\alpha}^{2}\right) \]
      6. unpow2N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right), {\alpha}^{2}\right) \]
      7. +-commutativeN/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \left(\alpha \cdot \alpha\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)}, {\alpha}^{2}\right) \]
      8. associate-*l*N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\alpha \cdot \left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
      9. lower-*.f32N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\alpha \cdot \left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
      10. lower-*.f32N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \color{blue}{\left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
      11. +-commutativeN/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \color{blue}{\left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right)}\right), {\alpha}^{2}\right) \]
      12. *-commutativeN/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \left(\color{blue}{u0 \cdot \frac{1}{3}} + \frac{1}{2}\right)\right), {\alpha}^{2}\right) \]
      13. lower-fma.f32N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{3}, \frac{1}{2}\right)}\right), {\alpha}^{2}\right) \]
      14. unpow2N/A

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, \frac{1}{3}, \frac{1}{2}\right)\right), \color{blue}{\alpha \cdot \alpha}\right) \]
      15. lower-*.f3290.6

        \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right), \color{blue}{\alpha \cdot \alpha}\right) \]
    5. Applied rewrites90.6%

      \[\leadsto \color{blue}{u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right), \alpha \cdot \alpha\right)} \]
    6. Step-by-step derivation
      1. Applied rewrites90.7%

        \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \color{blue}{\alpha}, \left(\alpha \cdot \alpha\right) \cdot \left(\mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right) \cdot u0\right)\right) \]
      2. Final simplification90.7%

        \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \alpha, \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right) \]
      3. Add Preprocessing

      Alternative 5: 91.7% accurate, 3.9× speedup?

      \[\begin{array}{l} \\ \left(\alpha \cdot \alpha\right) \cdot \left(u0 + u0 \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right) \end{array} \]
      (FPCore (alpha u0)
       :precision binary32
       (* (* alpha alpha) (+ u0 (* u0 (* u0 (fma u0 0.3333333333333333 0.5))))))
      float code(float alpha, float u0) {
      	return (alpha * alpha) * (u0 + (u0 * (u0 * fmaf(u0, 0.3333333333333333f, 0.5f))));
      }
      
      function code(alpha, u0)
      	return Float32(Float32(alpha * alpha) * Float32(u0 + Float32(u0 * Float32(u0 * fma(u0, Float32(0.3333333333333333), Float32(0.5))))))
      end
      
      \begin{array}{l}
      
      \\
      \left(\alpha \cdot \alpha\right) \cdot \left(u0 + u0 \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 58.0%

        \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f32N/A

          \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right)} \cdot \log \left(1 - u0\right) \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\alpha \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right)} \cdot \log \left(1 - u0\right) \]
        3. lift-neg.f32N/A

          \[\leadsto \left(\alpha \cdot \color{blue}{\left(\mathsf{neg}\left(\alpha\right)\right)}\right) \cdot \log \left(1 - u0\right) \]
        4. neg-sub0N/A

          \[\leadsto \left(\alpha \cdot \color{blue}{\left(0 - \alpha\right)}\right) \cdot \log \left(1 - u0\right) \]
        5. flip3--N/A

          \[\leadsto \left(\alpha \cdot \color{blue}{\frac{{0}^{3} - {\alpha}^{3}}{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}\right) \cdot \log \left(1 - u0\right) \]
        6. clear-numN/A

          \[\leadsto \left(\alpha \cdot \color{blue}{\frac{1}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}}\right) \cdot \log \left(1 - u0\right) \]
        7. un-div-invN/A

          \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
        8. lower-/.f32N/A

          \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
        9. metadata-evalN/A

          \[\leadsto \frac{\alpha}{\frac{\color{blue}{0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
        10. +-lft-identityN/A

          \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha + 0 \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
        11. mul0-lftN/A

          \[\leadsto \frac{\alpha}{\frac{\alpha \cdot \alpha + \color{blue}{0}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
        12. +-rgt-identityN/A

          \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
        13. clear-numN/A

          \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
        14. +-rgt-identityN/A

          \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{\alpha \cdot \alpha + 0}}}} \cdot \log \left(1 - u0\right) \]
        15. mul0-lftN/A

          \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha + \color{blue}{0 \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
        16. +-lft-identityN/A

          \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}}} \cdot \log \left(1 - u0\right) \]
        17. metadata-evalN/A

          \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 \cdot 0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}} \cdot \log \left(1 - u0\right) \]
        18. flip3--N/A

          \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{0 - \alpha}}} \cdot \log \left(1 - u0\right) \]
        19. neg-sub0N/A

          \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
        20. lift-neg.f32N/A

          \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
        21. lower-/.f3258.0

          \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
      4. Applied rewrites58.0%

        \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
      5. Taylor expanded in u0 around 0

        \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right) \cdot u0} \]
      7. Applied rewrites90.5%

        \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0\right)} \]
      8. Step-by-step derivation
        1. Applied rewrites90.5%

          \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \left(u0 \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right) + \color{blue}{u0}\right) \]
        2. Final simplification90.5%

          \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \left(u0 + u0 \cdot \left(u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right)\right) \]
        3. Add Preprocessing

        Alternative 6: 91.7% accurate, 4.1× speedup?

        \[\begin{array}{l} \\ \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0 \cdot u0, u0\right) \end{array} \]
        (FPCore (alpha u0)
         :precision binary32
         (* (* alpha alpha) (fma (fma u0 0.3333333333333333 0.5) (* u0 u0) u0)))
        float code(float alpha, float u0) {
        	return (alpha * alpha) * fmaf(fmaf(u0, 0.3333333333333333f, 0.5f), (u0 * u0), u0);
        }
        
        function code(alpha, u0)
        	return Float32(Float32(alpha * alpha) * fma(fma(u0, Float32(0.3333333333333333), Float32(0.5)), Float32(u0 * u0), u0))
        end
        
        \begin{array}{l}
        
        \\
        \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0 \cdot u0, u0\right)
        \end{array}
        
        Derivation
        1. Initial program 58.0%

          \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f32N/A

            \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right)} \cdot \log \left(1 - u0\right) \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{\left(\alpha \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right)} \cdot \log \left(1 - u0\right) \]
          3. lift-neg.f32N/A

            \[\leadsto \left(\alpha \cdot \color{blue}{\left(\mathsf{neg}\left(\alpha\right)\right)}\right) \cdot \log \left(1 - u0\right) \]
          4. neg-sub0N/A

            \[\leadsto \left(\alpha \cdot \color{blue}{\left(0 - \alpha\right)}\right) \cdot \log \left(1 - u0\right) \]
          5. flip3--N/A

            \[\leadsto \left(\alpha \cdot \color{blue}{\frac{{0}^{3} - {\alpha}^{3}}{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}\right) \cdot \log \left(1 - u0\right) \]
          6. clear-numN/A

            \[\leadsto \left(\alpha \cdot \color{blue}{\frac{1}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}}\right) \cdot \log \left(1 - u0\right) \]
          7. un-div-invN/A

            \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
          8. lower-/.f32N/A

            \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
          9. metadata-evalN/A

            \[\leadsto \frac{\alpha}{\frac{\color{blue}{0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
          10. +-lft-identityN/A

            \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha + 0 \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
          11. mul0-lftN/A

            \[\leadsto \frac{\alpha}{\frac{\alpha \cdot \alpha + \color{blue}{0}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
          12. +-rgt-identityN/A

            \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
          13. clear-numN/A

            \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
          14. +-rgt-identityN/A

            \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{\alpha \cdot \alpha + 0}}}} \cdot \log \left(1 - u0\right) \]
          15. mul0-lftN/A

            \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha + \color{blue}{0 \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
          16. +-lft-identityN/A

            \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}}} \cdot \log \left(1 - u0\right) \]
          17. metadata-evalN/A

            \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 \cdot 0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}} \cdot \log \left(1 - u0\right) \]
          18. flip3--N/A

            \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{0 - \alpha}}} \cdot \log \left(1 - u0\right) \]
          19. neg-sub0N/A

            \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
          20. lift-neg.f32N/A

            \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
          21. lower-/.f3258.0

            \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
        4. Applied rewrites58.0%

          \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
        5. Taylor expanded in u0 around 0

          \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right) \cdot u0} \]
        7. Applied rewrites90.5%

          \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0\right)} \]
        8. Step-by-step derivation
          1. Applied rewrites90.5%

            \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), \color{blue}{u0 \cdot u0}, u0\right) \]
          2. Add Preprocessing

          Alternative 7: 91.7% accurate, 4.1× speedup?

          \[\begin{array}{l} \\ \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0\right) \end{array} \]
          (FPCore (alpha u0)
           :precision binary32
           (* (* alpha alpha) (fma u0 (* u0 (fma u0 0.3333333333333333 0.5)) u0)))
          float code(float alpha, float u0) {
          	return (alpha * alpha) * fmaf(u0, (u0 * fmaf(u0, 0.3333333333333333f, 0.5f)), u0);
          }
          
          function code(alpha, u0)
          	return Float32(Float32(alpha * alpha) * fma(u0, Float32(u0 * fma(u0, Float32(0.3333333333333333), Float32(0.5))), u0))
          end
          
          \begin{array}{l}
          
          \\
          \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0\right)
          \end{array}
          
          Derivation
          1. Initial program 58.0%

            \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift-*.f32N/A

              \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right)} \cdot \log \left(1 - u0\right) \]
            2. *-commutativeN/A

              \[\leadsto \color{blue}{\left(\alpha \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right)} \cdot \log \left(1 - u0\right) \]
            3. lift-neg.f32N/A

              \[\leadsto \left(\alpha \cdot \color{blue}{\left(\mathsf{neg}\left(\alpha\right)\right)}\right) \cdot \log \left(1 - u0\right) \]
            4. neg-sub0N/A

              \[\leadsto \left(\alpha \cdot \color{blue}{\left(0 - \alpha\right)}\right) \cdot \log \left(1 - u0\right) \]
            5. flip3--N/A

              \[\leadsto \left(\alpha \cdot \color{blue}{\frac{{0}^{3} - {\alpha}^{3}}{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}\right) \cdot \log \left(1 - u0\right) \]
            6. clear-numN/A

              \[\leadsto \left(\alpha \cdot \color{blue}{\frac{1}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}}\right) \cdot \log \left(1 - u0\right) \]
            7. un-div-invN/A

              \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
            8. lower-/.f32N/A

              \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
            9. metadata-evalN/A

              \[\leadsto \frac{\alpha}{\frac{\color{blue}{0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
            10. +-lft-identityN/A

              \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha + 0 \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
            11. mul0-lftN/A

              \[\leadsto \frac{\alpha}{\frac{\alpha \cdot \alpha + \color{blue}{0}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
            12. +-rgt-identityN/A

              \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
            13. clear-numN/A

              \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
            14. +-rgt-identityN/A

              \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{\alpha \cdot \alpha + 0}}}} \cdot \log \left(1 - u0\right) \]
            15. mul0-lftN/A

              \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha + \color{blue}{0 \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
            16. +-lft-identityN/A

              \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}}} \cdot \log \left(1 - u0\right) \]
            17. metadata-evalN/A

              \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 \cdot 0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}} \cdot \log \left(1 - u0\right) \]
            18. flip3--N/A

              \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{0 - \alpha}}} \cdot \log \left(1 - u0\right) \]
            19. neg-sub0N/A

              \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
            20. lift-neg.f32N/A

              \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
            21. lower-/.f3258.0

              \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
          4. Applied rewrites58.0%

            \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
          5. Taylor expanded in u0 around 0

            \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right) \cdot u0} \]
          7. Applied rewrites90.5%

            \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), u0\right)} \]
          8. Add Preprocessing

          Alternative 8: 91.7% accurate, 4.1× speedup?

          \[\begin{array}{l} \\ u0 \cdot \left(\alpha \cdot \mathsf{fma}\left(\alpha, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), \alpha\right)\right) \end{array} \]
          (FPCore (alpha u0)
           :precision binary32
           (* u0 (* alpha (fma alpha (* u0 (fma u0 0.3333333333333333 0.5)) alpha))))
          float code(float alpha, float u0) {
          	return u0 * (alpha * fmaf(alpha, (u0 * fmaf(u0, 0.3333333333333333f, 0.5f)), alpha));
          }
          
          function code(alpha, u0)
          	return Float32(u0 * Float32(alpha * fma(alpha, Float32(u0 * fma(u0, Float32(0.3333333333333333), Float32(0.5))), alpha)))
          end
          
          \begin{array}{l}
          
          \\
          u0 \cdot \left(\alpha \cdot \mathsf{fma}\left(\alpha, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), \alpha\right)\right)
          \end{array}
          
          Derivation
          1. Initial program 58.0%

            \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
          2. Add Preprocessing
          3. Taylor expanded in u0 around 0

            \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
          4. Step-by-step derivation
            1. lower-*.f32N/A

              \[\leadsto \color{blue}{u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + {\alpha}^{2}\right)} \]
            2. lower-fma.f32N/A

              \[\leadsto u0 \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right)} \]
            3. *-commutativeN/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \frac{1}{3} \cdot \color{blue}{\left(u0 \cdot {\alpha}^{2}\right)} + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right) \]
            4. associate-*r*N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\left(\frac{1}{3} \cdot u0\right) \cdot {\alpha}^{2}} + \frac{1}{2} \cdot {\alpha}^{2}, {\alpha}^{2}\right) \]
            5. distribute-rgt-outN/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{{\alpha}^{2} \cdot \left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right)}, {\alpha}^{2}\right) \]
            6. unpow2N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right), {\alpha}^{2}\right) \]
            7. +-commutativeN/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \left(\alpha \cdot \alpha\right) \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)}, {\alpha}^{2}\right) \]
            8. associate-*l*N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\alpha \cdot \left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
            9. lower-*.f32N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \color{blue}{\alpha \cdot \left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
            10. lower-*.f32N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \color{blue}{\left(\alpha \cdot \left(\frac{1}{2} + \frac{1}{3} \cdot u0\right)\right)}, {\alpha}^{2}\right) \]
            11. +-commutativeN/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \color{blue}{\left(\frac{1}{3} \cdot u0 + \frac{1}{2}\right)}\right), {\alpha}^{2}\right) \]
            12. *-commutativeN/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \left(\color{blue}{u0 \cdot \frac{1}{3}} + \frac{1}{2}\right)\right), {\alpha}^{2}\right) \]
            13. lower-fma.f32N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{3}, \frac{1}{2}\right)}\right), {\alpha}^{2}\right) \]
            14. unpow2N/A

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, \frac{1}{3}, \frac{1}{2}\right)\right), \color{blue}{\alpha \cdot \alpha}\right) \]
            15. lower-*.f3290.6

              \[\leadsto u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right), \color{blue}{\alpha \cdot \alpha}\right) \]
          5. Applied rewrites90.6%

            \[\leadsto \color{blue}{u0 \cdot \mathsf{fma}\left(u0, \alpha \cdot \left(\alpha \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right)\right), \alpha \cdot \alpha\right)} \]
          6. Taylor expanded in u0 around 0

            \[\leadsto u0 \cdot \left(u0 \cdot \left(\frac{1}{3} \cdot \left({\alpha}^{2} \cdot u0\right) + \frac{1}{2} \cdot {\alpha}^{2}\right) + \color{blue}{{\alpha}^{2}}\right) \]
          7. Step-by-step derivation
            1. Applied rewrites90.4%

              \[\leadsto u0 \cdot \left(\alpha \cdot \color{blue}{\mathsf{fma}\left(\alpha, u0 \cdot \mathsf{fma}\left(u0, 0.3333333333333333, 0.5\right), \alpha\right)}\right) \]
            2. Add Preprocessing

            Alternative 9: 87.8% accurate, 4.3× speedup?

            \[\begin{array}{l} \\ u0 \cdot \mathsf{fma}\left(\alpha, \alpha, 0.5 \cdot \left(u0 \cdot \left(\alpha \cdot \alpha\right)\right)\right) \end{array} \]
            (FPCore (alpha u0)
             :precision binary32
             (* u0 (fma alpha alpha (* 0.5 (* u0 (* alpha alpha))))))
            float code(float alpha, float u0) {
            	return u0 * fmaf(alpha, alpha, (0.5f * (u0 * (alpha * alpha))));
            }
            
            function code(alpha, u0)
            	return Float32(u0 * fma(alpha, alpha, Float32(Float32(0.5) * Float32(u0 * Float32(alpha * alpha)))))
            end
            
            \begin{array}{l}
            
            \\
            u0 \cdot \mathsf{fma}\left(\alpha, \alpha, 0.5 \cdot \left(u0 \cdot \left(\alpha \cdot \alpha\right)\right)\right)
            \end{array}
            
            Derivation
            1. Initial program 58.0%

              \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f32N/A

                \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\alpha\right)\right) \cdot \alpha\right)} \cdot \log \left(1 - u0\right) \]
              2. *-commutativeN/A

                \[\leadsto \color{blue}{\left(\alpha \cdot \left(\mathsf{neg}\left(\alpha\right)\right)\right)} \cdot \log \left(1 - u0\right) \]
              3. lift-neg.f32N/A

                \[\leadsto \left(\alpha \cdot \color{blue}{\left(\mathsf{neg}\left(\alpha\right)\right)}\right) \cdot \log \left(1 - u0\right) \]
              4. neg-sub0N/A

                \[\leadsto \left(\alpha \cdot \color{blue}{\left(0 - \alpha\right)}\right) \cdot \log \left(1 - u0\right) \]
              5. flip3--N/A

                \[\leadsto \left(\alpha \cdot \color{blue}{\frac{{0}^{3} - {\alpha}^{3}}{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}\right) \cdot \log \left(1 - u0\right) \]
              6. clear-numN/A

                \[\leadsto \left(\alpha \cdot \color{blue}{\frac{1}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}}\right) \cdot \log \left(1 - u0\right) \]
              7. un-div-invN/A

                \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
              8. lower-/.f32N/A

                \[\leadsto \color{blue}{\frac{\alpha}{\frac{0 \cdot 0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}}} \cdot \log \left(1 - u0\right) \]
              9. metadata-evalN/A

                \[\leadsto \frac{\alpha}{\frac{\color{blue}{0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
              10. +-lft-identityN/A

                \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha + 0 \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
              11. mul0-lftN/A

                \[\leadsto \frac{\alpha}{\frac{\alpha \cdot \alpha + \color{blue}{0}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
              12. +-rgt-identityN/A

                \[\leadsto \frac{\alpha}{\frac{\color{blue}{\alpha \cdot \alpha}}{{0}^{3} - {\alpha}^{3}}} \cdot \log \left(1 - u0\right) \]
              13. clear-numN/A

                \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
              14. +-rgt-identityN/A

                \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{\alpha \cdot \alpha + 0}}}} \cdot \log \left(1 - u0\right) \]
              15. mul0-lftN/A

                \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\alpha \cdot \alpha + \color{blue}{0 \cdot \alpha}}}} \cdot \log \left(1 - u0\right) \]
              16. +-lft-identityN/A

                \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}}} \cdot \log \left(1 - u0\right) \]
              17. metadata-evalN/A

                \[\leadsto \frac{\alpha}{\frac{1}{\frac{{0}^{3} - {\alpha}^{3}}{\color{blue}{0 \cdot 0} + \left(\alpha \cdot \alpha + 0 \cdot \alpha\right)}}} \cdot \log \left(1 - u0\right) \]
              18. flip3--N/A

                \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{0 - \alpha}}} \cdot \log \left(1 - u0\right) \]
              19. neg-sub0N/A

                \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
              20. lift-neg.f32N/A

                \[\leadsto \frac{\alpha}{\frac{1}{\color{blue}{\mathsf{neg}\left(\alpha\right)}}} \cdot \log \left(1 - u0\right) \]
              21. lower-/.f3258.0

                \[\leadsto \frac{\alpha}{\color{blue}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
            4. Applied rewrites58.0%

              \[\leadsto \color{blue}{\frac{\alpha}{\frac{1}{-\alpha}}} \cdot \log \left(1 - u0\right) \]
            5. Taylor expanded in u0 around 0

              \[\leadsto \color{blue}{u0 \cdot \left(\frac{1}{2} \cdot \left({\alpha}^{2} \cdot u0\right) + {\alpha}^{2}\right)} \]
            6. Step-by-step derivation
              1. lower-*.f32N/A

                \[\leadsto \color{blue}{u0 \cdot \left(\frac{1}{2} \cdot \left({\alpha}^{2} \cdot u0\right) + {\alpha}^{2}\right)} \]
              2. *-commutativeN/A

                \[\leadsto u0 \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(u0 \cdot {\alpha}^{2}\right)} + {\alpha}^{2}\right) \]
              3. associate-*r*N/A

                \[\leadsto u0 \cdot \left(\color{blue}{\left(\frac{1}{2} \cdot u0\right) \cdot {\alpha}^{2}} + {\alpha}^{2}\right) \]
              4. *-lft-identityN/A

                \[\leadsto u0 \cdot \left(\left(\frac{1}{2} \cdot u0\right) \cdot {\alpha}^{2} + \color{blue}{1 \cdot {\alpha}^{2}}\right) \]
              5. distribute-rgt-outN/A

                \[\leadsto u0 \cdot \color{blue}{\left({\alpha}^{2} \cdot \left(\frac{1}{2} \cdot u0 + 1\right)\right)} \]
              6. +-commutativeN/A

                \[\leadsto u0 \cdot \left({\alpha}^{2} \cdot \color{blue}{\left(1 + \frac{1}{2} \cdot u0\right)}\right) \]
              7. lower-*.f32N/A

                \[\leadsto u0 \cdot \color{blue}{\left({\alpha}^{2} \cdot \left(1 + \frac{1}{2} \cdot u0\right)\right)} \]
              8. unpow2N/A

                \[\leadsto u0 \cdot \left(\color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(1 + \frac{1}{2} \cdot u0\right)\right) \]
              9. lower-*.f32N/A

                \[\leadsto u0 \cdot \left(\color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(1 + \frac{1}{2} \cdot u0\right)\right) \]
              10. +-commutativeN/A

                \[\leadsto u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot u0 + 1\right)}\right) \]
              11. *-commutativeN/A

                \[\leadsto u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \left(\color{blue}{u0 \cdot \frac{1}{2}} + 1\right)\right) \]
              12. lower-fma.f3285.7

                \[\leadsto u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \color{blue}{\mathsf{fma}\left(u0, 0.5, 1\right)}\right) \]
            7. Applied rewrites85.7%

              \[\leadsto \color{blue}{u0 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, 0.5, 1\right)\right)} \]
            8. Step-by-step derivation
              1. Applied rewrites85.8%

                \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \color{blue}{\alpha}, 0.5 \cdot \left(\left(\alpha \cdot \alpha\right) \cdot u0\right)\right) \]
              2. Final simplification85.8%

                \[\leadsto u0 \cdot \mathsf{fma}\left(\alpha, \alpha, 0.5 \cdot \left(u0 \cdot \left(\alpha \cdot \alpha\right)\right)\right) \]
              3. Add Preprocessing

              Alternative 10: 87.7% accurate, 5.3× speedup?

              \[\begin{array}{l} \\ \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot 0.5, u0\right) \end{array} \]
              (FPCore (alpha u0)
               :precision binary32
               (* (* alpha alpha) (fma u0 (* u0 0.5) u0)))
              float code(float alpha, float u0) {
              	return (alpha * alpha) * fmaf(u0, (u0 * 0.5f), u0);
              }
              
              function code(alpha, u0)
              	return Float32(Float32(alpha * alpha) * fma(u0, Float32(u0 * Float32(0.5)), u0))
              end
              
              \begin{array}{l}
              
              \\
              \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot 0.5, u0\right)
              \end{array}
              
              Derivation
              1. Initial program 58.0%

                \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
              2. Add Preprocessing
              3. Taylor expanded in u0 around 0

                \[\leadsto \color{blue}{u0 \cdot \left(\frac{1}{2} \cdot \left({\alpha}^{2} \cdot u0\right) + {\alpha}^{2}\right)} \]
              4. Step-by-step derivation
                1. distribute-lft-inN/A

                  \[\leadsto \color{blue}{u0 \cdot \left(\frac{1}{2} \cdot \left({\alpha}^{2} \cdot u0\right)\right) + u0 \cdot {\alpha}^{2}} \]
                2. associate-*r*N/A

                  \[\leadsto \color{blue}{\left(u0 \cdot \frac{1}{2}\right) \cdot \left({\alpha}^{2} \cdot u0\right)} + u0 \cdot {\alpha}^{2} \]
                3. *-commutativeN/A

                  \[\leadsto \left(u0 \cdot \frac{1}{2}\right) \cdot \color{blue}{\left(u0 \cdot {\alpha}^{2}\right)} + u0 \cdot {\alpha}^{2} \]
                4. associate-*r*N/A

                  \[\leadsto \color{blue}{\left(\left(u0 \cdot \frac{1}{2}\right) \cdot u0\right) \cdot {\alpha}^{2}} + u0 \cdot {\alpha}^{2} \]
                5. distribute-rgt-outN/A

                  \[\leadsto \color{blue}{{\alpha}^{2} \cdot \left(\left(u0 \cdot \frac{1}{2}\right) \cdot u0 + u0\right)} \]
                6. lower-*.f32N/A

                  \[\leadsto \color{blue}{{\alpha}^{2} \cdot \left(\left(u0 \cdot \frac{1}{2}\right) \cdot u0 + u0\right)} \]
                7. unpow2N/A

                  \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(\left(u0 \cdot \frac{1}{2}\right) \cdot u0 + u0\right) \]
                8. lower-*.f32N/A

                  \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right)} \cdot \left(\left(u0 \cdot \frac{1}{2}\right) \cdot u0 + u0\right) \]
                9. associate-*r*N/A

                  \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \left(\color{blue}{u0 \cdot \left(\frac{1}{2} \cdot u0\right)} + u0\right) \]
                10. lower-fma.f32N/A

                  \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \color{blue}{\mathsf{fma}\left(u0, \frac{1}{2} \cdot u0, u0\right)} \]
                11. *-commutativeN/A

                  \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, \color{blue}{u0 \cdot \frac{1}{2}}, u0\right) \]
                12. lower-*.f3285.8

                  \[\leadsto \left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, \color{blue}{u0 \cdot 0.5}, u0\right) \]
              5. Applied rewrites85.8%

                \[\leadsto \color{blue}{\left(\alpha \cdot \alpha\right) \cdot \mathsf{fma}\left(u0, u0 \cdot 0.5, u0\right)} \]
              6. Add Preprocessing

              Alternative 11: 74.8% accurate, 10.5× speedup?

              \[\begin{array}{l} \\ u0 \cdot \left(\alpha \cdot \alpha\right) \end{array} \]
              (FPCore (alpha u0) :precision binary32 (* u0 (* alpha alpha)))
              float code(float alpha, float u0) {
              	return u0 * (alpha * alpha);
              }
              
              real(4) function code(alpha, u0)
                  real(4), intent (in) :: alpha
                  real(4), intent (in) :: u0
                  code = u0 * (alpha * alpha)
              end function
              
              function code(alpha, u0)
              	return Float32(u0 * Float32(alpha * alpha))
              end
              
              function tmp = code(alpha, u0)
              	tmp = u0 * (alpha * alpha);
              end
              
              \begin{array}{l}
              
              \\
              u0 \cdot \left(\alpha \cdot \alpha\right)
              \end{array}
              
              Derivation
              1. Initial program 58.0%

                \[\left(\left(-\alpha\right) \cdot \alpha\right) \cdot \log \left(1 - u0\right) \]
              2. Add Preprocessing
              3. Taylor expanded in u0 around 0

                \[\leadsto \color{blue}{{\alpha}^{2} \cdot u0} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{u0 \cdot {\alpha}^{2}} \]
                2. lower-*.f32N/A

                  \[\leadsto \color{blue}{u0 \cdot {\alpha}^{2}} \]
                3. unpow2N/A

                  \[\leadsto u0 \cdot \color{blue}{\left(\alpha \cdot \alpha\right)} \]
                4. lower-*.f3272.9

                  \[\leadsto u0 \cdot \color{blue}{\left(\alpha \cdot \alpha\right)} \]
              5. Applied rewrites72.9%

                \[\leadsto \color{blue}{u0 \cdot \left(\alpha \cdot \alpha\right)} \]
              6. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024233 
              (FPCore (alpha u0)
                :name "Beckmann Distribution sample, tan2theta, alphax == alphay"
                :precision binary32
                :pre (and (and (<= 0.0001 alpha) (<= alpha 1.0)) (and (<= 2.328306437e-10 u0) (<= u0 1.0)))
                (* (* (- alpha) alpha) (log (- 1.0 u0))))