Hyperbolic sine

Percentage Accurate: 54.7% → 99.5%
Time: 12.9s
Alternatives: 19
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 19 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{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \mathsf{expm1}\left(x\_m\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
      (fma
       x_m
       (* x_m (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333))
       2.0))
     2.0)
    (* 0.5 (expm1 x_m)))))
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 * fma(x_m, (x_m * fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333)), 2.0)) / 2.0;
	} else {
		tmp = 0.5 * expm1(x_m);
	}
	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(Float64(x_m * fma(x_m, Float64(x_m * fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333)), 2.0)) / 2.0);
	else
		tmp = Float64(0.5 * expm1(x_m));
	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 * N[(x$95$m * N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(0.5 * N[(Exp[x$95$m] - 1), $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:\\
\;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{expm1}\left(x\_m\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 + {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. Simplified97.0%

      \[\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-*.f6497.0

        \[\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. Simplified97.0%

      \[\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. Taylor expanded in x around 0

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

        \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \color{blue}{0.016666666666666666}, 0.3333333333333333\right), 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. Taylor expanded in x around inf

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

            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{x} - 1\right)} \]
          2. lower-expm1.f64100.0

            \[\leadsto 0.5 \cdot \color{blue}{\mathsf{expm1}\left(x\right)} \]
        4. Simplified100.0%

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

      Alternative 2: 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:\\ \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot 0.020833333333333332\\ \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 (fma 0.3333333333333333 (* x_m x_m) 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 tmp;
      	if ((exp(x_m) - exp(-x_m)) <= 0.002) {
      		tmp = (x_m * fma(0.3333333333333333, (x_m * x_m), 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)
      	tmp = 0.0
      	if (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
      		tmp = Float64(Float64(x_m * fma(0.3333333333333333, Float64(x_m * x_m), 2.0)) / 2.0);
      	else
      		tmp = Float64(Float64(x_m * Float64(x_m * 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[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(N[(x$95$m * N[(0.3333333333333333 * N[(x$95$m * x$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.020833333333333332), $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{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot 0.020833333333333332\\
      
      
      \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} \]

        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. Taylor expanded in x around inf

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

              \[\leadsto \color{blue}{{x}^{4} \cdot \frac{1}{48}} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{{x}^{4} \cdot \frac{1}{48}} \]
            3. metadata-evalN/A

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

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

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

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

              \[\leadsto \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) \cdot \frac{1}{48} \]
            8. cube-multN/A

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

              \[\leadsto \color{blue}{\left(x \cdot {x}^{3}\right)} \cdot \frac{1}{48} \]
            10. cube-multN/A

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

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

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

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

              \[\leadsto \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) \cdot 0.020833333333333332 \]
          7. Simplified79.9%

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

        Alternative 3: 44.4% 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 \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\\ \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 (<= (- (exp x_m) (exp (- x_m))) 0.002)
            (* x_m (fma x_m 0.25 0.5))
            (* 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 ((exp(x_m) - exp(-x_m)) <= 0.002) {
        		tmp = x_m * fma(x_m, 0.25, 0.5);
        	} 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 (Float64(exp(x_m) - exp(Float64(-x_m))) <= 0.002)
        		tmp = Float64(x_m * fma(x_m, 0.25, 0.5));
        	else
        		tmp = Float64(x_m * Float64(Float64(x_m * x_m) * 0.16666666666666666));
        	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[(x$95$m * N[(x$95$m * 0.25 + 0.5), $MachinePrecision]), $MachinePrecision], 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}\;e^{x\_m} - e^{-x\_m} \leq 0.002:\\
        \;\;\;\;x\_m \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\\
        
        \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 (-.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{e^{x} - \color{blue}{1}}{2} \]
          4. Step-by-step derivation
            1. Simplified5.1%

              \[\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.f6412.7

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

              \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, 0.25, 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{\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)} \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 4: 36.4% 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 \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(x\_m \cdot 0.25\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 0.5)
              (* x_m (* x_m 0.25)))))
          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 * 0.5;
          	} else {
          		tmp = x_m * (x_m * 0.25);
          	}
          	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 ((exp(x_m) - exp(-x_m)) <= 0.002d0) then
                  tmp = x_m * 0.5d0
              else
                  tmp = x_m * (x_m * 0.25d0)
              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 ((Math.exp(x_m) - Math.exp(-x_m)) <= 0.002) {
          		tmp = x_m * 0.5;
          	} else {
          		tmp = x_m * (x_m * 0.25);
          	}
          	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 (math.exp(x_m) - math.exp(-x_m)) <= 0.002:
          		tmp = x_m * 0.5
          	else:
          		tmp = x_m * (x_m * 0.25)
          	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(x_m * 0.5);
          	else
          		tmp = Float64(x_m * Float64(x_m * 0.25));
          	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 ((exp(x_m) - exp(-x_m)) <= 0.002)
          		tmp = x_m * 0.5;
          	else
          		tmp = x_m * (x_m * 0.25);
          	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[N[(N[Exp[x$95$m], $MachinePrecision] - N[Exp[(-x$95$m)], $MachinePrecision]), $MachinePrecision], 0.002], N[(x$95$m * 0.5), $MachinePrecision], N[(x$95$m * N[(x$95$m * 0.25), $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 \cdot 0.5\\
          
          \mathbf{else}:\\
          \;\;\;\;x\_m \cdot \left(x\_m \cdot 0.25\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{e^{x} - \color{blue}{1}}{2} \]
            4. Step-by-step derivation
              1. Simplified5.1%

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

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

                  \[\leadsto \color{blue}{x \cdot \frac{1}{2}} \]
                2. lower-*.f6414.3

                  \[\leadsto \color{blue}{x \cdot 0.5} \]
              4. Simplified14.3%

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

              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. Taylor expanded in x around inf

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

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

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

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

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

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

                    \[\leadsto x \cdot \color{blue}{\left(x \cdot 0.25\right)} \]
                7. Simplified47.1%

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

              Alternative 5: 92.9% accurate, 4.1× 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 7.6:\\ \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot \left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\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 7.6)
                  (/
                   (*
                    x_m
                    (fma
                     x_m
                     (* x_m (fma x_m (* x_m 0.016666666666666666) 0.3333333333333333))
                     2.0))
                   2.0)
                  (/
                   (*
                    x_m
                    (* 0.0003968253968253968 (* x_m (* 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 <= 7.6) {
              		tmp = (x_m * fma(x_m, (x_m * fma(x_m, (x_m * 0.016666666666666666), 0.3333333333333333)), 2.0)) / 2.0;
              	} else {
              		tmp = (x_m * (0.0003968253968253968 * (x_m * (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 <= 7.6)
              		tmp = Float64(Float64(x_m * fma(x_m, Float64(x_m * fma(x_m, Float64(x_m * 0.016666666666666666), 0.3333333333333333)), 2.0)) / 2.0);
              	else
              		tmp = Float64(Float64(x_m * Float64(0.0003968253968253968 * Float64(x_m * Float64(x_m * Float64(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, 7.6], N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * 0.016666666666666666), $MachinePrecision] + 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x$95$m * N[(0.0003968253968253968 * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 7.6:\\
              \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot \mathsf{fma}\left(x\_m, x\_m \cdot 0.016666666666666666, 0.3333333333333333\right), 2\right)}{2}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x\_m \cdot \left(0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)\right)\right)}{2}\\
              
              
              \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} + {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. Simplified97.0%

                  \[\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-*.f6497.0

                    \[\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. Simplified97.0%

                  \[\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. Taylor expanded in x around 0

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot \color{blue}{0.016666666666666666}, 0.3333333333333333\right), 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. 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-*.f6485.8

                      \[\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. Simplified85.8%

                    \[\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. Taylor expanded in x around inf

                    \[\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}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/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}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                    2. unpow2N/A

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

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

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

                    \[\leadsto \frac{\color{blue}{\frac{1}{2520} \cdot {x}^{7}}}{2} \]
                  13. Step-by-step derivation
                    1. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 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 7: 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, x\_m \cdot \mathsf{fma}\left(x\_m, 0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\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
                       (* 0.0003968253968253968 (* x_m (* x_m x_m)))
                       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, (0.0003968253968253968 * (x_m * (x_m * x_m))), 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(0.0003968253968253968 * Float64(x_m * Float64(x_m * x_m))), 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[(0.0003968253968253968 * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $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, 0.0003968253968253968 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\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. Taylor expanded in x around inf

                  \[\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}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                10. Step-by-step derivation
                  1. lower-*.f64N/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}\right)}, \frac{1}{3}\right), 2\right)}{2} \]
                  2. unpow2N/A

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

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

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

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

                    \[\leadsto \frac{x \cdot \mathsf{fma}\left(x, x \cdot \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, x \cdot \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, x \cdot \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, x \cdot \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, x \cdot \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, x \cdot \mathsf{fma}\left(x, 0.0003968253968253968 \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right), 0.3333333333333333\right), 2\right)}{2} \]
                14. Simplified94.1%

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

                Alternative 8: 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(x\_m, 0.0003968253968253968 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\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.0003968253968253968 (* (* 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(x_m, (0.0003968253968253968 * ((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(x_m, Float64(0.0003968253968253968 * Float64(Float64(x_m * x_m) * 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[(x$95$m * N[(0.0003968253968253968 * 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] / 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, 0.0003968253968253968 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\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. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 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:\\ \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\ \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)
                    (/ (* x_m (fma 0.3333333333333333 (* x_m x_m) 2.0)) 2.0)
                    (/
                     (*
                      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 = (x_m * fma(0.3333333333333333, (x_m * x_m), 2.0)) / 2.0;
                	} 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(Float64(x_m * fma(0.3333333333333333, Float64(x_m * x_m), 2.0)) / 2.0);
                	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[(0.3333333333333333 * N[(x$95$m * x$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $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:\\
                \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\
                
                \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} \]

                  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 10: 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:\\ \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\ \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)
                    (/ (* x_m (fma 0.3333333333333333 (* x_m x_m) 2.0)) 2.0)
                    (/ (* 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 = (x_m * fma(0.3333333333333333, (x_m * x_m), 2.0)) / 2.0;
                	} 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(Float64(x_m * fma(0.3333333333333333, Float64(x_m * x_m), 2.0)) / 2.0);
                	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[(0.3333333333333333 * N[(x$95$m * x$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $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:\\
                \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\
                
                \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} \]

                  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. 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} \]
                  9. Taylor expanded in x around inf

                    \[\leadsto \frac{\color{blue}{\frac{1}{60} \cdot {x}^{5}}}{2} \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{1}{60} \cdot {x}^{5}}}{2} \]
                    2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{0.016666666666666666 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right)}{2} \]
                  11. Simplified84.1%

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

                Alternative 11: 88.2% accurate, 5.3× 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.5:\\ \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\ \mathbf{else}:\\ \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot \left(0.020833333333333332 + \frac{0.08333333333333333}{x\_m}\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 5.5)
                    (/ (* x_m (fma 0.3333333333333333 (* x_m x_m) 2.0)) 2.0)
                    (*
                     (* x_m (* x_m (* x_m x_m)))
                     (+ 0.020833333333333332 (/ 0.08333333333333333 x_m))))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m) {
                	double tmp;
                	if (x_m <= 5.5) {
                		tmp = (x_m * fma(0.3333333333333333, (x_m * x_m), 2.0)) / 2.0;
                	} else {
                		tmp = (x_m * (x_m * (x_m * x_m))) * (0.020833333333333332 + (0.08333333333333333 / x_m));
                	}
                	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.5)
                		tmp = Float64(Float64(x_m * fma(0.3333333333333333, Float64(x_m * x_m), 2.0)) / 2.0);
                	else
                		tmp = Float64(Float64(x_m * Float64(x_m * Float64(x_m * x_m))) * Float64(0.020833333333333332 + Float64(0.08333333333333333 / x_m)));
                	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.5], N[(N[(x$95$m * N[(0.3333333333333333 * N[(x$95$m * x$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.020833333333333332 + N[(0.08333333333333333 / x$95$m), $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 5.5:\\
                \;\;\;\;\frac{x\_m \cdot \mathsf{fma}\left(0.3333333333333333, x\_m \cdot x\_m, 2\right)}{2}\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot \left(0.020833333333333332 + \frac{0.08333333333333333}{x\_m}\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < 5.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} \]

                  if 5.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 \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. Taylor expanded in x around inf

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

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

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

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

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

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

                        \[\leadsto \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) \cdot \left(\frac{1}{48} + \frac{1}{12} \cdot \frac{1}{x}\right) \]
                      7. cube-multN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(\frac{1}{48} + \color{blue}{\frac{\frac{1}{12} \cdot 1}{x}}\right) \]
                      16. metadata-evalN/A

                        \[\leadsto \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(\frac{1}{48} + \frac{\color{blue}{\frac{1}{12}}}{x}\right) \]
                      17. lower-/.f6479.9

                        \[\leadsto \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.020833333333333332 + \color{blue}{\frac{0.08333333333333333}{x}}\right) \]
                    7. Simplified79.9%

                      \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \left(0.020833333333333332 + \frac{0.08333333333333333}{x}\right)} \]
                  5. Recombined 2 regimes into one program.
                  6. Add Preprocessing

                  Alternative 12: 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, x\_m \cdot \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(x_m, Float64(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[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * 0.016666666666666666), $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 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} + {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. Taylor expanded in x around 0

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

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

                    Alternative 13: 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 x\_m, 0.016666666666666666 \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 x_m) (* 0.016666666666666666 (* 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 * x_m), (0.016666666666666666 * (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 * x_m), Float64(0.016666666666666666 * 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 * x$95$m), $MachinePrecision] * N[(0.016666666666666666 * 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 x\_m, 0.016666666666666666 \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} + \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. Taylor expanded in x around inf

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

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

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

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

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

                    Alternative 14: 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}:\\ \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot 0.020833333333333332\\ \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(Float64(x_m * Float64(x_m * 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[(N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.020833333333333332), $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}:\\
                    \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot 0.020833333333333332\\
                    
                    
                    \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 \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. Taylor expanded in x around inf

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

                            \[\leadsto \color{blue}{{x}^{4} \cdot \frac{1}{48}} \]
                          2. lower-*.f64N/A

                            \[\leadsto \color{blue}{{x}^{4} \cdot \frac{1}{48}} \]
                          3. metadata-evalN/A

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

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

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

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

                            \[\leadsto \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) \cdot \frac{1}{48} \]
                          8. cube-multN/A

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

                            \[\leadsto \color{blue}{\left(x \cdot {x}^{3}\right)} \cdot \frac{1}{48} \]
                          10. cube-multN/A

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

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

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

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

                            \[\leadsto \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) \cdot 0.020833333333333332 \]
                        7. Simplified79.9%

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

                      Alternative 15: 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 \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. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

                              \[\leadsto x \cdot \left(x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot 0.020833333333333332\right)\right) \]
                          7. Simplified79.9%

                            \[\leadsto x \cdot \color{blue}{\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 16: 84.1% accurate, 9.4× 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:\\ \;\;\;\;\frac{x\_m \cdot 2}{2}\\ \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 2.0) 2.0)
                            (* 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 * 2.0) / 2.0;
                        	} 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 * 2.0d0) / 2.0d0
                            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 * 2.0) / 2.0;
                        	} 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 * 2.0) / 2.0
                        	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 = Float64(Float64(x_m * 2.0) / 2.0);
                        	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 * 2.0) / 2.0;
                        	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], N[(N[(x$95$m * 2.0), $MachinePrecision] / 2.0), $MachinePrecision], 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:\\
                        \;\;\;\;\frac{x\_m \cdot 2}{2}\\
                        
                        \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} \]

                          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. Final simplification69.3%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.4:\\ \;\;\;\;\frac{x \cdot 2}{2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot 0.16666666666666666\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 17: 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 18: 36.5% accurate, 18.1× speedup?

                        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\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 (* 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) {
                        	return x_s * (x_m * fma(x_m, 0.25, 0.5));
                        }
                        
                        x\_m = abs(x)
                        x\_s = copysign(1.0, x)
                        function code(x_s, x_m)
                        	return Float64(x_s * Float64(x_m * fma(x_m, 0.25, 0.5)))
                        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[(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 \left(x\_m \cdot \mathsf{fma}\left(x\_m, 0.25, 0.5\right)\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{e^{x} - \color{blue}{1}}{2} \]
                        4. Step-by-step derivation
                          1. Simplified29.6%

                            \[\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.f6421.6

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

                            \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(x, 0.25, 0.5\right)} \]
                          5. Add Preprocessing

                          Alternative 19: 12.0% accurate, 36.2× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot 0.5\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 (* x_m 0.5)))
                          x\_m = fabs(x);
                          x\_s = copysign(1.0, x);
                          double code(double x_s, double x_m) {
                          	return x_s * (x_m * 0.5);
                          }
                          
                          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 * 0.5d0)
                          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 * 0.5);
                          }
                          
                          x\_m = math.fabs(x)
                          x\_s = math.copysign(1.0, x)
                          def code(x_s, x_m):
                          	return x_s * (x_m * 0.5)
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0, x)
                          function code(x_s, x_m)
                          	return Float64(x_s * Float64(x_m * 0.5))
                          end
                          
                          x\_m = abs(x);
                          x\_s = sign(x) * abs(1.0);
                          function tmp = code(x_s, x_m)
                          	tmp = x_s * (x_m * 0.5);
                          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 * 0.5), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          x\_m = \left|x\right|
                          \\
                          x\_s = \mathsf{copysign}\left(1, x\right)
                          
                          \\
                          x\_s \cdot \left(x\_m \cdot 0.5\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{e^{x} - \color{blue}{1}}{2} \]
                          4. Step-by-step derivation
                            1. Simplified29.6%

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

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

                                \[\leadsto \color{blue}{x \cdot \frac{1}{2}} \]
                              2. lower-*.f6411.9

                                \[\leadsto \color{blue}{x \cdot 0.5} \]
                            4. Simplified11.9%

                              \[\leadsto \color{blue}{x \cdot 0.5} \]
                            5. Add Preprocessing

                            Reproduce

                            ?
                            herbie shell --seed 2024215 
                            (FPCore (x)
                              :name "Hyperbolic sine"
                              :precision binary64
                              (/ (- (exp x) (exp (- x))) 2.0))