Hyperbolic sine

Percentage Accurate: 54.7% → 99.5%
Time: 12.2s
Alternatives: 22
Speedup: 12.8×

Specification

?
\[\begin{array}{l} \\ \frac{e^{x} - e^{-x}}{2} \end{array} \]
(FPCore (x) :precision binary64 (/ (- (exp x) (exp (- x))) 2.0))
double code(double x) {
	return (exp(x) - exp(-x)) / 2.0;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (exp(x) - exp(-x)) / 2.0d0
end function
public static double code(double x) {
	return (Math.exp(x) - Math.exp(-x)) / 2.0;
}
def code(x):
	return (math.exp(x) - math.exp(-x)) / 2.0
function code(x)
	return Float64(Float64(exp(x) - exp(Float64(-x))) / 2.0)
end
function tmp = code(x)
	tmp = (exp(x) - exp(-x)) / 2.0;
end
code[x_] := N[(N[(N[Exp[x], $MachinePrecision] - N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}

\\
\frac{e^{x} - e^{-x}}{2}
\end{array}

Sampling outcomes in binary64 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 22 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: 54.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{e^{x} - e^{-x}}{2} \end{array} \]
(FPCore (x) :precision binary64 (/ (- (exp x) (exp (- x))) 2.0))
double code(double x) {
	return (exp(x) - exp(-x)) / 2.0;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (exp(x) - exp(-x)) / 2.0d0
end function
public static double code(double x) {
	return (Math.exp(x) - Math.exp(-x)) / 2.0;
}
def code(x):
	return (math.exp(x) - math.exp(-x)) / 2.0
function code(x)
	return Float64(Float64(exp(x) - exp(Float64(-x))) / 2.0)
end
function tmp = code(x)
	tmp = (exp(x) - exp(-x)) / 2.0;
end
code[x_] := N[(N[(N[Exp[x], $MachinePrecision] - N[Exp[(-x)], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l}

\\
\frac{e^{x} - e^{-x}}{2}
\end{array}

Alternative 1: 99.5% accurate, 0.7× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), x\_m \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{expm1}\left(x\_m\right) \cdot 0.5\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m)
 :precision binary64
 (*
  x_s
  (if (<= (- (exp x_m) (exp (- x_m))) 0.002)
    (/
     (fma
      (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)
      (* x_m (* x_m x_m))
      (* x_m 2.0))
     2.0)
    (* (expm1 x_m) 0.5))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m) {
	double tmp;
	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
		tmp = fma(fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333), (x_m * (x_m * x_m)), (x_m * 2.0)) / 2.0;
	} else {
		tmp = expm1(x_m) * 0.5;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m)
	tmp = 0.0
	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
		tmp = Float64(fma(fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333), Float64(x_m * Float64(x_m * x_m)), Float64(x_m * 2.0)) / 2.0);
	else
		tmp = Float64(expm1(x_m) * 0.5);
	end
	return Float64(x_s * tmp)
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(N[(N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(Exp[x$95$m] - 1), $MachinePrecision] * 0.5), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), x\_m \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot 2\right)}{2}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{expm1}\left(x\_m\right) \cdot 0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x))) < 2e-3

    1. Initial program 37.7%

      \[\frac{e^{x} - e^{-x}}{2} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

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

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

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
      5. lower-*.f64N/A

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

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

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

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

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
      10. lower-fma.f64N/A

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

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
      12. lower-*.f6494.6

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
    5. Simplified94.6%

      \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
      3. lift-fma.f64N/A

        \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
      4. distribute-rgt-inN/A

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} + 2 \cdot x}{2} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right) + 2 \cdot x}{2} \]
      8. pow3N/A

        \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \color{blue}{{x}^{3}} + 2 \cdot x}{2} \]
      9. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), {x}^{3}, 2 \cdot x\right)}}{2} \]
      11. cube-unmultN/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
      13. lower-*.f6494.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{2 \cdot x}\right)}{2} \]
      15. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
      16. lower-*.f6494.6

        \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
    7. Applied egg-rr94.6%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}}{2} \]

    if 2e-3 < (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x)))

    1. Initial program 100.0%

      \[\frac{e^{x} - e^{-x}}{2} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
    4. Step-by-step derivation
      1. Simplified100.0%

        \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
      2. Step-by-step derivation
        1. lift-exp.f64N/A

          \[\leadsto \frac{\color{blue}{e^{x}} - 1}{2} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{e^{x} - 1}}{2} \]
        3. div-invN/A

          \[\leadsto \color{blue}{\left(e^{x} - 1\right) \cdot \frac{1}{2}} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(e^{x} - 1\right) \cdot \frac{1}{2}} \]
        5. lift--.f64N/A

          \[\leadsto \color{blue}{\left(e^{x} - 1\right)} \cdot \frac{1}{2} \]
        6. lift-exp.f64N/A

          \[\leadsto \left(\color{blue}{e^{x}} - 1\right) \cdot \frac{1}{2} \]
        7. lower-expm1.f64N/A

          \[\leadsto \color{blue}{\mathsf{expm1}\left(x\right)} \cdot \frac{1}{2} \]
        8. metadata-eval100.0

          \[\leadsto \mathsf{expm1}\left(x\right) \cdot \color{blue}{0.5} \]
      3. Applied egg-rr100.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(x\right) \cdot 0.5} \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 2: 92.7% accurate, 0.8× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := x\_m \cdot \left(x\_m \cdot x\_m\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), t\_0, x\_m \cdot 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot \left(\mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right) \cdot \left(x\_m \cdot t\_0\right)\right)}{2}\\ \end{array} \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m)
     :precision binary64
     (let* ((t_0 (* x_m (* x_m x_m))))
       (*
        x_s
        (if (<= (- (exp x_m) (exp (- x_m))) 0.002)
          (/
           (fma
            (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)
            t_0
            (* x_m 2.0))
           2.0)
          (/
           (*
            x_m
            (*
             (fma 0.0003968253968253968 (* x_m x_m) 0.016666666666666666)
             (* x_m t_0)))
           2.0)))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    double code(double x_s, double x_m) {
    	double t_0 = x_m * (x_m * x_m);
    	double tmp;
    	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
    		tmp = fma(fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333), t_0, (x_m * 2.0)) / 2.0;
    	} else {
    		tmp = (x_m * (fma(0.0003968253968253968, (x_m * x_m), 0.016666666666666666) * (x_m * t_0))) / 2.0;
    	}
    	return x_s * tmp;
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    function code(x_s, x_m)
    	t_0 = Float64(x_m * Float64(x_m * x_m))
    	tmp = 0.0
    	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
    		tmp = Float64(fma(fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333), t_0, Float64(x_m * 2.0)) / 2.0);
    	else
    		tmp = Float64(Float64(x_m * Float64(fma(0.0003968253968253968, Float64(x_m * x_m), 0.016666666666666666) * Float64(x_m * t_0))) / 2.0);
    	end
    	return Float64(x_s * tmp)
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[x$95$s_, x$95$m_] := Block[{t$95$0 = N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(N[(N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * t$95$0 + N[(x$95$m * 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x$95$m * N[(N[(0.0003968253968253968 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.016666666666666666), $MachinePrecision] * N[(x$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    \begin{array}{l}
    t_0 := x\_m \cdot \left(x\_m \cdot x\_m\right)\\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
    \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), t\_0, x\_m \cdot 2\right)}{2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x\_m \cdot \left(\mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right) \cdot \left(x\_m \cdot t\_0\right)\right)}{2}\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x))) < 2e-3

      1. Initial program 37.7%

        \[\frac{e^{x} - e^{-x}}{2} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

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

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

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
        5. lower-*.f64N/A

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

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

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

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

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
        10. lower-fma.f64N/A

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

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
        12. lower-*.f6494.6

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
      5. Simplified94.6%

        \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
        3. lift-fma.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
        4. distribute-rgt-inN/A

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} + 2 \cdot x}{2} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right) + 2 \cdot x}{2} \]
        8. pow3N/A

          \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \color{blue}{{x}^{3}} + 2 \cdot x}{2} \]
        9. lift-*.f64N/A

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), {x}^{3}, 2 \cdot x\right)}}{2} \]
        11. cube-unmultN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
        12. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
        13. lower-*.f6494.6

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{2 \cdot x}\right)}{2} \]
        15. *-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
        16. lower-*.f6494.6

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
      7. Applied egg-rr94.6%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}}{2} \]

      if 2e-3 < (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x)))

      1. Initial program 100.0%

        \[\frac{e^{x} - e^{-x}}{2} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
        3. lower-fma.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
      5. Simplified85.8%

        \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \frac{1}{2520}\right) + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
        3. lift-fma.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
        5. lift-fma.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)} + 2\right)}{2} \]
        6. lift-fma.f64N/A

          \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right) + \frac{1}{3}\right)} + 2\right)}{2} \]
        7. distribute-rgt-inN/A

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

          \[\leadsto \frac{x \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)\right) \cdot \left(x \cdot x\right) + \left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)\right)}}{2} \]
      7. Applied egg-rr85.8%

        \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right)\right)}}{2} \]
      8. Taylor expanded in x around 0

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
      9. Step-by-step derivation
        1. Simplified85.8%

          \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
        2. Taylor expanded in x around inf

          \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{6} \cdot \left(\frac{1}{2520} + \frac{1}{60} \cdot \frac{1}{{x}^{2}}\right)\right)}}{2} \]
        3. Simplified85.8%

          \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{fma}\left(0.0003968253968253968, x \cdot x, 0.016666666666666666\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}}{2} \]
      10. Recombined 2 regimes into one program.
      11. Add Preprocessing

      Alternative 3: 88.0% accurate, 0.9× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\ \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \mathsf{fma}\left(x\_m, \mathsf{fma}\left(x\_m, 0.020833333333333332, 0.08333333333333333\right), 0.25\right), 0.5\right)\\ \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m)
       :precision binary64
       (*
        x_s
        (if (<= (- (exp x_m) (exp (- x_m))) 0.002)
          (* (fma x_m (* x_m 0.3333333333333333) 2.0) (* x_m 0.5))
          (*
           x_m
           (fma
            x_m
            (fma x_m (fma x_m 0.020833333333333332 0.08333333333333333) 0.25)
            0.5)))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      double code(double x_s, double x_m) {
      	double tmp;
      	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
      		tmp = fma(x_m, (x_m * 0.3333333333333333), 2.0) * (x_m * 0.5);
      	} else {
      		tmp = x_m * fma(x_m, fma(x_m, fma(x_m, 0.020833333333333332, 0.08333333333333333), 0.25), 0.5);
      	}
      	return x_s * tmp;
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      function code(x_s, x_m)
      	tmp = 0.0
      	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
      		tmp = Float64(fma(x_m, Float64(x_m * 0.3333333333333333), 2.0) * Float64(x_m * 0.5));
      	else
      		tmp = Float64(x_m * fma(x_m, fma(x_m, fma(x_m, 0.020833333333333332, 0.08333333333333333), 0.25), 0.5));
      	end
      	return Float64(x_s * tmp)
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(N[(x$95$m * N[(x$95$m * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * 0.020833333333333332 + 0.08333333333333333), $MachinePrecision] + 0.25), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      
      \\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
      \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \mathsf{fma}\left(x\_m, \mathsf{fma}\left(x\_m, 0.020833333333333332, 0.08333333333333333\right), 0.25\right), 0.5\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x))) < 2e-3

        1. Initial program 37.7%

          \[\frac{e^{x} - e^{-x}}{2} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

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

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

            \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
          5. lower-*.f6487.6

            \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
        5. Simplified87.6%

          \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left(x \cdot x\right)} + 2\right)}{2} \]
          2. lift-fma.f64N/A

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
          5. lower-*.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
          6. lift-fma.f64N/A

            \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)} \cdot \frac{x}{2} \]
          7. lift-*.f64N/A

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

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

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

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

            \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
          12. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
          13. div-invN/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
          14. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
          15. metadata-eval87.6

            \[\leadsto \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot \color{blue}{0.5}\right) \]
        7. Applied egg-rr87.6%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)} \]

        if 2e-3 < (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x)))

        1. Initial program 100.0%

          \[\frac{e^{x} - e^{-x}}{2} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
        4. Step-by-step derivation
          1. Simplified100.0%

            \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{4} + x \cdot \left(\frac{1}{12} + \frac{1}{48} \cdot x\right)\right)\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \color{blue}{x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{4} + x \cdot \left(\frac{1}{12} + \frac{1}{48} \cdot x\right)\right)\right)} \]
            2. +-commutativeN/A

              \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{4} + x \cdot \left(\frac{1}{12} + \frac{1}{48} \cdot x\right)\right) + \frac{1}{2}\right)} \]
            3. lower-fma.f64N/A

              \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(x, \frac{1}{4} + x \cdot \left(\frac{1}{12} + \frac{1}{48} \cdot x\right), \frac{1}{2}\right)} \]
            4. +-commutativeN/A

              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{12} + \frac{1}{48} \cdot x\right) + \frac{1}{4}}, \frac{1}{2}\right) \]
            5. lower-fma.f64N/A

              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{12} + \frac{1}{48} \cdot x, \frac{1}{4}\right)}, \frac{1}{2}\right) \]
            6. +-commutativeN/A

              \[\leadsto x \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{48} \cdot x + \frac{1}{12}}, \frac{1}{4}\right), \frac{1}{2}\right) \]
            7. *-commutativeN/A

              \[\leadsto x \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{48}} + \frac{1}{12}, \frac{1}{4}\right), \frac{1}{2}\right) \]
            8. lower-fma.f6479.9

              \[\leadsto x \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.020833333333333332, 0.08333333333333333\right)}, 0.25\right), 0.5\right) \]
          4. Simplified79.9%

            \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.020833333333333332, 0.08333333333333333\right), 0.25\right), 0.5\right)} \]
        5. Recombined 2 regimes into one program.
        6. Add Preprocessing

        Alternative 4: 88.0% accurate, 0.9× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\ \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332, 0.5\right)\\ \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m)
         :precision binary64
         (*
          x_s
          (if (<= (- (exp x_m) (exp (- x_m))) 0.002)
            (* (fma x_m (* x_m 0.3333333333333333) 2.0) (* x_m 0.5))
            (* x_m (fma x_m (* (* x_m x_m) 0.020833333333333332) 0.5)))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m) {
        	double tmp;
        	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
        		tmp = fma(x_m, (x_m * 0.3333333333333333), 2.0) * (x_m * 0.5);
        	} else {
        		tmp = x_m * fma(x_m, ((x_m * x_m) * 0.020833333333333332), 0.5);
        	}
        	return x_s * tmp;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m)
        	tmp = 0.0
        	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
        		tmp = Float64(fma(x_m, Float64(x_m * 0.3333333333333333), 2.0) * Float64(x_m * 0.5));
        	else
        		tmp = Float64(x_m * fma(x_m, Float64(Float64(x_m * x_m) * 0.020833333333333332), 0.5));
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(N[(x$95$m * N[(x$95$m * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.020833333333333332), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
        \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332, 0.5\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x))) < 2e-3

          1. Initial program 37.7%

            \[\frac{e^{x} - e^{-x}}{2} \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

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

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

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

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

              \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
            5. lower-*.f6487.6

              \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
          5. Simplified87.6%

            \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left(x \cdot x\right)} + 2\right)}{2} \]
            2. lift-fma.f64N/A

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
            5. lower-*.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
            6. lift-fma.f64N/A

              \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)} \cdot \frac{x}{2} \]
            7. lift-*.f64N/A

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
            12. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
            13. div-invN/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
            14. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
            15. metadata-eval87.6

              \[\leadsto \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot \color{blue}{0.5}\right) \]
          7. Applied egg-rr87.6%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)} \]

          if 2e-3 < (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x)))

          1. Initial program 100.0%

            \[\frac{e^{x} - e^{-x}}{2} \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
          4. Step-by-step derivation
            1. Simplified100.0%

              \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
            2. Taylor expanded in x around 0

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

                \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + 1\right)}}{2} \]
              2. distribute-lft-inN/A

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

                \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right)} + x \cdot 1}{2} \]
              4. unpow2N/A

                \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + x \cdot 1}{2} \]
              5. *-rgt-identityN/A

                \[\leadsto \frac{{x}^{2} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + \color{blue}{x}}{2} \]
              6. lower-fma.f64N/A

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

                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
              8. lower-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
              9. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right) + \frac{1}{2}}, x\right)}{2} \]
              10. lower-fma.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{6} + \frac{1}{24} \cdot x, \frac{1}{2}\right)}, x\right)}{2} \]
              11. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{24} \cdot x + \frac{1}{6}}, \frac{1}{2}\right), x\right)}{2} \]
              12. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}} + \frac{1}{6}, \frac{1}{2}\right), x\right)}{2} \]
              13. lower-fma.f6479.9

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right)}, 0.5\right), x\right)}{2} \]
            4. Simplified79.9%

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right), 0.5\right), x\right)}}{2} \]
            5. Taylor expanded in x around inf

              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{24} \cdot {x}^{2}}, x\right)}{2} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \frac{1}{24}}, x\right)}{2} \]
              2. lower-*.f64N/A

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

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}, x\right)}{2} \]
              4. lower-*.f6479.9

                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot 0.041666666666666664, x\right)}{2} \]
            7. Simplified79.9%

              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right) \cdot 0.041666666666666664}, x\right)}{2} \]
            8. Taylor expanded in x around 0

              \[\leadsto \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{48} \cdot {x}^{3}\right)} \]
            9. Step-by-step derivation
              1. lower-*.f64N/A

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

                \[\leadsto x \cdot \color{blue}{\left(\frac{1}{48} \cdot {x}^{3} + \frac{1}{2}\right)} \]
              3. unpow3N/A

                \[\leadsto x \cdot \left(\frac{1}{48} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)} + \frac{1}{2}\right) \]
              4. unpow2N/A

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

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

                \[\leadsto x \cdot \left(\color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)} + \frac{1}{2}\right) \]
              7. lower-fma.f64N/A

                \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(x, \frac{1}{48} \cdot {x}^{2}, \frac{1}{2}\right)} \]
              8. *-commutativeN/A

                \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{48}}, \frac{1}{2}\right) \]
              9. lower-*.f64N/A

                \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{48}}, \frac{1}{2}\right) \]
              10. unpow2N/A

                \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{48}, \frac{1}{2}\right) \]
              11. lower-*.f6479.9

                \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot 0.020833333333333332, 0.5\right) \]
            10. Simplified79.9%

              \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot 0.020833333333333332, 0.5\right)} \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 5: 76.0% accurate, 1.0× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\ \;\;\;\;x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\\ \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m)
           :precision binary64
           (*
            x_s
            (if (<= (- (exp x_m) (exp (- x_m))) 0.002) x_m (* x_m (fma x_m 0.25 0.5)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          double code(double x_s, double x_m) {
          	double tmp;
          	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
          		tmp = x_m;
          	} else {
          		tmp = x_m * fma(x_m, 0.25, 0.5);
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          function code(x_s, x_m)
          	tmp = 0.0
          	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
          		tmp = x_m;
          	else
          		tmp = Float64(x_m * fma(x_m, 0.25, 0.5));
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], x$95$m, N[(x$95$m * N[(x$95$m * 0.25 + 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          
          \\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
          \;\;\;\;x\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x))) < 2e-3

            1. Initial program 37.7%

              \[\frac{e^{x} - e^{-x}}{2} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
            4. Step-by-step derivation
              1. lower-*.f6468.6

                \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
            5. Simplified68.6%

              \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{x \cdot 2}}{2} \]
              2. associate-/l*N/A

                \[\leadsto \color{blue}{x \cdot \frac{2}{2}} \]
              3. metadata-evalN/A

                \[\leadsto x \cdot \color{blue}{1} \]
              4. lower-*.f6468.6

                \[\leadsto \color{blue}{x \cdot 1} \]
            7. Applied egg-rr68.6%

              \[\leadsto \color{blue}{x \cdot 1} \]
            8. Step-by-step derivation
              1. *-rgt-identity68.6

                \[\leadsto \color{blue}{x} \]
            9. Applied egg-rr68.6%

              \[\leadsto \color{blue}{x} \]

            if 2e-3 < (-.f64 (exp.f64 x) (exp.f64 (neg.f64 x)))

            1. Initial program 100.0%

              \[\frac{e^{x} - e^{-x}}{2} \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
            4. Step-by-step derivation
              1. Simplified100.0%

                \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
              2. Taylor expanded in x around 0

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

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

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

                  \[\leadsto x \cdot \left(\color{blue}{x \cdot \frac{1}{4}} + \frac{1}{2}\right) \]
                4. lower-fma.f6447.1

                  \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(x, 0.25, 0.5\right)} \]
              4. Simplified47.1%

                \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, 0.25, 0.5\right)} \]
            5. Recombined 2 regimes into one program.
            6. Add Preprocessing

            Alternative 6: 94.4% accurate, 2.1× speedup?

            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{x\_m \cdot \mathsf{fma}\left(t\_0, \left(x\_m \cdot x\_m\right) \cdot \left(t\_0 \cdot \left(x\_m \cdot x\_m\right)\right), -4\right)}{\mathsf{fma}\left(x\_m \cdot x\_m, t\_0, -2\right)}}{2}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332\right)\right)\\ \end{array} \end{array} \end{array} \]
            x\_m = (fabs.f64 x)
            x\_s = (copysign.f64 #s(literal 1 binary64) x)
            (FPCore (x_s x_m)
             :precision binary64
             (let* ((t_0 (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)))
               (*
                x_s
                (if (<= x_m 3e+77)
                  (/
                   (/
                    (* x_m (fma t_0 (* (* x_m x_m) (* t_0 (* x_m x_m))) -4.0))
                    (fma (* x_m x_m) t_0 -2.0))
                   2.0)
                  (* x_m (* x_m (* (* x_m x_m) 0.020833333333333332)))))))
            x\_m = fabs(x);
            x\_s = copysign(1.0, x);
            double code(double x_s, double x_m) {
            	double t_0 = fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333);
            	double tmp;
            	if (x_m <= 3e+77) {
            		tmp = ((x_m * fma(t_0, ((x_m * x_m) * (t_0 * (x_m * x_m))), -4.0)) / fma((x_m * x_m), t_0, -2.0)) / 2.0;
            	} else {
            		tmp = x_m * (x_m * ((x_m * x_m) * 0.020833333333333332));
            	}
            	return x_s * tmp;
            }
            
            x\_m = abs(x)
            x\_s = copysign(1.0, x)
            function code(x_s, x_m)
            	t_0 = fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333)
            	tmp = 0.0
            	if (x_m <= 3e+77)
            		tmp = Float64(Float64(Float64(x_m * fma(t_0, Float64(Float64(x_m * x_m) * Float64(t_0 * Float64(x_m * x_m))), -4.0)) / fma(Float64(x_m * x_m), t_0, -2.0)) / 2.0);
            	else
            		tmp = Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.020833333333333332)));
            	end
            	return Float64(x_s * tmp)
            end
            
            x\_m = N[Abs[x], $MachinePrecision]
            x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[x$95$s_, x$95$m_] := Block[{t$95$0 = N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]}, N[(x$95$s * If[LessEqual[x$95$m, 3e+77], N[(N[(N[(x$95$m * N[(t$95$0 * N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(t$95$0 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x$95$m * x$95$m), $MachinePrecision] * t$95$0 + -2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.020833333333333332), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
            
            \begin{array}{l}
            x\_m = \left|x\right|
            \\
            x\_s = \mathsf{copysign}\left(1, x\right)
            
            \\
            \begin{array}{l}
            t_0 := \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right)\\
            x\_s \cdot \begin{array}{l}
            \mathbf{if}\;x\_m \leq 3 \cdot 10^{+77}:\\
            \;\;\;\;\frac{\frac{x\_m \cdot \mathsf{fma}\left(t\_0, \left(x\_m \cdot x\_m\right) \cdot \left(t\_0 \cdot \left(x\_m \cdot x\_m\right)\right), -4\right)}{\mathsf{fma}\left(x\_m \cdot x\_m, t\_0, -2\right)}}{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332\right)\right)\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 2.9999999999999998e77

              1. Initial program 42.0%

                \[\frac{e^{x} - e^{-x}}{2} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

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

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

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

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

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                5. lower-*.f64N/A

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

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

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

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

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                10. lower-fma.f64N/A

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

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                12. lower-*.f6489.8

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
              5. Simplified89.8%

                \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                3. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
                4. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), 2\right)}}{2} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), 2\right) \cdot x}}{2} \]
                6. lift-fma.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) + 2\right)} \cdot x}{2} \]
                7. flip-+N/A

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

                  \[\leadsto \frac{\color{blue}{\frac{\left(\left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)\right) - 2 \cdot 2\right) \cdot x}{\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) - 2}}}{2} \]
                9. lower-/.f64N/A

                  \[\leadsto \frac{\color{blue}{\frac{\left(\left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)\right) - 2 \cdot 2\right) \cdot x}{\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) - 2}}}{2} \]
              7. Applied egg-rr72.7%

                \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right)\right), -4\right) \cdot x}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), -2\right)}}}{2} \]

              if 2.9999999999999998e77 < x

              1. Initial program 100.0%

                \[\frac{e^{x} - e^{-x}}{2} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
              4. Step-by-step derivation
                1. Simplified100.0%

                  \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                2. Taylor expanded in x around 0

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + 1\right)}}{2} \]
                  2. distribute-lft-inN/A

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

                    \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right)} + x \cdot 1}{2} \]
                  4. unpow2N/A

                    \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + x \cdot 1}{2} \]
                  5. *-rgt-identityN/A

                    \[\leadsto \frac{{x}^{2} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + \color{blue}{x}}{2} \]
                  6. lower-fma.f64N/A

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

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                  8. lower-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                  9. +-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right) + \frac{1}{2}}, x\right)}{2} \]
                  10. lower-fma.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{6} + \frac{1}{24} \cdot x, \frac{1}{2}\right)}, x\right)}{2} \]
                  11. +-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{24} \cdot x + \frac{1}{6}}, \frac{1}{2}\right), x\right)}{2} \]
                  12. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}} + \frac{1}{6}, \frac{1}{2}\right), x\right)}{2} \]
                  13. lower-fma.f64100.0

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right)}, 0.5\right), x\right)}{2} \]
                4. Simplified100.0%

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right), 0.5\right), x\right)}}{2} \]
                5. Taylor expanded in x around inf

                  \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{24} \cdot {x}^{2}}, x\right)}{2} \]
                6. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \frac{1}{24}}, x\right)}{2} \]
                  2. lower-*.f64N/A

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

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}, x\right)}{2} \]
                  4. lower-*.f64100.0

                    \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot 0.041666666666666664, x\right)}{2} \]
                7. Simplified100.0%

                  \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right) \cdot 0.041666666666666664}, x\right)}{2} \]
                8. Taylor expanded in x around inf

                  \[\leadsto \color{blue}{\frac{1}{48} \cdot {x}^{4}} \]
                9. Step-by-step derivation
                  1. metadata-evalN/A

                    \[\leadsto \frac{1}{48} \cdot {x}^{\color{blue}{\left(3 + 1\right)}} \]
                  2. pow-plusN/A

                    \[\leadsto \frac{1}{48} \cdot \color{blue}{\left({x}^{3} \cdot x\right)} \]
                  3. associate-*l*N/A

                    \[\leadsto \color{blue}{\left(\frac{1}{48} \cdot {x}^{3}\right) \cdot x} \]
                  4. *-commutativeN/A

                    \[\leadsto \color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{3}\right)} \]
                  5. lower-*.f64N/A

                    \[\leadsto \color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{3}\right)} \]
                  6. unpow3N/A

                    \[\leadsto x \cdot \left(\frac{1}{48} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)}\right) \]
                  7. unpow2N/A

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

                    \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{48} \cdot {x}^{2}\right) \cdot x\right)} \]
                  9. *-commutativeN/A

                    \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)\right)} \]
                  10. lower-*.f64N/A

                    \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)\right)} \]
                  11. *-commutativeN/A

                    \[\leadsto x \cdot \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{48}\right)}\right) \]
                  12. lower-*.f64N/A

                    \[\leadsto x \cdot \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{48}\right)}\right) \]
                  13. unpow2N/A

                    \[\leadsto x \cdot \left(x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{48}\right)\right) \]
                  14. lower-*.f64100.0

                    \[\leadsto x \cdot \left(x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot 0.020833333333333332\right)\right) \]
                10. Simplified100.0%

                  \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.020833333333333332\right)\right)} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification78.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \left(x \cdot x\right) \cdot \left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right) \cdot \left(x \cdot x\right)\right), -4\right)}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), -2\right)}}{2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.020833333333333332\right)\right)\\ \end{array} \]
              7. Add Preprocessing

              Alternative 7: 93.0% accurate, 3.9× speedup?

              \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{\mathsf{fma}\left(x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right), 0.3333333333333333\right), x\_m \cdot x\_m, x\_m \cdot 2\right)}{2} \end{array} \]
              x\_m = (fabs.f64 x)
              x\_s = (copysign.f64 #s(literal 1 binary64) x)
              (FPCore (x_s x_m)
               :precision binary64
               (*
                x_s
                (/
                 (fma
                  (*
                   x_m
                   (fma
                    x_m
                    (* x_m (fma 0.0003968253968253968 (* x_m x_m) 0.016666666666666666))
                    0.3333333333333333))
                  (* x_m x_m)
                  (* x_m 2.0))
                 2.0)))
              x\_m = fabs(x);
              x\_s = copysign(1.0, x);
              double code(double x_s, double x_m) {
              	return x_s * (fma((x_m * fma(x_m, (x_m * fma(0.0003968253968253968, (x_m * x_m), 0.016666666666666666)), 0.3333333333333333)), (x_m * x_m), (x_m * 2.0)) / 2.0);
              }
              
              x\_m = abs(x)
              x\_s = copysign(1.0, x)
              function code(x_s, x_m)
              	return Float64(x_s * Float64(fma(Float64(x_m * fma(x_m, Float64(x_m * fma(0.0003968253968253968, Float64(x_m * x_m), 0.016666666666666666)), 0.3333333333333333)), Float64(x_m * x_m), Float64(x_m * 2.0)) / 2.0))
              end
              
              x\_m = N[Abs[x], $MachinePrecision]
              x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(0.0003968253968253968 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + N[(x$95$m * 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              x\_m = \left|x\right|
              \\
              x\_s = \mathsf{copysign}\left(1, x\right)
              
              \\
              x\_s \cdot \frac{\mathsf{fma}\left(x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right), 0.3333333333333333\right), x\_m \cdot x\_m, x\_m \cdot 2\right)}{2}
              \end{array}
              
              Derivation
              1. Initial program 53.8%

                \[\frac{e^{x} - e^{-x}}{2} \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

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

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

                  \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                3. lower-fma.f64N/A

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
              5. Simplified94.1%

                \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \frac{1}{2520}\right) + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                3. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                5. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)} + 2\right)}{2} \]
                6. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right) + 2\right)}{2} \]
                7. associate-*l*N/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)\right)} + 2\right)}{2} \]
                8. *-commutativeN/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)\right) \cdot x} + 2\right)}{2} \]
                9. lower-fma.f64N/A

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right), x, 2\right)}}{2} \]
              7. Applied egg-rr94.1%

                \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot x, 0.3333333333333333\right), x, 2\right)}}{2} \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot \left(\left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right) \cdot \left(x \cdot x\right) + \frac{1}{3}\right)\right) \cdot x + 2\right)}{2} \]
                2. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot \left(\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)} \cdot \left(x \cdot x\right) + \frac{1}{3}\right)\right) \cdot x + 2\right)}{2} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot \left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right) \cdot \color{blue}{\left(x \cdot x\right)} + \frac{1}{3}\right)\right) \cdot x + 2\right)}{2} \]
                4. lift-fma.f64N/A

                  \[\leadsto \frac{x \cdot \left(\left(x \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)}\right) \cdot x + 2\right)}{2} \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right)} \cdot x + 2\right)}{2} \]
                6. distribute-rgt-inN/A

                  \[\leadsto \frac{\color{blue}{\left(\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right) \cdot x\right) \cdot x + 2 \cdot x}}{2} \]
                7. associate-*l*N/A

                  \[\leadsto \frac{\color{blue}{\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right) \cdot \left(x \cdot x\right)} + 2 \cdot x}{2} \]
                8. lift-*.f64N/A

                  \[\leadsto \frac{\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right) \cdot \color{blue}{\left(x \cdot x\right)} + 2 \cdot x}{2} \]
                9. *-commutativeN/A

                  \[\leadsto \frac{\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right) \cdot \left(x \cdot x\right) + \color{blue}{x \cdot 2}}{2} \]
                10. lift-*.f64N/A

                  \[\leadsto \frac{\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot x, \frac{1}{3}\right)\right) \cdot \left(x \cdot x\right) + \color{blue}{x \cdot 2}}{2} \]
                11. lower-fma.f6494.1

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot x, 0.3333333333333333\right), x \cdot x, x \cdot 2\right)}}{2} \]
              9. Applied egg-rr94.1%

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.0003968253968253968, x \cdot x, 0.016666666666666666\right), 0.3333333333333333\right), x \cdot x, x \cdot 2\right)}}{2} \]
              10. Add Preprocessing

              Alternative 8: 92.9% accurate, 4.1× speedup?

              \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_0 := x\_m \cdot \left(x\_m \cdot x\_m\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 7.6:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), t\_0, x\_m \cdot 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot \left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot t\_0\right)\right)\right)}{2}\\ \end{array} \end{array} \end{array} \]
              x\_m = (fabs.f64 x)
              x\_s = (copysign.f64 #s(literal 1 binary64) x)
              (FPCore (x_s x_m)
               :precision binary64
               (let* ((t_0 (* x_m (* x_m x_m))))
                 (*
                  x_s
                  (if (<= x_m 7.6)
                    (/
                     (fma
                      (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)
                      t_0
                      (* x_m 2.0))
                     2.0)
                    (/ (* x_m (* 0.0003968253968253968 (* x_m (* (* x_m x_m) t_0)))) 2.0)))))
              x\_m = fabs(x);
              x\_s = copysign(1.0, x);
              double code(double x_s, double x_m) {
              	double t_0 = x_m * (x_m * x_m);
              	double tmp;
              	if (x_m <= 7.6) {
              		tmp = fma(fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333), t_0, (x_m * 2.0)) / 2.0;
              	} else {
              		tmp = (x_m * (0.0003968253968253968 * (x_m * ((x_m * x_m) * t_0)))) / 2.0;
              	}
              	return x_s * tmp;
              }
              
              x\_m = abs(x)
              x\_s = copysign(1.0, x)
              function code(x_s, x_m)
              	t_0 = Float64(x_m * Float64(x_m * x_m))
              	tmp = 0.0
              	if (x_m <= 7.6)
              		tmp = Float64(fma(fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333), t_0, Float64(x_m * 2.0)) / 2.0);
              	else
              		tmp = Float64(Float64(x_m * Float64(0.0003968253968253968 * Float64(x_m * Float64(Float64(x_m * x_m) * t_0)))) / 2.0);
              	end
              	return Float64(x_s * tmp)
              end
              
              x\_m = N[Abs[x], $MachinePrecision]
              x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[x$95$s_, x$95$m_] := Block[{t$95$0 = N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[x$95$m, 7.6], N[(N[(N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * t$95$0 + N[(x$95$m * 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x$95$m * N[(0.0003968253968253968 * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]), $MachinePrecision]]
              
              \begin{array}{l}
              x\_m = \left|x\right|
              \\
              x\_s = \mathsf{copysign}\left(1, x\right)
              
              \\
              \begin{array}{l}
              t_0 := x\_m \cdot \left(x\_m \cdot x\_m\right)\\
              x\_s \cdot \begin{array}{l}
              \mathbf{if}\;x\_m \leq 7.6:\\
              \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), t\_0, x\_m \cdot 2\right)}{2}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x\_m \cdot \left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot t\_0\right)\right)\right)}{2}\\
              
              
              \end{array}
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < 7.5999999999999996

                1. Initial program 37.7%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                  5. lower-*.f64N/A

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                  10. lower-fma.f64N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                  12. lower-*.f6494.6

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
                5. Simplified94.6%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                  3. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
                  4. distribute-rgt-inN/A

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

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

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} + 2 \cdot x}{2} \]
                  7. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right) + 2 \cdot x}{2} \]
                  8. pow3N/A

                    \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \color{blue}{{x}^{3}} + 2 \cdot x}{2} \]
                  9. lift-*.f64N/A

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

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), {x}^{3}, 2 \cdot x\right)}}{2} \]
                  11. cube-unmultN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  12. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  13. lower-*.f6494.6

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  14. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{2 \cdot x}\right)}{2} \]
                  15. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                  16. lower-*.f6494.6

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                7. Applied egg-rr94.6%

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}}{2} \]

                if 7.5999999999999996 < x

                1. Initial program 100.0%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
                5. Simplified85.8%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \frac{1}{2520}\right) + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  3. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                  5. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)} + 2\right)}{2} \]
                  6. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right) + \frac{1}{3}\right)} + 2\right)}{2} \]
                  7. distribute-rgt-inN/A

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)\right) \cdot \left(x \cdot x\right) + \left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)\right)}}{2} \]
                7. Applied egg-rr85.8%

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right)\right)}}{2} \]
                8. Taylor expanded in x around 0

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
                9. Step-by-step derivation
                  1. Simplified85.8%

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
                  2. Taylor expanded in x around inf

                    \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{1}{2520} \cdot {x}^{6}\right)}}{2} \]
                  3. Simplified85.8%

                    \[\leadsto \frac{x \cdot \color{blue}{\left(0.0003968253968253968 \cdot \left(x \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)\right)\right)}}{2} \]
                10. Recombined 2 regimes into one program.
                11. Final simplification92.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7.6:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(0.0003968253968253968 \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)\right)}{2}\\ \end{array} \]
                12. Add Preprocessing

                Alternative 9: 93.0% accurate, 4.3× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/
                   (*
                    x_m
                    (fma
                     x_m
                     (*
                      x_m
                      (fma
                       x_m
                       (* x_m (fma 0.0003968253968253968 (* x_m x_m) 0.016666666666666666))
                       0.3333333333333333))
                     2.0))
                   2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * ((x_m * fma(x_m, (x_m * fma(x_m, (x_m * fma(0.0003968253968253968, (x_m * x_m), 0.016666666666666666)), 0.3333333333333333)), 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(Float64(x_m * fma(x_m, Float64(x_m * fma(x_m, Float64(x_m * fma(0.0003968253968253968, Float64(x_m * x_m), 0.016666666666666666)), 0.3333333333333333)), 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(0.0003968253968253968 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(0.0003968253968253968, x\_m \cdot x\_m, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
                5. Simplified94.1%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                6. Taylor expanded in x around 0

                  \[\leadsto \frac{x \cdot \color{blue}{\left(2 + {x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right)\right)}}{2} \]
                7. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  2. unpow2N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}{2} \]
                  3. associate-*l*N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{x \cdot \left(x \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right)\right)} + 2\right)}{2} \]
                  4. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right), 2\right)}}{2} \]
                  5. lower-*.f64N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right)}, 2\right)}{2} \]
                  6. +-commutativeN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right) + \frac{1}{3}\right)}, 2\right)}{2} \]
                  7. unpow2N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \left(\color{blue}{x \cdot \left(x \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right)} + \frac{1}{3}\right), 2\right)}{2} \]
                  9. lower-fma.f64N/A

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \color{blue}{\left(\frac{1}{2520} \cdot {x}^{2} + \frac{1}{60}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                  12. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2520}, {x}^{2}, \frac{1}{60}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                  13. unpow2N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\frac{1}{2520}, \color{blue}{x \cdot x}, \frac{1}{60}\right), \frac{1}{3}\right), 2\right)}{2} \]
                  14. lower-*.f6494.1

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.0003968253968253968, \color{blue}{x \cdot x}, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}{2} \]
                8. Simplified94.1%

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.0003968253968253968, x \cdot x, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                9. Add Preprocessing

                Alternative 10: 92.8% accurate, 4.4× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot x\_m, \mathsf{fma}\left(x\_m, \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right) \cdot 0.0003968253968253968, 0.3333333333333333\right), 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/
                   (*
                    x_m
                    (fma
                     (* x_m x_m)
                     (fma x_m (* (* x_m (* x_m x_m)) 0.0003968253968253968) 0.3333333333333333)
                     2.0))
                   2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * ((x_m * fma((x_m * x_m), fma(x_m, ((x_m * (x_m * x_m)) * 0.0003968253968253968), 0.3333333333333333), 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(Float64(x_m * fma(Float64(x_m * x_m), fma(x_m, Float64(Float64(x_m * Float64(x_m * x_m)) * 0.0003968253968253968), 0.3333333333333333), 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(x$95$m * N[(N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] * 0.0003968253968253968), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot x\_m, \mathsf{fma}\left(x\_m, \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right) \cdot 0.0003968253968253968, 0.3333333333333333\right), 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
                5. Simplified94.1%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                6. Taylor expanded in x around inf

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{2520} \cdot {x}^{3}}, \frac{1}{3}\right), 2\right)}{2} \]
                7. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{2520} \cdot {x}^{3}}, \frac{1}{3}\right), 2\right)}{2} \]
                  2. cube-multN/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \frac{1}{2520} \cdot \left(x \cdot \color{blue}{{x}^{2}}\right), \frac{1}{3}\right), 2\right)}{2} \]
                  4. lower-*.f64N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \frac{1}{2520} \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right), \frac{1}{3}\right), 2\right)}{2} \]
                  6. lower-*.f6494.1

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, 0.0003968253968253968 \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right), 0.3333333333333333\right), 2\right)}{2} \]
                8. Simplified94.1%

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{0.0003968253968253968 \cdot \left(x \cdot \left(x \cdot x\right)\right)}, 0.3333333333333333\right), 2\right)}{2} \]
                9. Final simplification94.1%

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \left(x \cdot \left(x \cdot x\right)\right) \cdot 0.0003968253968253968, 0.3333333333333333\right), 2\right)}{2} \]
                10. Add Preprocessing

                Alternative 11: 92.6% accurate, 4.5× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right), x\_m, 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/
                   (*
                    x_m
                    (fma
                     (* 0.0003968253968253968 (* x_m (* x_m (* x_m (* x_m x_m)))))
                     x_m
                     2.0))
                   2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * ((x_m * fma((0.0003968253968253968 * (x_m * (x_m * (x_m * (x_m * x_m))))), x_m, 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(Float64(x_m * fma(Float64(0.0003968253968253968 * Float64(x_m * Float64(x_m * Float64(x_m * Float64(x_m * x_m))))), x_m, 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(N[(0.0003968253968253968 * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x$95$m + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right), x\_m, 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
                5. Simplified94.1%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \frac{1}{2520}\right) + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  3. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                  5. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)} + 2\right)}{2} \]
                  6. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right) + 2\right)}{2} \]
                  7. associate-*l*N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)\right)} + 2\right)}{2} \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)\right) \cdot x} + 2\right)}{2} \]
                  9. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right), x, 2\right)}}{2} \]
                7. Applied egg-rr94.1%

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot x, 0.3333333333333333\right), x, 2\right)}}{2} \]
                8. Taylor expanded in x around inf

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{\frac{1}{2520} \cdot {x}^{5}}, x, 2\right)}{2} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{\frac{1}{2520} \cdot {x}^{5}}, x, 2\right)}{2} \]
                  2. metadata-evalN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot {x}^{\color{blue}{\left(4 + 1\right)}}, x, 2\right)}{2} \]
                  3. pow-plusN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \color{blue}{\left({x}^{4} \cdot x\right)}, x, 2\right)}{2} \]
                  4. *-rgt-identityN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left({x}^{4} \cdot \color{blue}{\left(x \cdot 1\right)}\right), x, 2\right)}{2} \]
                  5. rgt-mult-inverseN/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left({x}^{4} \cdot \left(x \cdot \color{blue}{\frac{x \cdot 1}{x}}\right)\right), x, 2\right)}{2} \]
                  7. *-rgt-identityN/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left({x}^{4} \cdot \color{blue}{\frac{x \cdot x}{x}}\right), x, 2\right)}{2} \]
                  9. unpow2N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \color{blue}{\frac{{x}^{4} \cdot {x}^{2}}{x}}, x, 2\right)}{2} \]
                  11. metadata-evalN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{{x}^{\color{blue}{\left(2 \cdot 2\right)}} \cdot {x}^{2}}{x}, x, 2\right)}{2} \]
                  12. pow-sqrN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{\color{blue}{\left({x}^{2} \cdot {x}^{2}\right)} \cdot {x}^{2}}{x}, x, 2\right)}{2} \]
                  13. unpow3N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{\color{blue}{{\left({x}^{2}\right)}^{3}}}{x}, x, 2\right)}{2} \]
                  14. cube-unmultN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{\color{blue}{{x}^{2} \cdot \left({x}^{2} \cdot {x}^{2}\right)}}{x}, x, 2\right)}{2} \]
                  15. pow-sqrN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{{x}^{2} \cdot \color{blue}{{x}^{\left(2 \cdot 2\right)}}}{x}, x, 2\right)}{2} \]
                  16. metadata-evalN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \frac{{x}^{2} \cdot {x}^{\color{blue}{4}}}{x}, x, 2\right)}{2} \]
                  17. associate-*l/N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \color{blue}{\left(\frac{{x}^{2}}{x} \cdot {x}^{4}\right)}, x, 2\right)}{2} \]
                  18. unpow2N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(\frac{\color{blue}{x \cdot x}}{x} \cdot {x}^{4}\right), x, 2\right)}{2} \]
                  19. associate-/l*N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(\color{blue}{\left(x \cdot \frac{x}{x}\right)} \cdot {x}^{4}\right), x, 2\right)}{2} \]
                  20. *-rgt-identityN/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(\left(x \cdot \color{blue}{\left(x \cdot \frac{1}{x}\right)}\right) \cdot {x}^{4}\right), x, 2\right)}{2} \]
                  22. rgt-mult-inverseN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(\left(x \cdot \color{blue}{1}\right) \cdot {x}^{4}\right), x, 2\right)}{2} \]
                  23. *-rgt-identityN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(\color{blue}{x} \cdot {x}^{4}\right), x, 2\right)}{2} \]
                  24. lower-*.f64N/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \color{blue}{\left(x \cdot {x}^{4}\right)}, x, 2\right)}{2} \]
                  25. metadata-evalN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(x \cdot {x}^{\color{blue}{\left(2 \cdot 2\right)}}\right), x, 2\right)}{2} \]
                  26. pow-sqrN/A

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{2520} \cdot \left(x \cdot \color{blue}{\left({x}^{2} \cdot {x}^{2}\right)}\right), x, 2\right)}{2} \]
                10. Simplified93.8%

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{0.0003968253968253968 \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right)}, x, 2\right)}{2} \]
                11. Add Preprocessing

                Alternative 12: 90.6% accurate, 4.9× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3.3:\\ \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \mathsf{fma}\left(0.016666666666666666, x\_m \cdot x\_m, 0.3333333333333333\right)\right)\right)}{2}\\ \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (if (<= x_m 3.3)
                    (* (fma x_m (* x_m 0.3333333333333333) 2.0) (* x_m 0.5))
                    (/
                     (*
                      x_m
                      (*
                       x_m
                       (* x_m (fma 0.016666666666666666 (* x_m x_m) 0.3333333333333333))))
                     2.0))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	double tmp;
                	if (x_m <= 3.3) {
                		tmp = fma(x_m, (x_m * 0.3333333333333333), 2.0) * (x_m * 0.5);
                	} else {
                		tmp = (x_m * (x_m * (x_m * fma(0.016666666666666666, (x_m * x_m), 0.3333333333333333)))) / 2.0;
                	}
                	return x_s * tmp;
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	tmp = 0.0
                	if (x_m <= 3.3)
                		tmp = Float64(fma(x_m, Float64(x_m * 0.3333333333333333), 2.0) * Float64(x_m * 0.5));
                	else
                		tmp = Float64(Float64(x_m * Float64(x_m * Float64(x_m * fma(0.016666666666666666, Float64(x_m * x_m), 0.3333333333333333)))) / 2.0);
                	end
                	return Float64(x_s * tmp)
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 3.3], N[(N[(x$95$m * N[(x$95$m * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(0.016666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \begin{array}{l}
                \mathbf{if}\;x\_m \leq 3.3:\\
                \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \mathsf{fma}\left(0.016666666666666666, x\_m \cdot x\_m, 0.3333333333333333\right)\right)\right)}{2}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 3.2999999999999998

                  1. Initial program 37.7%

                    \[\frac{e^{x} - e^{-x}}{2} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                    5. lower-*.f6487.6

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                  5. Simplified87.6%

                    \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
                  6. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left(x \cdot x\right)} + 2\right)}{2} \]
                    2. lift-fma.f64N/A

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                    5. lower-*.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                    6. lift-fma.f64N/A

                      \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)} \cdot \frac{x}{2} \]
                    7. lift-*.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                    12. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                    13. div-invN/A

                      \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                    14. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                    15. metadata-eval87.6

                      \[\leadsto \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot \color{blue}{0.5}\right) \]
                  7. Applied egg-rr87.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)} \]

                  if 3.2999999999999998 < x

                  1. Initial program 100.0%

                    \[\frac{e^{x} - e^{-x}}{2} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                    5. lower-*.f64N/A

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                    10. lower-fma.f64N/A

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                    12. lower-*.f6484.1

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
                  5. Simplified84.1%

                    \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
                  6. Taylor expanded in x around inf

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

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

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

                      \[\leadsto \frac{x \cdot \left({x}^{4} \cdot \color{blue}{\frac{\frac{1}{3} \cdot 1}{{x}^{2}}} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    4. metadata-evalN/A

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

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

                      \[\leadsto \frac{x \cdot \left(\frac{\color{blue}{\frac{1}{3} \cdot {x}^{4}}}{{x}^{2}} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    7. associate-/l*N/A

                      \[\leadsto \frac{x \cdot \left(\color{blue}{\frac{1}{3} \cdot \frac{{x}^{4}}{{x}^{2}}} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    8. metadata-evalN/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \frac{{x}^{\color{blue}{\left(2 \cdot 2\right)}}}{{x}^{2}} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    9. pow-sqrN/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \frac{\color{blue}{{x}^{2} \cdot {x}^{2}}}{{x}^{2}} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    10. associate-/l*N/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left({x}^{2} \cdot \frac{{x}^{2}}{{x}^{2}}\right)} + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    11. *-rgt-identityN/A

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

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \left({x}^{2} \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{{x}^{2}}\right)}\right) + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    13. rgt-mult-inverseN/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \left({x}^{2} \cdot \color{blue}{1}\right) + {x}^{4} \cdot \frac{1}{60}\right)}{2} \]
                    14. *-rgt-identityN/A

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

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot {x}^{2} + \color{blue}{\frac{1}{60} \cdot {x}^{4}}\right)}{2} \]
                    16. metadata-evalN/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot {x}^{2} + \frac{1}{60} \cdot {x}^{\color{blue}{\left(2 \cdot 2\right)}}\right)}{2} \]
                    17. pow-sqrN/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot {x}^{2} + \frac{1}{60} \cdot \color{blue}{\left({x}^{2} \cdot {x}^{2}\right)}\right)}{2} \]
                    18. associate-*l*N/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot {x}^{2} + \color{blue}{\left(\frac{1}{60} \cdot {x}^{2}\right) \cdot {x}^{2}}\right)}{2} \]
                    19. distribute-rgt-inN/A

                      \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + \frac{1}{60} \cdot {x}^{2}\right)\right)}}{2} \]
                  8. Simplified84.1%

                    \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot \mathsf{fma}\left(0.016666666666666666, x \cdot x, 0.3333333333333333\right)\right)\right)}}{2} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 13: 90.7% accurate, 4.9× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), x\_m \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/
                   (fma
                    (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)
                    (* x_m (* x_m x_m))
                    (* x_m 2.0))
                   2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * (fma(fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333), (x_m * (x_m * x_m)), (x_m * 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(fma(fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333), Float64(x_m * Float64(x_m * x_m)), Float64(x_m * 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), x\_m \cdot \left(x\_m \cdot x\_m\right), x\_m \cdot 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                  5. lower-*.f64N/A

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                  10. lower-fma.f64N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                  12. lower-*.f6491.9

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
                5. Simplified91.9%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                  3. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
                  4. distribute-rgt-inN/A

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

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

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} + 2 \cdot x}{2} \]
                  7. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right) + 2 \cdot x}{2} \]
                  8. pow3N/A

                    \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \color{blue}{{x}^{3}} + 2 \cdot x}{2} \]
                  9. lift-*.f64N/A

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

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), {x}^{3}, 2 \cdot x\right)}}{2} \]
                  11. cube-unmultN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  12. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  13. lower-*.f6491.9

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                  14. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{2 \cdot x}\right)}{2} \]
                  15. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                  16. lower-*.f6491.9

                    \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                7. Applied egg-rr91.9%

                  \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}}{2} \]
                8. Add Preprocessing

                Alternative 14: 90.7% accurate, 5.0× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 5:\\ \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.016666666666666666 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)}{2}\\ \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (if (<= x_m 5.0)
                    (* (fma x_m (* x_m 0.3333333333333333) 2.0) (* x_m 0.5))
                    (/ (* 0.016666666666666666 (* (* x_m x_m) (* x_m (* x_m x_m)))) 2.0))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	double tmp;
                	if (x_m <= 5.0) {
                		tmp = fma(x_m, (x_m * 0.3333333333333333), 2.0) * (x_m * 0.5);
                	} else {
                		tmp = (0.016666666666666666 * ((x_m * x_m) * (x_m * (x_m * x_m)))) / 2.0;
                	}
                	return x_s * tmp;
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	tmp = 0.0
                	if (x_m <= 5.0)
                		tmp = Float64(fma(x_m, Float64(x_m * 0.3333333333333333), 2.0) * Float64(x_m * 0.5));
                	else
                		tmp = Float64(Float64(0.016666666666666666 * Float64(Float64(x_m * x_m) * Float64(x_m * Float64(x_m * x_m)))) / 2.0);
                	end
                	return Float64(x_s * tmp)
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 5.0], N[(N[(x$95$m * N[(x$95$m * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(0.016666666666666666 * N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \begin{array}{l}
                \mathbf{if}\;x\_m \leq 5:\\
                \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{0.016666666666666666 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)}{2}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 5

                  1. Initial program 37.7%

                    \[\frac{e^{x} - e^{-x}}{2} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                    5. lower-*.f6487.6

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                  5. Simplified87.6%

                    \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
                  6. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left(x \cdot x\right)} + 2\right)}{2} \]
                    2. lift-fma.f64N/A

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                    5. lower-*.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                    6. lift-fma.f64N/A

                      \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)} \cdot \frac{x}{2} \]
                    7. lift-*.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                    12. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                    13. div-invN/A

                      \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                    14. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                    15. metadata-eval87.6

                      \[\leadsto \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot \color{blue}{0.5}\right) \]
                  7. Applied egg-rr87.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)} \]

                  if 5 < x

                  1. Initial program 100.0%

                    \[\frac{e^{x} - e^{-x}}{2} \]
                  2. Add Preprocessing
                  3. Taylor expanded in x around 0

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                    5. lower-*.f64N/A

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

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

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

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                    10. lower-fma.f64N/A

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

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                    12. lower-*.f6484.1

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
                  5. Simplified84.1%

                    \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
                  6. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \frac{1}{60}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{60}\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                    3. lift-fma.f64N/A

                      \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right)} + 2\right)}{2} \]
                    4. distribute-rgt-inN/A

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

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

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} + 2 \cdot x}{2} \]
                    7. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right) + 2 \cdot x}{2} \]
                    8. pow3N/A

                      \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right) \cdot \color{blue}{{x}^{3}} + 2 \cdot x}{2} \]
                    9. lift-*.f64N/A

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

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), {x}^{3}, 2 \cdot x\right)}}{2} \]
                    11. cube-unmultN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                    12. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \color{blue}{\left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                    13. lower-*.f6484.1

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), \color{blue}{x \cdot \left(x \cdot x\right)}, 2 \cdot x\right)}{2} \]
                    14. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{2 \cdot x}\right)}{2} \]
                    15. *-commutativeN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot \frac{1}{60}, \frac{1}{3}\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                    16. lower-*.f6484.1

                      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), \color{blue}{x \cdot 2}\right)}{2} \]
                  7. Applied egg-rr84.1%

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), x \cdot \left(x \cdot x\right), x \cdot 2\right)}}{2} \]
                  8. Step-by-step derivation
                    1. associate-*r*N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(x \cdot x\right) \cdot \frac{1}{60}} + \frac{1}{3}, x \cdot \left(x \cdot x\right), x \cdot 2\right)}{2} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{60} + \frac{1}{3}, x \cdot \left(x \cdot x\right), x \cdot 2\right)}{2} \]
                    3. lower-fma.f6484.1

                      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x \cdot x, 0.016666666666666666, 0.3333333333333333\right)}, x \cdot \left(x \cdot x\right), x \cdot 2\right)}{2} \]
                  9. Applied egg-rr84.1%

                    \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(x \cdot x, 0.016666666666666666, 0.3333333333333333\right)}, x \cdot \left(x \cdot x\right), x \cdot 2\right)}{2} \]
                  10. Taylor expanded in x around inf

                    \[\leadsto \frac{\color{blue}{\frac{1}{60} \cdot {x}^{5}}}{2} \]
                  11. Simplified84.1%

                    \[\leadsto \frac{\color{blue}{0.016666666666666666 \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(x \cdot x\right)\right)}}{2} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification86.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5:\\ \;\;\;\;\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.016666666666666666 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{2}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 15: 90.7% accurate, 5.6× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot x\_m, \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/
                   (*
                    x_m
                    (fma
                     (* x_m x_m)
                     (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333)
                     2.0))
                   2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * ((x_m * fma((x_m * x_m), fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333), 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(Float64(x_m * fma(Float64(x_m * x_m), fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333), 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot x\_m, \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{3} + \frac{1}{60} \cdot {x}^{2}, 2\right)}{2} \]
                  5. lower-*.f64N/A

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{60} \cdot x\right)} + \frac{1}{3}, 2\right)}{2} \]
                  10. lower-fma.f64N/A

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{60}}, \frac{1}{3}\right), 2\right)}{2} \]
                  12. lower-*.f6491.9

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.016666666666666666}, 0.3333333333333333\right), 2\right)}{2} \]
                5. Simplified91.9%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}}{2} \]
                6. Add Preprocessing

                Alternative 16: 90.4% accurate, 5.7× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot 0.016666666666666666, x\_m \cdot \left(x\_m \cdot x\_m\right), 2\right)}{2} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m)
                 :precision binary64
                 (*
                  x_s
                  (/ (* x_m (fma (* x_m 0.016666666666666666) (* x_m (* x_m x_m)) 2.0)) 2.0)))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	return x_s * ((x_m * fma((x_m * 0.016666666666666666), (x_m * (x_m * x_m)), 2.0)) / 2.0);
                }
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m)
                	return Float64(x_s * Float64(Float64(x_m * fma(Float64(x_m * 0.016666666666666666), Float64(x_m * Float64(x_m * x_m)), 2.0)) / 2.0))
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(N[(x$95$m * 0.016666666666666666), $MachinePrecision] * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \frac{x\_m \cdot \mathsf{fma}\left(x\_m \cdot 0.016666666666666666, x\_m \cdot \left(x\_m \cdot x\_m\right), 2\right)}{2}
                \end{array}
                
                Derivation
                1. Initial program 53.8%

                  \[\frac{e^{x} - e^{-x}}{2} \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left({x}^{2} \cdot \left(\frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right)\right) + 2\right)}}{2} \]
                  3. lower-fma.f64N/A

                    \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{3} + {x}^{2} \cdot \left(\frac{1}{60} + \frac{1}{2520} \cdot {x}^{2}\right), 2\right)}}{2} \]
                5. Simplified94.1%

                  \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), 0.3333333333333333\right), 2\right)}}{2} \]
                6. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot \frac{1}{2520}\right) + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot \frac{1}{2520}\right)} + \frac{1}{60}\right)\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  3. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)}\right) + \frac{1}{3}\right) + 2\right)}{2} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)} + \frac{1}{3}\right) + 2\right)}{2} \]
                  5. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), \frac{1}{3}\right)} + 2\right)}{2} \]
                  6. lift-fma.f64N/A

                    \[\leadsto \frac{x \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right) + \frac{1}{3}\right)} + 2\right)}{2} \]
                  7. distribute-rgt-inN/A

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left(\left(x \cdot \left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right)\right)\right) \cdot \left(x \cdot x\right) + \left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)\right)}}{2} \]
                7. Applied egg-rr94.1%

                  \[\leadsto \frac{x \cdot \color{blue}{\mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right)\right)}}{2} \]
                8. Taylor expanded in x around 0

                  \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot \frac{1}{2520}, \frac{1}{60}\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
                9. Step-by-step derivation
                  1. Simplified93.8%

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x, x \cdot 0.0003968253968253968, 0.016666666666666666\right), x \cdot \left(x \cdot x\right), \color{blue}{2}\right)}{2} \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \color{blue}{\frac{1}{60}}, x \cdot \left(x \cdot x\right), 2\right)}{2} \]
                  3. Step-by-step derivation
                    1. Simplified91.6%

                      \[\leadsto \frac{x \cdot \mathsf{fma}\left(x \cdot \color{blue}{0.016666666666666666}, x \cdot \left(x \cdot x\right), 2\right)}{2} \]
                    2. Add Preprocessing

                    Alternative 17: 88.2% accurate, 6.2× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 8:\\ \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right), -0.041666666666666664, -x\_m\right) \cdot -0.5\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m)
                     :precision binary64
                     (*
                      x_s
                      (if (<= x_m 8.0)
                        (* (fma x_m (* x_m 0.3333333333333333) 2.0) (* x_m 0.5))
                        (* (fma (* x_m (* x_m (* x_m x_m))) -0.041666666666666664 (- x_m)) -0.5))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m) {
                    	double tmp;
                    	if (x_m <= 8.0) {
                    		tmp = fma(x_m, (x_m * 0.3333333333333333), 2.0) * (x_m * 0.5);
                    	} else {
                    		tmp = fma((x_m * (x_m * (x_m * x_m))), -0.041666666666666664, -x_m) * -0.5;
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m)
                    	tmp = 0.0
                    	if (x_m <= 8.0)
                    		tmp = Float64(fma(x_m, Float64(x_m * 0.3333333333333333), 2.0) * Float64(x_m * 0.5));
                    	else
                    		tmp = Float64(fma(Float64(x_m * Float64(x_m * Float64(x_m * x_m))), -0.041666666666666664, Float64(-x_m)) * -0.5);
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 8.0], N[(N[(x$95$m * N[(x$95$m * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.041666666666666664 + (-x$95$m)), $MachinePrecision] * -0.5), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;x\_m \leq 8:\\
                    \;\;\;\;\mathsf{fma}\left(x\_m, x\_m \cdot 0.3333333333333333, 2\right) \cdot \left(x\_m \cdot 0.5\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right), -0.041666666666666664, -x\_m\right) \cdot -0.5\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < 8

                      1. Initial program 37.7%

                        \[\frac{e^{x} - e^{-x}}{2} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 0

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

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

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

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

                          \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                        5. lower-*.f6487.6

                          \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                      5. Simplified87.6%

                        \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
                      6. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{x \cdot \left(\frac{1}{3} \cdot \color{blue}{\left(x \cdot x\right)} + 2\right)}{2} \]
                        2. lift-fma.f64N/A

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                        5. lower-*.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{3}, x \cdot x, 2\right) \cdot \frac{x}{2}} \]
                        6. lift-fma.f64N/A

                          \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \left(x \cdot x\right) + 2\right)} \cdot \frac{x}{2} \]
                        7. lift-*.f64N/A

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                        12. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{3}}, 2\right) \cdot \frac{x}{2} \]
                        13. div-invN/A

                          \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                        14. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x \cdot \frac{1}{3}, 2\right) \cdot \color{blue}{\left(x \cdot \frac{1}{2}\right)} \]
                        15. metadata-eval87.6

                          \[\leadsto \mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot \color{blue}{0.5}\right) \]
                      7. Applied egg-rr87.6%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x, x \cdot 0.3333333333333333, 2\right) \cdot \left(x \cdot 0.5\right)} \]

                      if 8 < x

                      1. Initial program 100.0%

                        \[\frac{e^{x} - e^{-x}}{2} \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 0

                        \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                      4. Step-by-step derivation
                        1. Simplified100.0%

                          \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                        2. Taylor expanded in x around 0

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

                            \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + 1\right)}}{2} \]
                          2. distribute-lft-inN/A

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

                            \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right)} + x \cdot 1}{2} \]
                          4. unpow2N/A

                            \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + x \cdot 1}{2} \]
                          5. *-rgt-identityN/A

                            \[\leadsto \frac{{x}^{2} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + \color{blue}{x}}{2} \]
                          6. lower-fma.f64N/A

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

                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                          8. lower-*.f64N/A

                            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                          9. +-commutativeN/A

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right) + \frac{1}{2}}, x\right)}{2} \]
                          10. lower-fma.f64N/A

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{6} + \frac{1}{24} \cdot x, \frac{1}{2}\right)}, x\right)}{2} \]
                          11. +-commutativeN/A

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{24} \cdot x + \frac{1}{6}}, \frac{1}{2}\right), x\right)}{2} \]
                          12. *-commutativeN/A

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}} + \frac{1}{6}, \frac{1}{2}\right), x\right)}{2} \]
                          13. lower-fma.f6479.9

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right)}, 0.5\right), x\right)}{2} \]
                        4. Simplified79.9%

                          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right), 0.5\right), x\right)}}{2} \]
                        5. Taylor expanded in x around inf

                          \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{24} \cdot {x}^{2}}, x\right)}{2} \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \frac{1}{24}}, x\right)}{2} \]
                          2. lower-*.f64N/A

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

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}, x\right)}{2} \]
                          4. lower-*.f6479.9

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot 0.041666666666666664, x\right)}{2} \]
                        7. Simplified79.9%

                          \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right) \cdot 0.041666666666666664}, x\right)}{2} \]
                        8. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \frac{\color{blue}{\left(x \cdot x\right)} \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{24}\right) + x}{2} \]
                          2. lift-*.f64N/A

                            \[\leadsto \frac{\left(x \cdot x\right) \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}\right) + x}{2} \]
                          3. lift-*.f64N/A

                            \[\leadsto \frac{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot \frac{1}{24}\right)} + x}{2} \]
                          4. lift-fma.f64N/A

                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot \frac{1}{24}, x\right)}}{2} \]
                          5. frac-2negN/A

                            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot \frac{1}{24}, x\right)\right)}{\mathsf{neg}\left(2\right)}} \]
                          6. div-invN/A

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot \frac{1}{24}, x\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(2\right)}} \]
                          7. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot \frac{1}{24}, x\right)\right)\right) \cdot \frac{1}{\mathsf{neg}\left(2\right)}} \]
                        9. Applied egg-rr79.9%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right), -0.041666666666666664, -x\right) \cdot -0.5} \]
                      5. Recombined 2 regimes into one program.
                      6. Add Preprocessing

                      Alternative 18: 88.2% accurate, 7.7× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 8:\\ \;\;\;\;\mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332, 0.5\right)\\ \end{array} \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m)
                       :precision binary64
                       (*
                        x_s
                        (if (<= x_m 8.0)
                          (fma x_m (* (* x_m x_m) 0.16666666666666666) x_m)
                          (* x_m (fma x_m (* (* x_m x_m) 0.020833333333333332) 0.5)))))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m) {
                      	double tmp;
                      	if (x_m <= 8.0) {
                      		tmp = fma(x_m, ((x_m * x_m) * 0.16666666666666666), x_m);
                      	} else {
                      		tmp = x_m * fma(x_m, ((x_m * x_m) * 0.020833333333333332), 0.5);
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m)
                      	tmp = 0.0
                      	if (x_m <= 8.0)
                      		tmp = fma(x_m, Float64(Float64(x_m * x_m) * 0.16666666666666666), x_m);
                      	else
                      		tmp = Float64(x_m * fma(x_m, Float64(Float64(x_m * x_m) * 0.020833333333333332), 0.5));
                      	end
                      	return Float64(x_s * tmp)
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 8.0], N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + x$95$m), $MachinePrecision], N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.020833333333333332), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \begin{array}{l}
                      \mathbf{if}\;x\_m \leq 8:\\
                      \;\;\;\;\mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332, 0.5\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < 8

                        1. Initial program 37.7%

                          \[\frac{e^{x} - e^{-x}}{2} \]
                        2. Add Preprocessing
                        3. Taylor expanded in x around 0

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

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

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

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

                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                          5. lower-*.f6487.6

                            \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                        5. Simplified87.6%

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

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

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

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

                            \[\leadsto x \cdot \left(\color{blue}{\left(\frac{1}{6} \cdot x\right) \cdot x} + 1\right) \]
                          4. distribute-lft-inN/A

                            \[\leadsto \color{blue}{x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + x \cdot 1} \]
                          5. *-rgt-identityN/A

                            \[\leadsto x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + \color{blue}{x} \]
                          6. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\frac{1}{6} \cdot x\right) \cdot x, x\right)} \]
                          7. associate-*r*N/A

                            \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot \left(x \cdot x\right)}, x\right) \]
                          8. unpow2N/A

                            \[\leadsto \mathsf{fma}\left(x, \frac{1}{6} \cdot \color{blue}{{x}^{2}}, x\right) \]
                          9. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{6}}, x\right) \]
                          10. lower-*.f64N/A

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

                            \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{6}, x\right) \]
                          12. lower-*.f6487.6

                            \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot 0.16666666666666666, x\right) \]
                        8. Simplified87.6%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot 0.16666666666666666, x\right)} \]

                        if 8 < x

                        1. Initial program 100.0%

                          \[\frac{e^{x} - e^{-x}}{2} \]
                        2. Add Preprocessing
                        3. Taylor expanded in x around 0

                          \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                        4. Step-by-step derivation
                          1. Simplified100.0%

                            \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                          2. Taylor expanded in x around 0

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

                              \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + 1\right)}}{2} \]
                            2. distribute-lft-inN/A

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

                              \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right)} + x \cdot 1}{2} \]
                            4. unpow2N/A

                              \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + x \cdot 1}{2} \]
                            5. *-rgt-identityN/A

                              \[\leadsto \frac{{x}^{2} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + \color{blue}{x}}{2} \]
                            6. lower-fma.f64N/A

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

                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                            8. lower-*.f64N/A

                              \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                            9. +-commutativeN/A

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right) + \frac{1}{2}}, x\right)}{2} \]
                            10. lower-fma.f64N/A

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{6} + \frac{1}{24} \cdot x, \frac{1}{2}\right)}, x\right)}{2} \]
                            11. +-commutativeN/A

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{24} \cdot x + \frac{1}{6}}, \frac{1}{2}\right), x\right)}{2} \]
                            12. *-commutativeN/A

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}} + \frac{1}{6}, \frac{1}{2}\right), x\right)}{2} \]
                            13. lower-fma.f6479.9

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right)}, 0.5\right), x\right)}{2} \]
                          4. Simplified79.9%

                            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right), 0.5\right), x\right)}}{2} \]
                          5. Taylor expanded in x around inf

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{24} \cdot {x}^{2}}, x\right)}{2} \]
                          6. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \frac{1}{24}}, x\right)}{2} \]
                            2. lower-*.f64N/A

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

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}, x\right)}{2} \]
                            4. lower-*.f6479.9

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot 0.041666666666666664, x\right)}{2} \]
                          7. Simplified79.9%

                            \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right) \cdot 0.041666666666666664}, x\right)}{2} \]
                          8. Taylor expanded in x around 0

                            \[\leadsto \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{48} \cdot {x}^{3}\right)} \]
                          9. Step-by-step derivation
                            1. lower-*.f64N/A

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

                              \[\leadsto x \cdot \color{blue}{\left(\frac{1}{48} \cdot {x}^{3} + \frac{1}{2}\right)} \]
                            3. unpow3N/A

                              \[\leadsto x \cdot \left(\frac{1}{48} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)} + \frac{1}{2}\right) \]
                            4. unpow2N/A

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

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

                              \[\leadsto x \cdot \left(\color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)} + \frac{1}{2}\right) \]
                            7. lower-fma.f64N/A

                              \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(x, \frac{1}{48} \cdot {x}^{2}, \frac{1}{2}\right)} \]
                            8. *-commutativeN/A

                              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{48}}, \frac{1}{2}\right) \]
                            9. lower-*.f64N/A

                              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{48}}, \frac{1}{2}\right) \]
                            10. unpow2N/A

                              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{48}, \frac{1}{2}\right) \]
                            11. lower-*.f6479.9

                              \[\leadsto x \cdot \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot 0.020833333333333332, 0.5\right) \]
                          10. Simplified79.9%

                            \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot 0.020833333333333332, 0.5\right)} \]
                        5. Recombined 2 regimes into one program.
                        6. Add Preprocessing

                        Alternative 19: 88.2% accurate, 8.0× speedup?

                        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 8.5:\\ \;\;\;\;\mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332\right)\right)\\ \end{array} \end{array} \]
                        x\_m = (fabs.f64 x)
                        x\_s = (copysign.f64 #s(literal 1 binary64) x)
                        (FPCore (x_s x_m)
                         :precision binary64
                         (*
                          x_s
                          (if (<= x_m 8.5)
                            (fma x_m (* (* x_m x_m) 0.16666666666666666) x_m)
                            (* x_m (* x_m (* (* x_m x_m) 0.020833333333333332))))))
                        x\_m = fabs(x);
                        x\_s = copysign(1.0, x);
                        double code(double x_s, double x_m) {
                        	double tmp;
                        	if (x_m <= 8.5) {
                        		tmp = fma(x_m, ((x_m * x_m) * 0.16666666666666666), x_m);
                        	} else {
                        		tmp = x_m * (x_m * ((x_m * x_m) * 0.020833333333333332));
                        	}
                        	return x_s * tmp;
                        }
                        
                        x\_m = abs(x)
                        x\_s = copysign(1.0, x)
                        function code(x_s, x_m)
                        	tmp = 0.0
                        	if (x_m <= 8.5)
                        		tmp = fma(x_m, Float64(Float64(x_m * x_m) * 0.16666666666666666), x_m);
                        	else
                        		tmp = Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.020833333333333332)));
                        	end
                        	return Float64(x_s * tmp)
                        end
                        
                        x\_m = N[Abs[x], $MachinePrecision]
                        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                        code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 8.5], N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + x$95$m), $MachinePrecision], N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.020833333333333332), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                        
                        \begin{array}{l}
                        x\_m = \left|x\right|
                        \\
                        x\_s = \mathsf{copysign}\left(1, x\right)
                        
                        \\
                        x\_s \cdot \begin{array}{l}
                        \mathbf{if}\;x\_m \leq 8.5:\\
                        \;\;\;\;\mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.020833333333333332\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < 8.5

                          1. Initial program 37.7%

                            \[\frac{e^{x} - e^{-x}}{2} \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

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

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

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

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

                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                            5. lower-*.f6487.6

                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                          5. Simplified87.6%

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

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

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

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

                              \[\leadsto x \cdot \left(\color{blue}{\left(\frac{1}{6} \cdot x\right) \cdot x} + 1\right) \]
                            4. distribute-lft-inN/A

                              \[\leadsto \color{blue}{x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + x \cdot 1} \]
                            5. *-rgt-identityN/A

                              \[\leadsto x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + \color{blue}{x} \]
                            6. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\frac{1}{6} \cdot x\right) \cdot x, x\right)} \]
                            7. associate-*r*N/A

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot \left(x \cdot x\right)}, x\right) \]
                            8. unpow2N/A

                              \[\leadsto \mathsf{fma}\left(x, \frac{1}{6} \cdot \color{blue}{{x}^{2}}, x\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{6}}, x\right) \]
                            10. lower-*.f64N/A

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

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{6}, x\right) \]
                            12. lower-*.f6487.6

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot 0.16666666666666666, x\right) \]
                          8. Simplified87.6%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot 0.16666666666666666, x\right)} \]

                          if 8.5 < x

                          1. Initial program 100.0%

                            \[\frac{e^{x} - e^{-x}}{2} \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

                            \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                          4. Step-by-step derivation
                            1. Simplified100.0%

                              \[\leadsto \frac{e^{x} - \color{blue}{1}}{2} \]
                            2. Taylor expanded in x around 0

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

                                \[\leadsto \frac{x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + 1\right)}}{2} \]
                              2. distribute-lft-inN/A

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

                                \[\leadsto \frac{\color{blue}{\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right)} + x \cdot 1}{2} \]
                              4. unpow2N/A

                                \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + x \cdot 1}{2} \]
                              5. *-rgt-identityN/A

                                \[\leadsto \frac{{x}^{2} \cdot \left(\frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right)\right) + \color{blue}{x}}{2} \]
                              6. lower-fma.f64N/A

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

                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                              8. lower-*.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right), x\right)}{2} \]
                              9. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(\frac{1}{6} + \frac{1}{24} \cdot x\right) + \frac{1}{2}}, x\right)}{2} \]
                              10. lower-fma.f64N/A

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, \frac{1}{6} + \frac{1}{24} \cdot x, \frac{1}{2}\right)}, x\right)}{2} \]
                              11. +-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{24} \cdot x + \frac{1}{6}}, \frac{1}{2}\right), x\right)}{2} \]
                              12. *-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}} + \frac{1}{6}, \frac{1}{2}\right), x\right)}{2} \]
                              13. lower-fma.f6479.9

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right)}, 0.5\right), x\right)}{2} \]
                            4. Simplified79.9%

                              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0.16666666666666666\right), 0.5\right), x\right)}}{2} \]
                            5. Taylor expanded in x around inf

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{24} \cdot {x}^{2}}, x\right)}{2} \]
                            6. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \frac{1}{24}}, x\right)}{2} \]
                              2. lower-*.f64N/A

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

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24}, x\right)}{2} \]
                              4. lower-*.f6479.9

                                \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot 0.041666666666666664, x\right)}{2} \]
                            7. Simplified79.9%

                              \[\leadsto \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right) \cdot 0.041666666666666664}, x\right)}{2} \]
                            8. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{\frac{1}{48} \cdot {x}^{4}} \]
                            9. Step-by-step derivation
                              1. metadata-evalN/A

                                \[\leadsto \frac{1}{48} \cdot {x}^{\color{blue}{\left(3 + 1\right)}} \]
                              2. pow-plusN/A

                                \[\leadsto \frac{1}{48} \cdot \color{blue}{\left({x}^{3} \cdot x\right)} \]
                              3. associate-*l*N/A

                                \[\leadsto \color{blue}{\left(\frac{1}{48} \cdot {x}^{3}\right) \cdot x} \]
                              4. *-commutativeN/A

                                \[\leadsto \color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{3}\right)} \]
                              5. lower-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot \left(\frac{1}{48} \cdot {x}^{3}\right)} \]
                              6. unpow3N/A

                                \[\leadsto x \cdot \left(\frac{1}{48} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)}\right) \]
                              7. unpow2N/A

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

                                \[\leadsto x \cdot \color{blue}{\left(\left(\frac{1}{48} \cdot {x}^{2}\right) \cdot x\right)} \]
                              9. *-commutativeN/A

                                \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)\right)} \]
                              10. lower-*.f64N/A

                                \[\leadsto x \cdot \color{blue}{\left(x \cdot \left(\frac{1}{48} \cdot {x}^{2}\right)\right)} \]
                              11. *-commutativeN/A

                                \[\leadsto x \cdot \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{48}\right)}\right) \]
                              12. lower-*.f64N/A

                                \[\leadsto x \cdot \left(x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{48}\right)}\right) \]
                              13. unpow2N/A

                                \[\leadsto x \cdot \left(x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{48}\right)\right) \]
                              14. lower-*.f6479.9

                                \[\leadsto x \cdot \left(x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot 0.020833333333333332\right)\right) \]
                            10. Simplified79.9%

                              \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.020833333333333332\right)\right)} \]
                          5. Recombined 2 regimes into one program.
                          6. Add Preprocessing

                          Alternative 20: 84.1% accurate, 9.9× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 2.4:\\ \;\;\;\;x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666\right)\\ \end{array} \end{array} \]
                          x\_m = (fabs.f64 x)
                          x\_s = (copysign.f64 #s(literal 1 binary64) x)
                          (FPCore (x_s x_m)
                           :precision binary64
                           (* x_s (if (<= x_m 2.4) x_m (* x_m (* (* x_m x_m) 0.16666666666666666)))))
                          x\_m = fabs(x);
                          x\_s = copysign(1.0, x);
                          double code(double x_s, double x_m) {
                          	double tmp;
                          	if (x_m <= 2.4) {
                          		tmp = x_m;
                          	} else {
                          		tmp = x_m * ((x_m * x_m) * 0.16666666666666666);
                          	}
                          	return x_s * tmp;
                          }
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0d0, x)
                          real(8) function code(x_s, x_m)
                              real(8), intent (in) :: x_s
                              real(8), intent (in) :: x_m
                              real(8) :: tmp
                              if (x_m <= 2.4d0) then
                                  tmp = x_m
                              else
                                  tmp = x_m * ((x_m * x_m) * 0.16666666666666666d0)
                              end if
                              code = x_s * tmp
                          end function
                          
                          x\_m = Math.abs(x);
                          x\_s = Math.copySign(1.0, x);
                          public static double code(double x_s, double x_m) {
                          	double tmp;
                          	if (x_m <= 2.4) {
                          		tmp = x_m;
                          	} else {
                          		tmp = x_m * ((x_m * x_m) * 0.16666666666666666);
                          	}
                          	return x_s * tmp;
                          }
                          
                          x\_m = math.fabs(x)
                          x\_s = math.copysign(1.0, x)
                          def code(x_s, x_m):
                          	tmp = 0
                          	if x_m <= 2.4:
                          		tmp = x_m
                          	else:
                          		tmp = x_m * ((x_m * x_m) * 0.16666666666666666)
                          	return x_s * tmp
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0, x)
                          function code(x_s, x_m)
                          	tmp = 0.0
                          	if (x_m <= 2.4)
                          		tmp = x_m;
                          	else
                          		tmp = Float64(x_m * Float64(Float64(x_m * x_m) * 0.16666666666666666));
                          	end
                          	return Float64(x_s * tmp)
                          end
                          
                          x\_m = abs(x);
                          x\_s = sign(x) * abs(1.0);
                          function tmp_2 = code(x_s, x_m)
                          	tmp = 0.0;
                          	if (x_m <= 2.4)
                          		tmp = x_m;
                          	else
                          		tmp = x_m * ((x_m * x_m) * 0.16666666666666666);
                          	end
                          	tmp_2 = x_s * tmp;
                          end
                          
                          x\_m = N[Abs[x], $MachinePrecision]
                          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                          code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 2.4], x$95$m, N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                          
                          \begin{array}{l}
                          x\_m = \left|x\right|
                          \\
                          x\_s = \mathsf{copysign}\left(1, x\right)
                          
                          \\
                          x\_s \cdot \begin{array}{l}
                          \mathbf{if}\;x\_m \leq 2.4:\\
                          \;\;\;\;x\_m\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < 2.39999999999999991

                            1. Initial program 37.7%

                              \[\frac{e^{x} - e^{-x}}{2} \]
                            2. Add Preprocessing
                            3. Taylor expanded in x around 0

                              \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                            4. Step-by-step derivation
                              1. lower-*.f6468.6

                                \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                            5. Simplified68.6%

                              \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                            6. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \frac{\color{blue}{x \cdot 2}}{2} \]
                              2. associate-/l*N/A

                                \[\leadsto \color{blue}{x \cdot \frac{2}{2}} \]
                              3. metadata-evalN/A

                                \[\leadsto x \cdot \color{blue}{1} \]
                              4. lower-*.f6468.6

                                \[\leadsto \color{blue}{x \cdot 1} \]
                            7. Applied egg-rr68.6%

                              \[\leadsto \color{blue}{x \cdot 1} \]
                            8. Step-by-step derivation
                              1. *-rgt-identity68.6

                                \[\leadsto \color{blue}{x} \]
                            9. Applied egg-rr68.6%

                              \[\leadsto \color{blue}{x} \]

                            if 2.39999999999999991 < x

                            1. Initial program 100.0%

                              \[\frac{e^{x} - e^{-x}}{2} \]
                            2. Add Preprocessing
                            3. Taylor expanded in x around 0

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

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

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

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

                                \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                              5. lower-*.f6471.4

                                \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                            5. Simplified71.4%

                              \[\leadsto \frac{\color{blue}{x \cdot \mathsf{fma}\left(0.3333333333333333, x \cdot x, 2\right)}}{2} \]
                            6. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{\frac{1}{6} \cdot {x}^{3}} \]
                            7. Step-by-step derivation
                              1. cube-multN/A

                                \[\leadsto \frac{1}{6} \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \]
                              2. unpow2N/A

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

                                \[\leadsto \color{blue}{\left(\frac{1}{6} \cdot x\right) \cdot {x}^{2}} \]
                              4. unpow2N/A

                                \[\leadsto \left(\frac{1}{6} \cdot x\right) \cdot \color{blue}{\left(x \cdot x\right)} \]
                              5. associate-*r*N/A

                                \[\leadsto \color{blue}{\left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) \cdot x} \]
                              6. *-commutativeN/A

                                \[\leadsto \color{blue}{x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right)} \]
                              7. lower-*.f64N/A

                                \[\leadsto \color{blue}{x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right)} \]
                              8. associate-*r*N/A

                                \[\leadsto x \cdot \color{blue}{\left(\frac{1}{6} \cdot \left(x \cdot x\right)\right)} \]
                              9. unpow2N/A

                                \[\leadsto x \cdot \left(\frac{1}{6} \cdot \color{blue}{{x}^{2}}\right) \]
                              10. *-commutativeN/A

                                \[\leadsto x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{6}\right)} \]
                              11. lower-*.f64N/A

                                \[\leadsto x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{6}\right)} \]
                              12. unpow2N/A

                                \[\leadsto x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{6}\right) \]
                              13. lower-*.f6471.4

                                \[\leadsto x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot 0.16666666666666666\right) \]
                            8. Simplified71.4%

                              \[\leadsto \color{blue}{x \cdot \left(\left(x \cdot x\right) \cdot 0.16666666666666666\right)} \]
                          3. Recombined 2 regimes into one program.
                          4. Add Preprocessing

                          Alternative 21: 84.3% accurate, 12.8× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right) \end{array} \]
                          x\_m = (fabs.f64 x)
                          x\_s = (copysign.f64 #s(literal 1 binary64) x)
                          (FPCore (x_s x_m)
                           :precision binary64
                           (* x_s (fma x_m (* (* x_m x_m) 0.16666666666666666) x_m)))
                          x\_m = fabs(x);
                          x\_s = copysign(1.0, x);
                          double code(double x_s, double x_m) {
                          	return x_s * fma(x_m, ((x_m * x_m) * 0.16666666666666666), x_m);
                          }
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0, x)
                          function code(x_s, x_m)
                          	return Float64(x_s * fma(x_m, Float64(Float64(x_m * x_m) * 0.16666666666666666), x_m))
                          end
                          
                          x\_m = N[Abs[x], $MachinePrecision]
                          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                          code[x$95$s_, x$95$m_] := N[(x$95$s * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + x$95$m), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          x\_m = \left|x\right|
                          \\
                          x\_s = \mathsf{copysign}\left(1, x\right)
                          
                          \\
                          x\_s \cdot \mathsf{fma}\left(x\_m, \left(x\_m \cdot x\_m\right) \cdot 0.16666666666666666, x\_m\right)
                          \end{array}
                          
                          Derivation
                          1. Initial program 53.8%

                            \[\frac{e^{x} - e^{-x}}{2} \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

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

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

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

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

                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(\frac{1}{3}, \color{blue}{x \cdot x}, 2\right)}{2} \]
                            5. lower-*.f6483.4

                              \[\leadsto \frac{x \cdot \mathsf{fma}\left(0.3333333333333333, \color{blue}{x \cdot x}, 2\right)}{2} \]
                          5. Simplified83.4%

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

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

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

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

                              \[\leadsto x \cdot \left(\color{blue}{\left(\frac{1}{6} \cdot x\right) \cdot x} + 1\right) \]
                            4. distribute-lft-inN/A

                              \[\leadsto \color{blue}{x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + x \cdot 1} \]
                            5. *-rgt-identityN/A

                              \[\leadsto x \cdot \left(\left(\frac{1}{6} \cdot x\right) \cdot x\right) + \color{blue}{x} \]
                            6. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(\frac{1}{6} \cdot x\right) \cdot x, x\right)} \]
                            7. associate-*r*N/A

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{1}{6} \cdot \left(x \cdot x\right)}, x\right) \]
                            8. unpow2N/A

                              \[\leadsto \mathsf{fma}\left(x, \frac{1}{6} \cdot \color{blue}{{x}^{2}}, x\right) \]
                            9. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{{x}^{2} \cdot \frac{1}{6}}, x\right) \]
                            10. lower-*.f64N/A

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

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{6}, x\right) \]
                            12. lower-*.f6483.4

                              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\left(x \cdot x\right)} \cdot 0.16666666666666666, x\right) \]
                          8. Simplified83.4%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot 0.16666666666666666, x\right)} \]
                          9. Add Preprocessing

                          Alternative 22: 51.6% accurate, 217.0× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot x\_m \end{array} \]
                          x\_m = (fabs.f64 x)
                          x\_s = (copysign.f64 #s(literal 1 binary64) x)
                          (FPCore (x_s x_m) :precision binary64 (* x_s x_m))
                          x\_m = fabs(x);
                          x\_s = copysign(1.0, x);
                          double code(double x_s, double x_m) {
                          	return x_s * x_m;
                          }
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0d0, x)
                          real(8) function code(x_s, x_m)
                              real(8), intent (in) :: x_s
                              real(8), intent (in) :: x_m
                              code = x_s * x_m
                          end function
                          
                          x\_m = Math.abs(x);
                          x\_s = Math.copySign(1.0, x);
                          public static double code(double x_s, double x_m) {
                          	return x_s * x_m;
                          }
                          
                          x\_m = math.fabs(x)
                          x\_s = math.copysign(1.0, x)
                          def code(x_s, x_m):
                          	return x_s * x_m
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0, x)
                          function code(x_s, x_m)
                          	return Float64(x_s * x_m)
                          end
                          
                          x\_m = abs(x);
                          x\_s = sign(x) * abs(1.0);
                          function tmp = code(x_s, x_m)
                          	tmp = x_s * x_m;
                          end
                          
                          x\_m = N[Abs[x], $MachinePrecision]
                          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                          code[x$95$s_, x$95$m_] := N[(x$95$s * x$95$m), $MachinePrecision]
                          
                          \begin{array}{l}
                          x\_m = \left|x\right|
                          \\
                          x\_s = \mathsf{copysign}\left(1, x\right)
                          
                          \\
                          x\_s \cdot x\_m
                          \end{array}
                          
                          Derivation
                          1. Initial program 53.8%

                            \[\frac{e^{x} - e^{-x}}{2} \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

                            \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                          4. Step-by-step derivation
                            1. lower-*.f6452.3

                              \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                          5. Simplified52.3%

                            \[\leadsto \frac{\color{blue}{2 \cdot x}}{2} \]
                          6. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \frac{\color{blue}{x \cdot 2}}{2} \]
                            2. associate-/l*N/A

                              \[\leadsto \color{blue}{x \cdot \frac{2}{2}} \]
                            3. metadata-evalN/A

                              \[\leadsto x \cdot \color{blue}{1} \]
                            4. lower-*.f6452.3

                              \[\leadsto \color{blue}{x \cdot 1} \]
                          7. Applied egg-rr52.3%

                            \[\leadsto \color{blue}{x \cdot 1} \]
                          8. Step-by-step derivation
                            1. *-rgt-identity52.3

                              \[\leadsto \color{blue}{x} \]
                          9. Applied egg-rr52.3%

                            \[\leadsto \color{blue}{x} \]
                          10. Add Preprocessing

                          Reproduce

                          ?
                          herbie shell --seed 2024215 
                          (FPCore (x)
                            :name "Hyperbolic sine"
                            :precision binary64
                            (/ (- (exp x) (exp (- x))) 2.0))