Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.3% → 99.5%
Time: 15.3s
Alternatives: 21
Speedup: 2.1×

Specification

?
\[\begin{array}{l} \\ \frac{\cosh x \cdot \frac{y}{x}}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
	return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
	return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z):
	return (math.cosh(x) * (y / x)) / z
function code(x, y, z)
	return Float64(Float64(cosh(x) * Float64(y / x)) / z)
end
function tmp = code(x, y, z)
	tmp = (cosh(x) * (y / x)) / z;
end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\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 21 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: 84.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\cosh x \cdot \frac{y}{x}}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* (cosh x) (/ y x)) z))
double code(double x, double y, double z) {
	return (cosh(x) * (y / x)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (cosh(x) * (y / x)) / z
end function
public static double code(double x, double y, double z) {
	return (Math.cosh(x) * (y / x)) / z;
}
def code(x, y, z):
	return (math.cosh(x) * (y / x)) / z
function code(x, y, z)
	return Float64(Float64(cosh(x) * Float64(y / x)) / z)
end
function tmp = code(x, y, z)
	tmp = (cosh(x) * (y / x)) / z;
end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{\cosh x \cdot \frac{y}{x}}{z}
\end{array}

Alternative 1: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;\frac{\cosh x \cdot \frac{y}{z\_m}}{x}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= z_m 2.8e+53)
    (/ (* (cosh x) (/ y z_m)) x)
    (* y (/ (/ (cosh x) x) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if (z_m <= 2.8e+53) {
		tmp = (cosh(x) * (y / z_m)) / x;
	} else {
		tmp = y * ((cosh(x) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (z_m <= 2.8d+53) then
        tmp = (cosh(x) * (y / z_m)) / x
    else
        tmp = y * ((cosh(x) / x) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if (z_m <= 2.8e+53) {
		tmp = (Math.cosh(x) * (y / z_m)) / x;
	} else {
		tmp = y * ((Math.cosh(x) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if z_m <= 2.8e+53:
		tmp = (math.cosh(x) * (y / z_m)) / x
	else:
		tmp = y * ((math.cosh(x) / x) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (z_m <= 2.8e+53)
		tmp = Float64(Float64(cosh(x) * Float64(y / z_m)) / x);
	else
		tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if (z_m <= 2.8e+53)
		tmp = (cosh(x) * (y / z_m)) / x;
	else
		tmp = y * ((cosh(x) / x) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[z$95$m, 2.8e+53], N[(N[(N[Cosh[x], $MachinePrecision] * N[(y / z$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{\cosh x \cdot \frac{y}{z\_m}}{x}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.8e53

    1. Initial program 84.6%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{x}} \cdot \frac{1}{z} \]
      3. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\left(\cosh x \cdot y\right) \cdot \frac{1}{z}}{x}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\cosh x \cdot y\right) \cdot \frac{1}{z}}{x}} \]
      5. associate-*l*N/A

        \[\leadsto \frac{\color{blue}{\cosh x \cdot \left(y \cdot \frac{1}{z}\right)}}{x} \]
      6. div-invN/A

        \[\leadsto \frac{\cosh x \cdot \color{blue}{\frac{y}{z}}}{x} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \frac{\color{blue}{\cosh x \cdot \frac{y}{z}}}{x} \]
      8. cosh-lowering-cosh.f64N/A

        \[\leadsto \frac{\color{blue}{\cosh x} \cdot \frac{y}{z}}{x} \]
      9. /-lowering-/.f6491.4

        \[\leadsto \frac{\cosh x \cdot \color{blue}{\frac{y}{z}}}{x} \]
    4. Applied egg-rr91.4%

      \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{z}}{x}} \]

    if 2.8e53 < z

    1. Initial program 71.8%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      7. *-commutativeN/A

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
      8. div-invN/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      9. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      10. cosh-lowering-cosh.f6499.8

        \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
    4. Applied egg-rr99.8%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 94.2% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;\frac{\cosh x}{z\_m \cdot \frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (* (cosh x) (/ y x)) 2e+285)
    (/ (cosh x) (* z_m (/ x y)))
    (* y (/ (/ (cosh x) x) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((cosh(x) * (y / x)) <= 2e+285) {
		tmp = cosh(x) / (z_m * (x / y));
	} else {
		tmp = y * ((cosh(x) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if ((cosh(x) * (y / x)) <= 2d+285) then
        tmp = cosh(x) / (z_m * (x / y))
    else
        tmp = y * ((cosh(x) / x) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((Math.cosh(x) * (y / x)) <= 2e+285) {
		tmp = Math.cosh(x) / (z_m * (x / y));
	} else {
		tmp = y * ((Math.cosh(x) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m):
	tmp = 0
	if (math.cosh(x) * (y / x)) <= 2e+285:
		tmp = math.cosh(x) / (z_m * (x / y))
	else:
		tmp = y * ((math.cosh(x) / x) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(cosh(x) * Float64(y / x)) <= 2e+285)
		tmp = Float64(cosh(x) / Float64(z_m * Float64(x / y)));
	else
		tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m)
	tmp = 0.0;
	if ((cosh(x) * (y / x)) <= 2e+285)
		tmp = cosh(x) / (z_m * (x / y));
	else
		tmp = y * ((cosh(x) / x) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[Cosh[x], $MachinePrecision] / N[(z$95$m * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\cosh x}{z\_m \cdot \frac{x}{y}}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285

    1. Initial program 96.8%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{\cosh x \cdot \frac{\frac{y}{x}}{z}} \]
      2. clear-numN/A

        \[\leadsto \cosh x \cdot \color{blue}{\frac{1}{\frac{z}{\frac{y}{x}}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
      5. cosh-lowering-cosh.f64N/A

        \[\leadsto \frac{\color{blue}{\cosh x}}{\frac{z}{\frac{y}{x}}} \]
      6. div-invN/A

        \[\leadsto \frac{\cosh x}{\color{blue}{z \cdot \frac{1}{\frac{y}{x}}}} \]
      7. clear-numN/A

        \[\leadsto \frac{\cosh x}{z \cdot \color{blue}{\frac{x}{y}}} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \frac{\cosh x}{\color{blue}{z \cdot \frac{x}{y}}} \]
      9. /-lowering-/.f6493.0

        \[\leadsto \frac{\cosh x}{z \cdot \color{blue}{\frac{x}{y}}} \]
    4. Applied egg-rr93.0%

      \[\leadsto \color{blue}{\frac{\cosh x}{z \cdot \frac{x}{y}}} \]

    if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x))

    1. Initial program 59.1%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      7. *-commutativeN/A

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
      8. div-invN/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      9. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      10. cosh-lowering-cosh.f64100.0

        \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 90.4% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (* (cosh x) (/ y x)) 2e+285)
    (/ (* (/ y x) (fma 0.5 (fma x x 0.0) 1.0)) z_m)
    (* y (/ (/ (cosh x) x) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((cosh(x) * (y / x)) <= 2e+285) {
		tmp = ((y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m;
	} else {
		tmp = y * ((cosh(x) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(cosh(x) * Float64(y / x)) <= 2e+285)
		tmp = Float64(Float64(Float64(y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m);
	else
		tmp = Float64(y * Float64(Float64(cosh(x) / x) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[(N[(y / x), $MachinePrecision] * N[(0.5 * N[(x * x + 0.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(y * N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285

    1. Initial program 96.8%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
      3. +-rgt-identityN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{x \cdot x} + 0, 1\right) \cdot \frac{y}{x}}{z} \]
      5. accelerator-lowering-fma.f6483.4

        \[\leadsto \frac{\mathsf{fma}\left(0.5, \color{blue}{\mathsf{fma}\left(x, x, 0\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
    5. Simplified83.4%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)} \cdot \frac{y}{x}}{z} \]

    if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x))

    1. Initial program 59.1%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      7. *-commutativeN/A

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
      8. div-invN/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      9. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      10. cosh-lowering-cosh.f64100.0

        \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 87.7% accurate, 0.7× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (* (cosh x) (/ y x)) 2e+285)
    (/ (* (/ y x) (fma 0.5 (fma x x 0.0) 1.0)) z_m)
    (*
     y
     (/
      (/
       (fma
        (* x x)
        (fma
         x
         (* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
         0.5)
        1.0)
       x)
      z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((cosh(x) * (y / x)) <= 2e+285) {
		tmp = ((y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m;
	} else {
		tmp = y * ((fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(cosh(x) * Float64(y / x)) <= 2e+285)
		tmp = Float64(Float64(Float64(y / x) * fma(0.5, fma(x, x, 0.0), 1.0)) / z_m);
	else
		tmp = Float64(y * Float64(Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 2e+285], N[(N[(N[(y / x), $MachinePrecision] * N[(0.5 * N[(x * x + 0.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(y * N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (cosh.f64 x) (/.f64 y x)) < 2e285

    1. Initial program 96.8%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{1}{2}, {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
      3. +-rgt-identityN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{2}, \color{blue}{x \cdot x} + 0, 1\right) \cdot \frac{y}{x}}{z} \]
      5. accelerator-lowering-fma.f6483.4

        \[\leadsto \frac{\mathsf{fma}\left(0.5, \color{blue}{\mathsf{fma}\left(x, x, 0\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
    5. Simplified83.4%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)} \cdot \frac{y}{x}}{z} \]

    if 2e285 < (*.f64 (cosh.f64 x) (/.f64 y x))

    1. Initial program 59.1%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      7. *-commutativeN/A

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
      8. div-invN/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      9. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      10. cosh-lowering-cosh.f64100.0

        \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
    7. Simplified93.0%

      \[\leadsto y \cdot \frac{\color{blue}{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}}{z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 2 \cdot 10^{+285}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 87.6% accurate, 0.7× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\ \;\;\;\;\frac{y}{x} \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m)
 :precision binary64
 (*
  z_s
  (if (<= (* (cosh x) (/ y x)) INFINITY)
    (*
     (/ y x)
     (/ (fma x (* x (fma x (* x 0.041666666666666664) 0.5)) 1.0) z_m))
    (* y (/ (* x (* x (* x 0.041666666666666664))) z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m) {
	double tmp;
	if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
		tmp = (y / x) * (fma(x, (x * fma(x, (x * 0.041666666666666664), 0.5)), 1.0) / z_m);
	} else {
		tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m)
	tmp = 0.0
	if (Float64(cosh(x) * Float64(y / x)) <= Inf)
		tmp = Float64(Float64(y / x) * Float64(fma(x, Float64(x * fma(x, Float64(x * 0.041666666666666664), 0.5)), 1.0) / z_m));
	else
		tmp = Float64(y * Float64(Float64(x * Float64(x * Float64(x * 0.041666666666666664))) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / x), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{y}{x} \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0

    1. Initial program 95.6%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. div-invN/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      7. *-commutativeN/A

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
      8. div-invN/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      9. /-lowering-/.f64N/A

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
      10. cosh-lowering-cosh.f6494.7

        \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
    4. Applied egg-rr94.7%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{{x}^{2} \cdot \left(\frac{1}{24} \cdot \frac{{x}^{2} \cdot y}{z} + \frac{1}{2} \cdot \frac{y}{z}\right) + \frac{y}{z}}{x}} \]
    6. Step-by-step derivation
      1. Simplified77.6%

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

          \[\leadsto \frac{\left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{24} + \frac{1}{2}\right)\right) + 1\right) \cdot y}{\color{blue}{z \cdot x}} \]
        2. times-fracN/A

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

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

          \[\leadsto \color{blue}{\frac{x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot \frac{1}{24} + \frac{1}{2}\right)\right) + 1}{z}} \cdot \frac{y}{x} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24}}, \frac{1}{2}\right), 1\right)}{z} \cdot \frac{y}{x} \]
        10. /-lowering-/.f6485.0

          \[\leadsto \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z} \cdot \color{blue}{\frac{y}{x}} \]
      3. Applied egg-rr85.0%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z} \cdot \frac{y}{x}} \]

      if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x))

      1. Initial program 0.0%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
        3. +-rgt-identityN/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        9. associate-*l*N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
        11. +-rgt-identityN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
        12. accelerator-lowering-fma.f640.1

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
      5. Simplified0.1%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
        3. cube-multN/A

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
        6. *-lowering-*.f64N/A

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

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
        8. associate-*l*N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        10. *-lowering-*.f6472.6

          \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
      8. Simplified72.6%

        \[\leadsto \color{blue}{0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z}} \]
      9. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      10. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\frac{{x}^{3} \cdot y}{z} \cdot \frac{1}{24}} \]
        2. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot {x}^{3}}}{z} \cdot \frac{1}{24} \]
        3. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \left(\color{blue}{\left(\frac{1}{24} \cdot \frac{{x}^{2}}{z}\right)} \cdot x\right) \]
      11. Simplified91.6%

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z}} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification85.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\ \;\;\;\;\frac{y}{x} \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 6: 89.6% accurate, 1.0× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 4.5 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{\cosh x}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= x 4.5e+50)
        (* y (/ (cosh x) (* z_m x)))
        (*
         y
         (/
          (/
           (fma
            (* x x)
            (fma
             x
             (* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
             0.5)
            1.0)
           x)
          z_m)))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if (x <= 4.5e+50) {
    		tmp = y * (cosh(x) / (z_m * x));
    	} else {
    		tmp = y * ((fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (x <= 4.5e+50)
    		tmp = Float64(y * Float64(cosh(x) / Float64(z_m * x)));
    	else
    		tmp = Float64(y * Float64(Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / x) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 4.5e+50], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 4.5 \cdot 10^{+50}:\\
    \;\;\;\;y \cdot \frac{\cosh x}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 4.50000000000000014e50

      1. Initial program 86.6%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/N/A

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

          \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{z \cdot x}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot \cosh x}}{z \cdot x} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\cosh x}{z \cdot x}} \]
        7. cosh-lowering-cosh.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{z \cdot x} \]
        8. *-commutativeN/A

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
        9. *-lowering-*.f6489.6

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
      4. Applied egg-rr89.6%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]

      if 4.50000000000000014e50 < x

      1. Initial program 67.9%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
        2. div-invN/A

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        7. *-commutativeN/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
        8. div-invN/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        9. /-lowering-/.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        10. cosh-lowering-cosh.f64100.0

          \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
      4. Applied egg-rr100.0%

        \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
      5. Taylor expanded in x around 0

        \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
      7. Simplified100.0%

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}}{z} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification91.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 4.5 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{\cosh x}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 84.6% accurate, 2.1× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\ \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= x 5.7e+102)
        (/
         (*
          y
          (fma
           (* x x)
           (fma
            (* x x)
            (fma (* x x) 0.001388888888888889 0.041666666666666664)
            0.5)
           1.0))
         (* z_m x))
        (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if (x <= 5.7e+102) {
    		tmp = (y * fma((x * x), fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0)) / (z_m * x);
    	} else {
    		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (x <= 5.7e+102)
    		tmp = Float64(Float64(y * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0)) / Float64(z_m * x));
    	else
    		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 5.7e+102], N[(N[(y * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\
    \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 5.6999999999999999e102

      1. Initial program 85.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
        2. div-invN/A

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        7. *-commutativeN/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
        8. div-invN/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        9. /-lowering-/.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        10. cosh-lowering-cosh.f6494.5

          \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
      4. Applied egg-rr94.5%

        \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
      5. Taylor expanded in x around 0

        \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
      7. Simplified85.9%

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

        \[\leadsto y \cdot \frac{\color{blue}{\frac{1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)}{x}}}{z} \]
      9. Step-by-step derivation
        1. /-lowering-/.f64N/A

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

          \[\leadsto y \cdot \frac{\frac{\color{blue}{{x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right) + 1}}{x}}{z} \]
        3. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \color{blue}{{x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) + \frac{1}{2}}, 1\right)}{x}}{z} \]
        7. accelerator-lowering-fma.f64N/A

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

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

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{24} + \frac{1}{720} \cdot {x}^{2}, \frac{1}{2}\right), 1\right)}{x}}{z} \]
        10. +-commutativeN/A

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

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

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{720} + \frac{1}{24}, \frac{1}{2}\right), 1\right)}{x}}{z} \]
        13. associate-*l*N/A

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \color{blue}{x \cdot \left(x \cdot \frac{1}{720}\right)} + \frac{1}{24}, \frac{1}{2}\right), 1\right)}{x}}{z} \]
        14. accelerator-lowering-fma.f64N/A

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{720}, \frac{1}{24}\right)}, \frac{1}{2}\right), 1\right)}{x}}{z} \]
        15. *-lowering-*.f6485.9

          \[\leadsto y \cdot \frac{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot 0.001388888888888889}, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}{z} \]
      10. Simplified85.9%

        \[\leadsto y \cdot \frac{\color{blue}{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x}}}{z} \]
      11. Taylor expanded in y around 0

        \[\leadsto \color{blue}{\frac{y \cdot \left(1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)}{x \cdot z}} \]
      12. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y \cdot \left(1 + {x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right)\right)}{x \cdot z}} \]
      13. Simplified82.2%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right) \cdot y}{x \cdot z}} \]

      if 5.6999999999999999e102 < x

      1. Initial program 67.4%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
        3. +-rgt-identityN/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        9. associate-*l*N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
        11. +-rgt-identityN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
        12. accelerator-lowering-fma.f6467.4

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
      5. Simplified67.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
        3. cube-multN/A

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
        6. *-lowering-*.f64N/A

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

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
        8. associate-*l*N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        10. *-lowering-*.f6491.0

          \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
      8. Simplified91.0%

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
        3. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
        5. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        7. *-lowering-*.f64100.0

          \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
      10. Applied egg-rr100.0%

        \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification85.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\ \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 8: 84.2% accurate, 2.1× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 10^{+103}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= x 1e+103)
        (*
         y
         (/
          (fma
           (* x x)
           (fma
            x
            (* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
            0.5)
           1.0)
          (* z_m x)))
        (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if (x <= 1e+103) {
    		tmp = y * (fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / (z_m * x));
    	} else {
    		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (x <= 1e+103)
    		tmp = Float64(y * Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) / Float64(z_m * x)));
    	else
    		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 1e+103], N[(y * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 10^{+103}:\\
    \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 1e103

      1. Initial program 85.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/N/A

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

          \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{z \cdot x}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot \cosh x}}{z \cdot x} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\cosh x}{z \cdot x}} \]
        7. cosh-lowering-cosh.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{z \cdot x} \]
        8. *-commutativeN/A

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
        9. *-lowering-*.f6489.8

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
      4. Applied egg-rr89.8%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      5. Taylor expanded in x around 0

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

          \[\leadsto y \cdot \frac{\color{blue}{{x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right) + 1}}{x \cdot z} \]
        2. accelerator-lowering-fma.f64N/A

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right), 1\right)}{x \cdot z} \]
        5. +-commutativeN/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) + \frac{1}{2}, 1\right)}{x \cdot z} \]
        7. associate-*l*N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, x \cdot \color{blue}{\left(\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) \cdot x\right)} + \frac{1}{2}, 1\right)}{x \cdot z} \]
        9. accelerator-lowering-fma.f64N/A

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

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\color{blue}{{x}^{2} \cdot \frac{1}{720}} + \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        14. accelerator-lowering-fma.f64N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{720}, \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        16. *-lowering-*.f6481.2

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x \cdot z} \]
      7. Simplified81.2%

        \[\leadsto y \cdot \frac{\color{blue}{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}}{x \cdot z} \]

      if 1e103 < x

      1. Initial program 67.4%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
        3. +-rgt-identityN/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        9. associate-*l*N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
        11. +-rgt-identityN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
        12. accelerator-lowering-fma.f6467.4

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
      5. Simplified67.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
        3. cube-multN/A

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
        6. *-lowering-*.f64N/A

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

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
        8. associate-*l*N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        10. *-lowering-*.f6491.0

          \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
      8. Simplified91.0%

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
        3. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
        5. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        7. *-lowering-*.f64100.0

          \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
      10. Applied egg-rr100.0%

        \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification84.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+103}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 84.0% accurate, 2.1× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 10^{+103}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right), 0.5\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= x 1e+103)
        (*
         y
         (/
          (fma (* x x) (fma x (* x (* (* x x) 0.001388888888888889)) 0.5) 1.0)
          (* z_m x)))
        (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if (x <= 1e+103) {
    		tmp = y * (fma((x * x), fma(x, (x * ((x * x) * 0.001388888888888889)), 0.5), 1.0) / (z_m * x));
    	} else {
    		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (x <= 1e+103)
    		tmp = Float64(y * Float64(fma(Float64(x * x), fma(x, Float64(x * Float64(Float64(x * x) * 0.001388888888888889)), 0.5), 1.0) / Float64(z_m * x)));
    	else
    		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 1e+103], N[(y * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 10^{+103}:\\
    \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right), 0.5\right), 1\right)}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 1e103

      1. Initial program 85.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/N/A

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

          \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{z \cdot x}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot \cosh x}}{z \cdot x} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\cosh x}{z \cdot x}} \]
        7. cosh-lowering-cosh.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{z \cdot x} \]
        8. *-commutativeN/A

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
        9. *-lowering-*.f6489.8

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
      4. Applied egg-rr89.8%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      5. Taylor expanded in x around 0

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

          \[\leadsto y \cdot \frac{\color{blue}{{x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right) + 1}}{x \cdot z} \]
        2. accelerator-lowering-fma.f64N/A

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right), 1\right)}{x \cdot z} \]
        5. +-commutativeN/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) + \frac{1}{2}, 1\right)}{x \cdot z} \]
        7. associate-*l*N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, x \cdot \color{blue}{\left(\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) \cdot x\right)} + \frac{1}{2}, 1\right)}{x \cdot z} \]
        9. accelerator-lowering-fma.f64N/A

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

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\color{blue}{{x}^{2} \cdot \frac{1}{720}} + \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        14. accelerator-lowering-fma.f64N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{720}, \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        16. *-lowering-*.f6481.2

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x \cdot z} \]
      7. Simplified81.2%

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

        \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{\frac{1}{720} \cdot {x}^{3}}, \frac{1}{2}\right), 1\right)}{x \cdot z} \]
      9. Step-by-step derivation
        1. unpow3N/A

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\frac{1}{720} \cdot {x}^{2}\right)}, \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        5. *-lowering-*.f64N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \color{blue}{\left({x}^{2} \cdot \frac{1}{720}\right)}, \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        7. *-lowering-*.f64N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{720}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        9. *-lowering-*.f6481.2

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot 0.001388888888888889\right), 0.5\right), 1\right)}{x \cdot z} \]
      10. Simplified81.2%

        \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, \color{blue}{x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)}, 0.5\right), 1\right)}{x \cdot z} \]

      if 1e103 < x

      1. Initial program 67.4%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
        3. +-rgt-identityN/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        9. associate-*l*N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
        11. +-rgt-identityN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
        12. accelerator-lowering-fma.f6467.4

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
      5. Simplified67.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
        3. cube-multN/A

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
        6. *-lowering-*.f64N/A

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

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
        8. associate-*l*N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        10. *-lowering-*.f6491.0

          \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
      8. Simplified91.0%

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
        3. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
        5. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        7. *-lowering-*.f64100.0

          \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
      10. Applied egg-rr100.0%

        \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification84.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{+103}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right), 0.5\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 83.8% accurate, 2.2× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_0 := x \cdot \left(x \cdot x\right)\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.001388888888888889 \cdot \left(x \cdot t\_0\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot t\_0}{z\_m}\\ \end{array} \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (let* ((t_0 (* x (* x x))))
       (*
        z_s
        (if (<= x 5.7e+102)
          (* y (/ (fma (* x x) (* 0.001388888888888889 (* x t_0)) 1.0) (* z_m x)))
          (* 0.041666666666666664 (/ (* y t_0) z_m))))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double t_0 = x * (x * x);
    	double tmp;
    	if (x <= 5.7e+102) {
    		tmp = y * (fma((x * x), (0.001388888888888889 * (x * t_0)), 1.0) / (z_m * x));
    	} else {
    		tmp = 0.041666666666666664 * ((y * t_0) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	t_0 = Float64(x * Float64(x * x))
    	tmp = 0.0
    	if (x <= 5.7e+102)
    		tmp = Float64(y * Float64(fma(Float64(x * x), Float64(0.001388888888888889 * Float64(x * t_0)), 1.0) / Float64(z_m * x)));
    	else
    		tmp = Float64(0.041666666666666664 * Float64(Float64(y * t_0) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[x, 5.7e+102], N[(y * N[(N[(N[(x * x), $MachinePrecision] * N[(0.001388888888888889 * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * t$95$0), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    \begin{array}{l}
    t_0 := x \cdot \left(x \cdot x\right)\\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\
    \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.001388888888888889 \cdot \left(x \cdot t\_0\right), 1\right)}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot t\_0}{z\_m}\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 5.6999999999999999e102

      1. Initial program 85.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. associate-*r/N/A

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

          \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{z \cdot x}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{y \cdot \cosh x}}{z \cdot x} \]
        4. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\cosh x}{z \cdot x}} \]
        7. cosh-lowering-cosh.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{z \cdot x} \]
        8. *-commutativeN/A

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
        9. *-lowering-*.f6489.8

          \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
      4. Applied egg-rr89.8%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      5. Taylor expanded in x around 0

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

          \[\leadsto y \cdot \frac{\color{blue}{{x}^{2} \cdot \left(\frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right)\right) + 1}}{x \cdot z} \]
        2. accelerator-lowering-fma.f64N/A

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{2} + {x}^{2} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right), 1\right)}{x \cdot z} \]
        5. +-commutativeN/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) + \frac{1}{2}, 1\right)}{x \cdot z} \]
        7. associate-*l*N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, x \cdot \color{blue}{\left(\left(\frac{1}{24} + \frac{1}{720} \cdot {x}^{2}\right) \cdot x\right)} + \frac{1}{2}, 1\right)}{x \cdot z} \]
        9. accelerator-lowering-fma.f64N/A

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

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \left(\color{blue}{{x}^{2} \cdot \frac{1}{720}} + \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        14. accelerator-lowering-fma.f64N/A

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{720}, \frac{1}{24}\right), \frac{1}{2}\right), 1\right)}{x \cdot z} \]
        16. *-lowering-*.f6481.2

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{x \cdot z} \]
      7. Simplified81.2%

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

        \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{\frac{1}{720} \cdot {x}^{4}}, 1\right)}{x \cdot z} \]
      9. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \frac{1}{720} \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right), 1\right)}{x \cdot z} \]
        7. cube-multN/A

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \frac{1}{720} \cdot \left(x \cdot \color{blue}{{x}^{3}}\right), 1\right)}{x \cdot z} \]
        8. *-lowering-*.f64N/A

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

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

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

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

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \frac{1}{720} \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right), 1\right)}{x \cdot z} \]
        13. *-lowering-*.f6481.0

          \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.001388888888888889 \cdot \left(x \cdot \left(x \cdot \color{blue}{\left(x \cdot x\right)}\right)\right), 1\right)}{x \cdot z} \]
      10. Simplified81.0%

        \[\leadsto y \cdot \frac{\mathsf{fma}\left(x \cdot x, \color{blue}{0.001388888888888889 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}, 1\right)}{x \cdot z} \]

      if 5.6999999999999999e102 < x

      1. Initial program 67.4%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
        3. +-rgt-identityN/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        5. accelerator-lowering-fma.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
        9. associate-*l*N/A

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

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
        11. +-rgt-identityN/A

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
        12. accelerator-lowering-fma.f6467.4

          \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
      5. Simplified67.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
        3. cube-multN/A

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
        6. *-lowering-*.f64N/A

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

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
        8. associate-*l*N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        9. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
        10. *-lowering-*.f6491.0

          \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
      8. Simplified91.0%

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

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

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
        3. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
        4. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
        5. cube-unmultN/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
        7. *-lowering-*.f64100.0

          \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
      10. Applied egg-rr100.0%

        \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification84.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.7 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x \cdot x, 0.001388888888888889 \cdot \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 82.2% accurate, 2.6× speedup?

    \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{+102}:\\ \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    (FPCore (z_s x y z_m)
     :precision binary64
     (*
      z_s
      (if (<= x 6e+102)
        (/
         (* y (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0))
         (* z_m x))
        (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    double code(double z_s, double x, double y, double z_m) {
    	double tmp;
    	if (x <= 6e+102) {
    		tmp = (y * fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0)) / (z_m * x);
    	} else {
    		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
    	}
    	return z_s * tmp;
    }
    
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    function code(z_s, x, y, z_m)
    	tmp = 0.0
    	if (x <= 6e+102)
    		tmp = Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0)) / Float64(z_m * x));
    	else
    		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
    	end
    	return Float64(z_s * tmp)
    end
    
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 6e+102], N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    
    \\
    z\_s \cdot \begin{array}{l}
    \mathbf{if}\;x \leq 6 \cdot 10^{+102}:\\
    \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 5.9999999999999996e102

      1. Initial program 85.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
        2. div-invN/A

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

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

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
        7. *-commutativeN/A

          \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
        8. div-invN/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        9. /-lowering-/.f64N/A

          \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
        10. cosh-lowering-cosh.f6494.5

          \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
      4. Applied egg-rr94.5%

        \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
      5. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{{x}^{2} \cdot \left(\frac{1}{24} \cdot \frac{{x}^{2} \cdot y}{z} + \frac{1}{2} \cdot \frac{y}{z}\right) + \frac{y}{z}}{x}} \]
      6. Step-by-step derivation
        1. Simplified77.2%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right) \cdot y}{x \cdot z}} \]

        if 5.9999999999999996e102 < x

        1. Initial program 67.4%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6467.4

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified67.4%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6491.0

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified91.0%

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
          3. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
          5. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          7. *-lowering-*.f64100.0

            \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
        10. Applied egg-rr100.0%

          \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification81.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{+102}:\\ \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 12: 81.5% accurate, 2.6× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 5.4 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (*
        z_s
        (if (<= x 5.4e+102)
          (*
           y
           (/ (fma x (* x (fma (* x x) 0.041666666666666664 0.5)) 1.0) (* z_m x)))
          (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 5.4e+102) {
      		tmp = y * (fma(x, (x * fma((x * x), 0.041666666666666664, 0.5)), 1.0) / (z_m * x));
      	} else {
      		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 5.4e+102)
      		tmp = Float64(y * Float64(fma(x, Float64(x * fma(Float64(x * x), 0.041666666666666664, 0.5)), 1.0) / Float64(z_m * x)));
      	else
      		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 5.4e+102], N[(y * N[(N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 5.4 \cdot 10^{+102}:\\
      \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 5.4000000000000002e102

        1. Initial program 85.5%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. associate-*r/N/A

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

            \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{z \cdot x}} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot \cosh x}}{z \cdot x} \]
          4. associate-/l*N/A

            \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
          5. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
          6. /-lowering-/.f64N/A

            \[\leadsto y \cdot \color{blue}{\frac{\cosh x}{z \cdot x}} \]
          7. cosh-lowering-cosh.f64N/A

            \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{z \cdot x} \]
          8. *-commutativeN/A

            \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
          9. *-lowering-*.f6489.8

            \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
        4. Applied egg-rr89.8%

          \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
        5. Taylor expanded in x around 0

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

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

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

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

            \[\leadsto y \cdot \frac{x \cdot \color{blue}{\left(\left(\frac{1}{2} + \frac{1}{24} \cdot {x}^{2}\right) \cdot x\right)} + 1}{x \cdot z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

            \[\leadsto y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, \frac{1}{24}, \frac{1}{2}\right), 1\right)}{x \cdot z} \]
          12. *-lowering-*.f6476.7

            \[\leadsto y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(\color{blue}{x \cdot x}, 0.041666666666666664, 0.5\right), 1\right)}{x \cdot z} \]
        7. Simplified76.7%

          \[\leadsto y \cdot \frac{\color{blue}{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}}{x \cdot z} \]

        if 5.4000000000000002e102 < x

        1. Initial program 67.4%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6467.4

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified67.4%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6491.0

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified91.0%

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
          3. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
          5. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          7. *-lowering-*.f64100.0

            \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
        10. Applied egg-rr100.0%

          \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification80.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5.4 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 13: 78.3% accurate, 3.3× speedup?

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

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
          2. div-invN/A

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

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

            \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
          5. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{y \cdot \frac{\frac{1}{x} \cdot \cosh x}{z}} \]
          6. /-lowering-/.f64N/A

            \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
          7. *-commutativeN/A

            \[\leadsto y \cdot \frac{\color{blue}{\cosh x \cdot \frac{1}{x}}}{z} \]
          8. div-invN/A

            \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
          9. /-lowering-/.f64N/A

            \[\leadsto y \cdot \frac{\color{blue}{\frac{\cosh x}{x}}}{z} \]
          10. cosh-lowering-cosh.f6493.8

            \[\leadsto y \cdot \frac{\frac{\color{blue}{\cosh x}}{x}}{z} \]
        4. Applied egg-rr93.8%

          \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
        5. Taylor expanded in x around 0

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

            \[\leadsto \frac{\color{blue}{\frac{y}{z} + \frac{1}{2} \cdot \frac{{x}^{2} \cdot y}{z}}}{x} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\frac{y}{z} + \color{blue}{\frac{{x}^{2} \cdot y}{z} \cdot \frac{1}{2}}}{x} \]
          3. associate-/l*N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{y}{z} \cdot \frac{1 + \frac{1}{2} \cdot {x}^{2}}{x}} \]
          11. times-fracN/A

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

            \[\leadsto \frac{y \cdot \left(1 + \frac{1}{2} \cdot {x}^{2}\right)}{\color{blue}{x \cdot z}} \]
          13. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y \cdot \left(1 + \frac{1}{2} \cdot {x}^{2}\right)}{x \cdot z}} \]
        7. Simplified79.5%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, x \cdot 0.5, 1\right) \cdot y}{x \cdot z}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6453.0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified53.0%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6468.3

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified68.3%

          \[\leadsto \color{blue}{0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z}} \]
        9. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\frac{{x}^{3} \cdot y}{z} \cdot \frac{1}{24}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot {x}^{3}}}{z} \cdot \frac{1}{24} \]
          3. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto y \cdot \left(\color{blue}{\left(\frac{1}{24} \cdot \frac{{x}^{2}}{z}\right)} \cdot x\right) \]
        11. Simplified76.9%

          \[\leadsto \color{blue}{y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification78.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, x \cdot 0.5, 1\right)}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 14: 67.9% accurate, 3.4× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (*
        z_s
        (if (<= x 0.0009)
          (/ y (* z_m x))
          (* y (/ (* x (* x (* x 0.041666666666666664))) z_m)))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = y * ((x * (x * (x * 0.041666666666666664d0))) / z_m)
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m)
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(y * Float64(Float64(x * Float64(x * Float64(x * 0.041666666666666664))) / z_m));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = y * ((x * (x * (x * 0.041666666666666664))) / z_m);
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;y \cdot \frac{x \cdot \left(x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{z\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6453.0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified53.0%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6468.3

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified68.3%

          \[\leadsto \color{blue}{0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z}} \]
        9. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        10. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\frac{{x}^{3} \cdot y}{z} \cdot \frac{1}{24}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y \cdot {x}^{3}}}{z} \cdot \frac{1}{24} \]
          3. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto y \cdot \left(\color{blue}{\left(\frac{1}{24} \cdot \frac{{x}^{2}}{z}\right)} \cdot x\right) \]
        11. Simplified76.9%

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

      Alternative 15: 68.1% accurate, 3.4× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (*
        z_s
        (if (<= x 0.0009)
          (/ y (* z_m x))
          (* 0.041666666666666664 (/ (* y (* x (* x x))) z_m)))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = 0.041666666666666664d0 * ((y * (x * (x * x))) / z_m)
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m)
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(0.041666666666666664 * Float64(Float64(y * Float64(x * Float64(x * x))) / z_m));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = 0.041666666666666664 * ((y * (x * (x * x))) / z_m);
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6453.0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified53.0%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6468.3

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified68.3%

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
          3. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3}} \cdot y}{z} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{{x}^{3} \cdot y}}{z} \]
          5. cube-unmultN/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right)} \cdot y}{z} \]
          7. *-lowering-*.f6474.1

            \[\leadsto 0.041666666666666664 \cdot \frac{\left(x \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot y}{z} \]
        10. Applied egg-rr74.1%

          \[\leadsto 0.041666666666666664 \cdot \frac{\color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot y}}{z} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification66.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{y \cdot \left(x \cdot \left(x \cdot x\right)\right)}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 66.7% accurate, 3.4× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z\_m}\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (*
        z_s
        (if (<= x 0.0009)
          (/ y (* z_m x))
          (* 0.041666666666666664 (/ (* x (* x (* x y))) z_m)))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = 0.041666666666666664d0 * ((x * (x * (x * y))) / z_m)
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m);
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m)
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(0.041666666666666664 * Float64(Float64(x * Float64(x * Float64(x * y))) / z_m));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = 0.041666666666666664 * ((x * (x * (x * y))) / z_m);
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(x * N[(x * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \left(x \cdot y\right)\right)}{z\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6453.0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified53.0%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6468.3

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified68.3%

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

      Alternative 17: 66.0% accurate, 3.4× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \frac{x \cdot y}{z\_m}\right)\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (*
        z_s
        (if (<= x 0.0009)
          (/ y (* z_m x))
          (* 0.041666666666666664 (* (* x x) (/ (* x y) z_m))))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m));
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = 0.041666666666666664d0 * ((x * x) * ((x * y) / z_m))
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m));
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m))
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(0.041666666666666664 * Float64(Float64(x * x) * Float64(Float64(x * y) / z_m)));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = 0.041666666666666664 * ((x * x) * ((x * y) / z_m));
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.041666666666666664 * N[(N[(x * x), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \frac{x \cdot y}{z\_m}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({x}^{2}, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right)} \cdot \frac{y}{x}}{z} \]
          3. +-rgt-identityN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{x \cdot x} + 0, \frac{1}{2} + \frac{1}{24} \cdot {x}^{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          5. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\left(x \cdot x\right)} \cdot \frac{1}{24} + \frac{1}{2}, 1\right) \cdot \frac{y}{x}}{z} \]
          9. associate-*l*N/A

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

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \color{blue}{\mathsf{fma}\left(x, x \cdot \frac{1}{24}, \frac{1}{2}\right)}, 1\right) \cdot \frac{y}{x}}{z} \]
          11. +-rgt-identityN/A

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{x \cdot \frac{1}{24} + 0}, \frac{1}{2}\right), 1\right) \cdot \frac{y}{x}}{z} \]
          12. accelerator-lowering-fma.f6453.0

            \[\leadsto \frac{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(x, 0.041666666666666664, 0\right)}, 0.5\right), 1\right) \cdot \frac{y}{x}}{z} \]
        5. Simplified53.0%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(x, x, 0\right), \mathsf{fma}\left(x, \mathsf{fma}\left(x, 0.041666666666666664, 0\right), 0.5\right), 1\right)} \cdot \frac{y}{x}}{z} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{24} \cdot \frac{{x}^{3} \cdot y}{z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \color{blue}{\frac{{x}^{3} \cdot y}{z}} \]
          3. cube-multN/A

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

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

            \[\leadsto \frac{1}{24} \cdot \frac{\color{blue}{x \cdot \left({x}^{2} \cdot y\right)}}{z} \]
          6. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot y\right)}{z} \]
          8. associate-*l*N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          9. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{24} \cdot \frac{x \cdot \color{blue}{\left(x \cdot \left(x \cdot y\right)\right)}}{z} \]
          10. *-lowering-*.f6468.3

            \[\leadsto 0.041666666666666664 \cdot \frac{x \cdot \left(x \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z} \]
        8. Simplified68.3%

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

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

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

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

            \[\leadsto \frac{1}{24} \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot \frac{x \cdot y}{z}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \frac{1}{24} \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{\frac{x \cdot y}{z}}\right) \]
          6. *-lowering-*.f6465.5

            \[\leadsto 0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \frac{\color{blue}{x \cdot y}}{z}\right) \]
        10. Applied egg-rr65.5%

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

      Alternative 18: 58.2% accurate, 3.9× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \left(x \cdot \frac{1}{z\_m}\right)\right)\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (* 0.5 (* y (* x (/ 1.0 z_m)))))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.5 * (y * (x * (1.0 / z_m)));
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = 0.5d0 * (y * (x * (1.0d0 / z_m)))
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.5 * (y * (x * (1.0 / z_m)));
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = 0.5 * (y * (x * (1.0 / z_m)))
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(0.5 * Float64(y * Float64(x * Float64(1.0 / z_m))));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = 0.5 * (y * (x * (1.0 / z_m)));
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y * N[(x * N[(1.0 / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.5 \cdot \left(y \cdot \left(x \cdot \frac{1}{z\_m}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

            \[\leadsto \frac{\color{blue}{\frac{{x}^{2} \cdot y}{z} \cdot \frac{1}{2}} + \frac{y}{z}}{x} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{{x}^{2} \cdot y}{z}} + \frac{y}{z}}{x} \]
          3. associate-/l*N/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{y}{z}} + \frac{y}{z}}{x} \]
          5. distribute-lft1-inN/A

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

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

            \[\leadsto \color{blue}{\frac{1 + \frac{1}{2} \cdot {x}^{2}}{x} \cdot \frac{y}{z}} \]
          8. times-fracN/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2} + 1\right)} \cdot y}{x \cdot z} \]
          10. distribute-rgt1-inN/A

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

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

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

            \[\leadsto \frac{y + \color{blue}{\left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}}{x \cdot z} \]
          14. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y + \left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}{x \cdot z}} \]
        5. Simplified44.4%

          \[\leadsto \color{blue}{\frac{y \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot \frac{y}{z}\right)} \]
          4. /-lowering-/.f6426.7

            \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{\frac{y}{z}}\right) \]
        8. Simplified26.7%

          \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot \frac{y}{z}\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\frac{y}{z} \cdot x\right)} \]
          2. div-invN/A

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

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

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

            \[\leadsto \frac{1}{2} \cdot \left(y \cdot \color{blue}{\left(\frac{1}{z} \cdot x\right)}\right) \]
          6. /-lowering-/.f6437.9

            \[\leadsto 0.5 \cdot \left(y \cdot \left(\color{blue}{\frac{1}{z}} \cdot x\right)\right) \]
        10. Applied egg-rr37.9%

          \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \left(\frac{1}{z} \cdot x\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \left(x \cdot \frac{1}{z}\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 19: 57.9% accurate, 4.6× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \left(x \cdot y\right)}{z\_m}\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (/ (* 0.5 (* x y)) z_m))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = (0.5 * (x * y)) / z_m;
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = (0.5d0 * (x * y)) / z_m
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = (0.5 * (x * y)) / z_m;
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = (0.5 * (x * y)) / z_m
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(Float64(0.5 * Float64(x * y)) / z_m);
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = (0.5 * (x * y)) / z_m;
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(x * y), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{0.5 \cdot \left(x \cdot y\right)}{z\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

            \[\leadsto \frac{\color{blue}{\frac{{x}^{2} \cdot y}{z} \cdot \frac{1}{2}} + \frac{y}{z}}{x} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{{x}^{2} \cdot y}{z}} + \frac{y}{z}}{x} \]
          3. associate-/l*N/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{y}{z}} + \frac{y}{z}}{x} \]
          5. distribute-lft1-inN/A

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

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

            \[\leadsto \color{blue}{\frac{1 + \frac{1}{2} \cdot {x}^{2}}{x} \cdot \frac{y}{z}} \]
          8. times-fracN/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2} + 1\right)} \cdot y}{x \cdot z} \]
          10. distribute-rgt1-inN/A

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

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

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

            \[\leadsto \frac{y + \color{blue}{\left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}}{x \cdot z} \]
          14. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y + \left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}{x \cdot z}} \]
        5. Simplified44.4%

          \[\leadsto \color{blue}{\frac{y \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot \frac{y}{z}\right)} \]
          4. /-lowering-/.f6426.7

            \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{\frac{y}{z}}\right) \]
        8. Simplified26.7%

          \[\leadsto \color{blue}{0.5 \cdot \left(x \cdot \frac{y}{z}\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \frac{1}{2}}{z}} \]
          4. /-lowering-/.f64N/A

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

            \[\leadsto \frac{\color{blue}{\left(x \cdot y\right) \cdot \frac{1}{2}}}{z} \]
          6. *-lowering-*.f6435.2

            \[\leadsto \frac{\color{blue}{\left(x \cdot y\right)} \cdot 0.5}{z} \]
        10. Applied egg-rr35.2%

          \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot 0.5}{z}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \left(x \cdot y\right)}{z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 20: 56.1% accurate, 4.6× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \leq 0.0009:\\ \;\;\;\;\frac{y}{z\_m \cdot x}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{z\_m}\right)\\ \end{array} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m)
       :precision binary64
       (* z_s (if (<= x 0.0009) (/ y (* z_m x)) (* 0.5 (* x (/ y z_m))))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.5 * (x * (y / z_m));
      	}
      	return z_s * tmp;
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          real(8) :: tmp
          if (x <= 0.0009d0) then
              tmp = y / (z_m * x)
          else
              tmp = 0.5d0 * (x * (y / z_m))
          end if
          code = z_s * tmp
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	double tmp;
      	if (x <= 0.0009) {
      		tmp = y / (z_m * x);
      	} else {
      		tmp = 0.5 * (x * (y / z_m));
      	}
      	return z_s * tmp;
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	tmp = 0
      	if x <= 0.0009:
      		tmp = y / (z_m * x)
      	else:
      		tmp = 0.5 * (x * (y / z_m))
      	return z_s * tmp
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	tmp = 0.0
      	if (x <= 0.0009)
      		tmp = Float64(y / Float64(z_m * x));
      	else
      		tmp = Float64(0.5 * Float64(x * Float64(y / z_m)));
      	end
      	return Float64(z_s * tmp)
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp_2 = code(z_s, x, y, z_m)
      	tmp = 0.0;
      	if (x <= 0.0009)
      		tmp = y / (z_m * x);
      	else
      		tmp = 0.5 * (x * (y / z_m));
      	end
      	tmp_2 = z_s * tmp;
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * If[LessEqual[x, 0.0009], N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \begin{array}{l}
      \mathbf{if}\;x \leq 0.0009:\\
      \;\;\;\;\frac{y}{z\_m \cdot x}\\
      
      \mathbf{else}:\\
      \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{z\_m}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 8.9999999999999998e-4

        1. Initial program 85.8%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        4. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
          2. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
          3. accelerator-lowering-fma.f6463.4

            \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
        5. Simplified63.4%

          \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Step-by-step derivation
          1. +-rgt-identityN/A

            \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
          3. *-lowering-*.f6463.4

            \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        7. Applied egg-rr63.4%

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]

        if 8.9999999999999998e-4 < x

        1. Initial program 73.1%

          \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

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

            \[\leadsto \frac{\color{blue}{\frac{{x}^{2} \cdot y}{z} \cdot \frac{1}{2}} + \frac{y}{z}}{x} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{\frac{1}{2} \cdot \frac{{x}^{2} \cdot y}{z}} + \frac{y}{z}}{x} \]
          3. associate-/l*N/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{y}{z}} + \frac{y}{z}}{x} \]
          5. distribute-lft1-inN/A

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

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

            \[\leadsto \color{blue}{\frac{1 + \frac{1}{2} \cdot {x}^{2}}{x} \cdot \frac{y}{z}} \]
          8. times-fracN/A

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

            \[\leadsto \frac{\color{blue}{\left(\frac{1}{2} \cdot {x}^{2} + 1\right)} \cdot y}{x \cdot z} \]
          10. distribute-rgt1-inN/A

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

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

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

            \[\leadsto \frac{y + \color{blue}{\left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}}{x \cdot z} \]
          14. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y + \left(\frac{1}{2} \cdot y\right) \cdot {x}^{2}}{x \cdot z}} \]
        5. Simplified44.4%

          \[\leadsto \color{blue}{\frac{y \cdot \mathsf{fma}\left(0.5, \mathsf{fma}\left(x, x, 0\right), 1\right)}{\mathsf{fma}\left(x, z, 0\right)}} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(x \cdot \frac{y}{z}\right)} \]
          4. /-lowering-/.f6426.7

            \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{\frac{y}{z}}\right) \]
        8. Simplified26.7%

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

      Alternative 21: 49.6% accurate, 7.5× speedup?

      \[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \frac{y}{z\_m \cdot x} \end{array} \]
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      (FPCore (z_s x y z_m) :precision binary64 (* z_s (/ y (* z_m x))))
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      double code(double z_s, double x, double y, double z_m) {
      	return z_s * (y / (z_m * x));
      }
      
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      real(8) function code(z_s, x, y, z_m)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z_m
          code = z_s * (y / (z_m * x))
      end function
      
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      public static double code(double z_s, double x, double y, double z_m) {
      	return z_s * (y / (z_m * x));
      }
      
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      def code(z_s, x, y, z_m):
      	return z_s * (y / (z_m * x))
      
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      function code(z_s, x, y, z_m)
      	return Float64(z_s * Float64(y / Float64(z_m * x)))
      end
      
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      function tmp = code(z_s, x, y, z_m)
      	tmp = z_s * (y / (z_m * x));
      end
      
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[z$95$s_, x_, y_, z$95$m_] := N[(z$95$s * N[(y / N[(z$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      
      \\
      z\_s \cdot \frac{y}{z\_m \cdot x}
      \end{array}
      
      Derivation
      1. Initial program 82.5%

        \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
        2. +-rgt-identityN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot z + 0}} \]
        3. accelerator-lowering-fma.f6447.9

          \[\leadsto \frac{y}{\color{blue}{\mathsf{fma}\left(x, z, 0\right)}} \]
      5. Simplified47.9%

        \[\leadsto \color{blue}{\frac{y}{\mathsf{fma}\left(x, z, 0\right)}} \]
      6. Step-by-step derivation
        1. +-rgt-identityN/A

          \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
        2. *-commutativeN/A

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
        3. *-lowering-*.f6447.9

          \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
      7. Applied egg-rr47.9%

        \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
      8. Add Preprocessing

      Developer Target 1: 97.1% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{y}{z}}{x} \cdot \cosh x\\ \mathbf{if}\;y < -4.618902267687042 \cdot 10^{-52}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y < 1.038530535935153 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{\cosh x \cdot y}{x}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* (/ (/ y z) x) (cosh x))))
         (if (< y -4.618902267687042e-52)
           t_0
           (if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) t_0))))
      double code(double x, double y, double z) {
      	double t_0 = ((y / z) / x) * cosh(x);
      	double tmp;
      	if (y < -4.618902267687042e-52) {
      		tmp = t_0;
      	} else if (y < 1.038530535935153e-39) {
      		tmp = ((cosh(x) * y) / x) / z;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: tmp
          t_0 = ((y / z) / x) * cosh(x)
          if (y < (-4.618902267687042d-52)) then
              tmp = t_0
          else if (y < 1.038530535935153d-39) then
              tmp = ((cosh(x) * y) / x) / z
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = ((y / z) / x) * Math.cosh(x);
      	double tmp;
      	if (y < -4.618902267687042e-52) {
      		tmp = t_0;
      	} else if (y < 1.038530535935153e-39) {
      		tmp = ((Math.cosh(x) * y) / x) / z;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = ((y / z) / x) * math.cosh(x)
      	tmp = 0
      	if y < -4.618902267687042e-52:
      		tmp = t_0
      	elif y < 1.038530535935153e-39:
      		tmp = ((math.cosh(x) * y) / x) / z
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(Float64(Float64(y / z) / x) * cosh(x))
      	tmp = 0.0
      	if (y < -4.618902267687042e-52)
      		tmp = t_0;
      	elseif (y < 1.038530535935153e-39)
      		tmp = Float64(Float64(Float64(cosh(x) * y) / x) / z);
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = ((y / z) / x) * cosh(x);
      	tmp = 0.0;
      	if (y < -4.618902267687042e-52)
      		tmp = t_0;
      	elseif (y < 1.038530535935153e-39)
      		tmp = ((cosh(x) * y) / x) / z;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision] * N[Cosh[x], $MachinePrecision]), $MachinePrecision]}, If[Less[y, -4.618902267687042e-52], t$95$0, If[Less[y, 1.038530535935153e-39], N[(N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{\frac{y}{z}}{x} \cdot \cosh x\\
      \mathbf{if}\;y < -4.618902267687042 \cdot 10^{-52}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y < 1.038530535935153 \cdot 10^{-39}:\\
      \;\;\;\;\frac{\frac{\cosh x \cdot y}{x}}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      

      Reproduce

      ?
      herbie shell --seed 2024195 
      (FPCore (x y z)
        :name "Linear.Quaternion:$ctan from linear-1.19.1.3"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< y -2309451133843521/5000000000000000000000000000000000000000000000000000000000000000000) (* (/ (/ y z) x) (cosh x)) (if (< y 1038530535935153/1000000000000000000000000000000000000000000000000000000) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x)))))
      
        (/ (* (cosh x) (/ y x)) z))