Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.8% → 99.5%
Time: 12.9s
Alternatives: 22
Speedup: 6.7×

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 22 alternatives:

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

Initial Program: 84.8% 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, 0.5× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\cosh x\_m \cdot \frac{y\_m}{x\_m}}{z\_m} \leq 4 \cdot 10^{-20}:\\
\;\;\;\;\frac{y\_m}{x\_m \cdot z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 3.99999999999999978e-20

    1. Initial program 95.4%

      \[\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 \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot z\right)}\right) \]
      2. *-lowering-*.f6458.6%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{z}\right)\right) \]
    5. Simplified58.6%

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

    if 3.99999999999999978e-20 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z)

    1. Initial program 79.9%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

Alternative 2: 99.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \cosh x\_m \cdot \frac{y\_m}{x\_m}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{+220}:\\
\;\;\;\;\frac{t\_0}{z\_m}\\

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


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

    1. Initial program 99.2%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing

    if 4e220 < (*.f64 (cosh.f64 x) (/.f64 y x))

    1. Initial program 71.8%

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

        \[\leadsto \frac{\frac{\cosh x \cdot y}{x}}{z} \]
      2. associate-/r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\cosh x}{x}}{z}\right), y\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right), y\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right), y\right) \]
      10. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right), y\right) \]
    4. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 4 \cdot 10^{+220}:\\ \;\;\;\;\frac{\cosh x \cdot \frac{y}{x}}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_0 := \frac{\cosh x\_m}{x\_m}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.3 \cdot 10^{-14}:\\ \;\;\;\;t\_0 \cdot \frac{y\_m}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \frac{t\_0}{z\_m}\\ \end{array}\right)\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (let* ((t_0 (/ (cosh x_m) x_m)))
   (*
    z_s
    (*
     y_s
     (* x_s (if (<= z_m 2.3e-14) (* t_0 (/ y_m z_m)) (* y_m (/ t_0 z_m))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double t_0 = cosh(x_m) / x_m;
	double tmp;
	if (z_m <= 2.3e-14) {
		tmp = t_0 * (y_m / z_m);
	} else {
		tmp = y_m * (t_0 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = cosh(x_m) / x_m
    if (z_m <= 2.3d-14) then
        tmp = t_0 * (y_m / z_m)
    else
        tmp = y_m * (t_0 / z_m)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double t_0 = Math.cosh(x_m) / x_m;
	double tmp;
	if (z_m <= 2.3e-14) {
		tmp = t_0 * (y_m / z_m);
	} else {
		tmp = y_m * (t_0 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	t_0 = math.cosh(x_m) / x_m
	tmp = 0
	if z_m <= 2.3e-14:
		tmp = t_0 * (y_m / z_m)
	else:
		tmp = y_m * (t_0 / z_m)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	t_0 = Float64(cosh(x_m) / x_m)
	tmp = 0.0
	if (z_m <= 2.3e-14)
		tmp = Float64(t_0 * Float64(y_m / z_m));
	else
		tmp = Float64(y_m * Float64(t_0 / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	t_0 = cosh(x_m) / x_m;
	tmp = 0.0;
	if (z_m <= 2.3e-14)
		tmp = t_0 * (y_m / z_m);
	else
		tmp = y_m * (t_0 / z_m);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := Block[{t$95$0 = N[(N[Cosh[x$95$m], $MachinePrecision] / x$95$m), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.3e-14], N[(t$95$0 * N[(y$95$m / z$95$m), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(t$95$0 / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_0 := \frac{\cosh x\_m}{x\_m}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.3 \cdot 10^{-14}:\\
\;\;\;\;t\_0 \cdot \frac{y\_m}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y\_m \cdot \frac{t\_0}{z\_m}\\


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.29999999999999998e-14

    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{\frac{\cosh x \cdot y}{x}}{z} \]
      2. associate-/r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\cosh x}{x}\right), \color{blue}{\left(\frac{y}{z}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), \left(\frac{\color{blue}{y}}{z}\right)\right) \]
      6. cosh-lowering-cosh.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), \left(\frac{y}{z}\right)\right) \]
      7. /-lowering-/.f6495.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right) \]
    4. Applied egg-rr95.4%

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

    if 2.29999999999999998e-14 < z

    1. Initial program 91.3%

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

        \[\leadsto \frac{\frac{\cosh x \cdot y}{x}}{z} \]
      2. associate-/r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\cosh x}{x}}{z}\right), y\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right), y\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right), y\right) \]
      10. cosh-lowering-cosh.f6499.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right), y\right) \]
    4. Applied egg-rr99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{\cosh x}{x} \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\cosh x}{x}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 96.5% accurate, 1.0× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 3.2 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 3.2000000000000002e-21

    1. Initial program 84.7%

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\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}\right)}, z\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(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)\right), x\right), z\right) \]
    7. Simplified93.1%

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

    if 3.2000000000000002e-21 < y

    1. Initial program 94.9%

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

        \[\leadsto \frac{\frac{\cosh x \cdot y}{x}}{z} \]
      2. associate-/r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\cosh x}{x}\right), \color{blue}{\left(\frac{y}{z}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), \left(\frac{\color{blue}{y}}{z}\right)\right) \]
      6. cosh-lowering-cosh.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), \left(\frac{y}{z}\right)\right) \]
      7. /-lowering-/.f6499.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right) \]
    4. Applied egg-rr99.9%

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

Alternative 5: 92.2% accurate, 2.1× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_0 := 0.5 + 0.041666666666666664 \cdot \left(x\_m \cdot x\_m\right)\\ t_1 := \left(x\_m \cdot x\_m\right) \cdot t\_0\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 1.65 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{\frac{y\_m \cdot \left(1 - x\_m \cdot \left(\left(x\_m \cdot t\_0\right) \cdot t\_1\right)\right)}{1 - t\_1}}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{z\_m}}{x\_m}\\ \end{array}\right)\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (let* ((t_0 (+ 0.5 (* 0.041666666666666664 (* x_m x_m))))
        (t_1 (* (* x_m x_m) t_0)))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= x_m 1.65e+72)
        (/
         (/ (/ (* y_m (- 1.0 (* x_m (* (* x_m t_0) t_1)))) (- 1.0 t_1)) z_m)
         x_m)
        (/
         (/ (* y_m (* 0.041666666666666664 (* x_m (* x_m (* x_m x_m))))) z_m)
         x_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double t_0 = 0.5 + (0.041666666666666664 * (x_m * x_m));
	double t_1 = (x_m * x_m) * t_0;
	double tmp;
	if (x_m <= 1.65e+72) {
		tmp = (((y_m * (1.0 - (x_m * ((x_m * t_0) * t_1)))) / (1.0 - t_1)) / z_m) / x_m;
	} else {
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 0.5d0 + (0.041666666666666664d0 * (x_m * x_m))
    t_1 = (x_m * x_m) * t_0
    if (x_m <= 1.65d+72) then
        tmp = (((y_m * (1.0d0 - (x_m * ((x_m * t_0) * t_1)))) / (1.0d0 - t_1)) / z_m) / x_m
    else
        tmp = ((y_m * (0.041666666666666664d0 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double t_0 = 0.5 + (0.041666666666666664 * (x_m * x_m));
	double t_1 = (x_m * x_m) * t_0;
	double tmp;
	if (x_m <= 1.65e+72) {
		tmp = (((y_m * (1.0 - (x_m * ((x_m * t_0) * t_1)))) / (1.0 - t_1)) / z_m) / x_m;
	} else {
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	t_0 = 0.5 + (0.041666666666666664 * (x_m * x_m))
	t_1 = (x_m * x_m) * t_0
	tmp = 0
	if x_m <= 1.65e+72:
		tmp = (((y_m * (1.0 - (x_m * ((x_m * t_0) * t_1)))) / (1.0 - t_1)) / z_m) / x_m
	else:
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	t_0 = Float64(0.5 + Float64(0.041666666666666664 * Float64(x_m * x_m)))
	t_1 = Float64(Float64(x_m * x_m) * t_0)
	tmp = 0.0
	if (x_m <= 1.65e+72)
		tmp = Float64(Float64(Float64(Float64(y_m * Float64(1.0 - Float64(x_m * Float64(Float64(x_m * t_0) * t_1)))) / Float64(1.0 - t_1)) / z_m) / x_m);
	else
		tmp = Float64(Float64(Float64(y_m * Float64(0.041666666666666664 * Float64(x_m * Float64(x_m * Float64(x_m * x_m))))) / z_m) / x_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	t_0 = 0.5 + (0.041666666666666664 * (x_m * x_m));
	t_1 = (x_m * x_m) * t_0;
	tmp = 0.0;
	if (x_m <= 1.65e+72)
		tmp = (((y_m * (1.0 - (x_m * ((x_m * t_0) * t_1)))) / (1.0 - t_1)) / z_m) / x_m;
	else
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := Block[{t$95$0 = N[(0.5 + N[(0.041666666666666664 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$95$m * x$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 1.65e+72], N[(N[(N[(N[(y$95$m * N[(1.0 - N[(x$95$m * N[(N[(x$95$m * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(N[(y$95$m * N[(0.041666666666666664 * N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_0 := 0.5 + 0.041666666666666664 \cdot \left(x\_m \cdot x\_m\right)\\
t_1 := \left(x\_m \cdot x\_m\right) \cdot t\_0\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.65 \cdot 10^{+72}:\\
\;\;\;\;\frac{\frac{\frac{y\_m \cdot \left(1 - x\_m \cdot \left(\left(x\_m \cdot t\_0\right) \cdot t\_1\right)\right)}{1 - t\_1}}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.65e72

    1. Initial program 89.7%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6490.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified90.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)} \cdot y}{z}}{x} \]
    8. Step-by-step derivation
      1. flip-+N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(x \cdot \frac{1}{24}\right)\right)\right) \cdot \left(\left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(x \cdot \frac{1}{24}\right)\right)\right)\right) \cdot y\right), \left(1 - \left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(x \cdot \frac{1}{24}\right)\right)\right)\right), z\right), x\right) \]
    9. Applied egg-rr68.8%

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

    if 1.65e72 < x

    1. Initial program 80.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified100.0%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{4}\right)\right), y\right), z\right), x\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{\left(2 \cdot 2\right)}\right)\right), y\right), z\right), x\right) \]
      3. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{2} \cdot {x}^{2}\right)\right), y\right), z\right), x\right) \]
      4. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot {x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left({x}^{3}\right)\right)\right), y\right), z\right), x\right) \]
      9. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      10. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), y\right), z\right), x\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      13. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), y\right), z\right), x\right) \]
    10. Simplified100.0%

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

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

Alternative 6: 94.9% accurate, 3.6× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 6 \cdot 10^{-20}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.00000000000000057e-20

    1. Initial program 84.7%

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\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}\right)}, z\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(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)\right), x\right), z\right) \]
    7. Simplified93.1%

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

    if 6.00000000000000057e-20 < y

    1. Initial program 94.9%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified99.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\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)}, y\right), z\right), x\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left({x}^{2}\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\left(x \cdot x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      16. *-lowering-*.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \frac{1}{720}\right)\right)\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified99.9%

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

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

Alternative 7: 94.2% accurate, 3.6× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 10^{+89}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 9.99999999999999995e88

    1. Initial program 86.4%

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\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}\right)}, z\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(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)\right), x\right), z\right) \]
    7. Simplified93.8%

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

    if 9.99999999999999995e88 < y

    1. Initial program 92.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified99.9%

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

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

Alternative 8: 94.2% accurate, 3.6× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 4.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{y\_m \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot \left(0.041666666666666664 + 0.001388888888888889 \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.5999999999999996e35

    1. Initial program 85.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1 + \left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(x \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)}{x}\right), y\right), z\right) \]
    6. Applied egg-rr93.3%

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

    if 4.5999999999999996e35 < y

    1. Initial program 94.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6498.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified98.4%

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

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

Alternative 9: 90.2% accurate, 3.6× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.65 \cdot 10^{+72}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot \left(0.041666666666666664 + 0.001388888888888889 \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)\right)}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.65e72

    1. Initial program 89.7%

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

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + \left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    5. Step-by-step derivation
      1. associate-/l/N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1 + \left(x \cdot x\right) \cdot \left(\frac{1}{2} + x \cdot \left(x \cdot \left(\frac{1}{24} + \left(x \cdot x\right) \cdot \frac{1}{720}\right)\right)\right)}{z}\right), \color{blue}{\left(\frac{y}{x}\right)}\right) \]
    6. Applied egg-rr86.1%

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

    if 1.65e72 < x

    1. Initial program 80.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified100.0%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{4}\right)\right), y\right), z\right), x\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{\left(2 \cdot 2\right)}\right)\right), y\right), z\right), x\right) \]
      3. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{2} \cdot {x}^{2}\right)\right), y\right), z\right), x\right) \]
      4. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot {x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left({x}^{3}\right)\right)\right), y\right), z\right), x\right) \]
      9. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      10. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), y\right), z\right), x\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      13. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), y\right), z\right), x\right) \]
    10. Simplified100.0%

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

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

Alternative 10: 66.4% accurate, 5.1× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 6 \cdot 10^{-45}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{elif}\;x\_m \leq 3.3 \cdot 10^{+111}:\\ \;\;\;\;y\_m \cdot \frac{\frac{1}{x\_m} + x\_m \cdot 0.5}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \left(x\_m \cdot y\_m\right)}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 6e-45)
      (/ (/ y_m z_m) x_m)
      (if (<= x_m 3.3e+111)
        (* y_m (/ (+ (/ 1.0 x_m) (* x_m 0.5)) z_m))
        (/ (* 0.5 (* x_m y_m)) z_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 6e-45) {
		tmp = (y_m / z_m) / x_m;
	} else if (x_m <= 3.3e+111) {
		tmp = y_m * (((1.0 / x_m) + (x_m * 0.5)) / z_m);
	} else {
		tmp = (0.5 * (x_m * y_m)) / z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 6d-45) then
        tmp = (y_m / z_m) / x_m
    else if (x_m <= 3.3d+111) then
        tmp = y_m * (((1.0d0 / x_m) + (x_m * 0.5d0)) / z_m)
    else
        tmp = (0.5d0 * (x_m * y_m)) / z_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 6e-45) {
		tmp = (y_m / z_m) / x_m;
	} else if (x_m <= 3.3e+111) {
		tmp = y_m * (((1.0 / x_m) + (x_m * 0.5)) / z_m);
	} else {
		tmp = (0.5 * (x_m * y_m)) / z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 6e-45:
		tmp = (y_m / z_m) / x_m
	elif x_m <= 3.3e+111:
		tmp = y_m * (((1.0 / x_m) + (x_m * 0.5)) / z_m)
	else:
		tmp = (0.5 * (x_m * y_m)) / z_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 6e-45)
		tmp = Float64(Float64(y_m / z_m) / x_m);
	elseif (x_m <= 3.3e+111)
		tmp = Float64(y_m * Float64(Float64(Float64(1.0 / x_m) + Float64(x_m * 0.5)) / z_m));
	else
		tmp = Float64(Float64(0.5 * Float64(x_m * y_m)) / z_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 6e-45)
		tmp = (y_m / z_m) / x_m;
	elseif (x_m <= 3.3e+111)
		tmp = y_m * (((1.0 / x_m) + (x_m * 0.5)) / z_m);
	else
		tmp = (0.5 * (x_m * y_m)) / z_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 6e-45], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], If[LessEqual[x$95$m, 3.3e+111], N[(y$95$m * N[(N[(N[(1.0 / x$95$m), $MachinePrecision] + N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 6 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\

\mathbf{elif}\;x\_m \leq 3.3 \cdot 10^{+111}:\\
\;\;\;\;y\_m \cdot \frac{\frac{1}{x\_m} + x\_m \cdot 0.5}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 6.00000000000000022e-45

    1. Initial program 89.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6464.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified64.7%

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

    if 6.00000000000000022e-45 < x < 3.3000000000000001e111

    1. Initial program 88.5%

      \[\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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{x \cdot z} + 1 \cdot \left(\left(\frac{1}{2} \cdot \frac{y}{z}\right) \cdot x\right) \]
    5. Simplified33.4%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, x\right), \left(x \cdot \frac{1}{2}\right)\right), z\right)\right) \]
      7. *-lowering-*.f6451.6%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1, x\right), \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right), z\right)\right) \]
    7. Applied egg-rr51.6%

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

    if 3.3000000000000001e111 < x

    1. Initial program 79.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), y\right), z\right), x\right) \]
      4. *-lowering-*.f6493.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified93.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(y \cdot {x}^{2}\right) \cdot \frac{\frac{1}{2}}{z}\right), x\right) \]
      5. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left({x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right)\right)\right), x\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left({x}^{2} \cdot \frac{\frac{1}{2} \cdot 1}{z}\right)\right), x\right) \]
      10. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\frac{\frac{1}{2} \cdot {x}^{2}}{z}\right)\right), x\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x}^{2}\right), z\right)\right), x\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right), z\right)\right), x\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right), z\right)\right), x\right) \]
      16. *-lowering-*.f6489.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right), z\right)\right), x\right) \]
    10. Simplified89.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot x\right)\right), z\right) \]
      5. *-lowering-*.f6458.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, x\right)\right), z\right) \]
    13. Simplified58.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{-45}:\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+111}:\\ \;\;\;\;y \cdot \frac{\frac{1}{x} + x \cdot 0.5}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \left(x \cdot y\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 88.8% accurate, 5.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3.7:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(1 + 0.5 \cdot \left(x\_m \cdot x\_m\right)\right)}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{z\_m}}{x\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 3.7)
      (/ (/ (* y_m (+ 1.0 (* 0.5 (* x_m x_m)))) z_m) x_m)
      (/
       (/ (* y_m (* 0.041666666666666664 (* x_m (* x_m (* x_m x_m))))) z_m)
       x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = ((y_m * (1.0 + (0.5 * (x_m * x_m)))) / z_m) / x_m;
	} else {
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 3.7d0) then
        tmp = ((y_m * (1.0d0 + (0.5d0 * (x_m * x_m)))) / z_m) / x_m
    else
        tmp = ((y_m * (0.041666666666666664d0 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = ((y_m * (1.0 + (0.5 * (x_m * x_m)))) / z_m) / x_m;
	} else {
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 3.7:
		tmp = ((y_m * (1.0 + (0.5 * (x_m * x_m)))) / z_m) / x_m
	else:
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 3.7)
		tmp = Float64(Float64(Float64(y_m * Float64(1.0 + Float64(0.5 * Float64(x_m * x_m)))) / z_m) / x_m);
	else
		tmp = Float64(Float64(Float64(y_m * Float64(0.041666666666666664 * Float64(x_m * Float64(x_m * Float64(x_m * x_m))))) / z_m) / x_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 3.7)
		tmp = ((y_m * (1.0 + (0.5 * (x_m * x_m)))) / z_m) / x_m;
	else
		tmp = ((y_m * (0.041666666666666664 * (x_m * (x_m * (x_m * x_m))))) / z_m) / x_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 3.7], N[(N[(N[(y$95$m * N[(1.0 + N[(0.5 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(N[(y$95$m * N[(0.041666666666666664 * N[(x$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 3.7:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + 0.5 \cdot \left(x\_m \cdot x\_m\right)\right)}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.7000000000000002

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), y\right), z\right), x\right) \]
      4. *-lowering-*.f6488.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified88.8%

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

    if 3.7000000000000002 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified91.3%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{4}\right)\right), y\right), z\right), x\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{\left(2 \cdot 2\right)}\right)\right), y\right), z\right), x\right) \]
      3. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{2} \cdot {x}^{2}\right)\right), y\right), z\right), x\right) \]
      4. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot {x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(x \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left({x}^{3}\right)\right)\right), y\right), z\right), x\right) \]
      9. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      10. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), y\right), z\right), x\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), y\right), z\right), x\right) \]
      13. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), y\right), z\right), x\right) \]
    10. Simplified91.3%

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

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

Alternative 12: 88.8% accurate, 5.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)}{z\_m}}{x\_m}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (/
     (/
      (*
       y_m
       (+ 1.0 (* (* x_m x_m) (+ 0.5 (* x_m (* x_m 0.041666666666666664))))))
      z_m)
     x_m)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	return z_s * (y_s * (x_s * (((y_m * (1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664)))))) / z_m) / x_m)));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    code = z_s * (y_s * (x_s * (((y_m * (1.0d0 + ((x_m * x_m) * (0.5d0 + (x_m * (x_m * 0.041666666666666664d0)))))) / z_m) / x_m)))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	return z_s * (y_s * (x_s * (((y_m * (1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664)))))) / z_m) / x_m)));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	return z_s * (y_s * (x_s * (((y_m * (1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664)))))) / z_m) / x_m)))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(Float64(y_m * Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(x_m * Float64(x_m * 0.041666666666666664)))))) / z_m) / x_m))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = z_s * (y_s * (x_s * (((y_m * (1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664)))))) / z_m) / x_m)));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(N[(N[(y$95$m * N[(1.0 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.5 + N[(x$95$m * N[(x$95$m * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)}{z\_m}}{x\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 87.6%

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
    9. cosh-lowering-cosh.f6498.0%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
  3. Simplified98.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    11. *-lowering-*.f6492.2%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
  7. Simplified92.2%

    \[\leadsto \frac{\frac{\color{blue}{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)} \cdot y}{z}}{x} \]
  8. Final simplification92.2%

    \[\leadsto \frac{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)}{z}}{x} \]
  9. Add Preprocessing

Alternative 13: 86.6% accurate, 5.9× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.3 \cdot 10^{+27}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + 0.5 \cdot \left(x\_m \cdot x\_m\right)\right)}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.30000000000000004e27

    1. Initial program 89.7%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), y\right), z\right), x\right) \]
      4. *-lowering-*.f6488.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified88.4%

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

    if 1.30000000000000004e27 < x

    1. Initial program 81.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6492.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified92.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(x \cdot \left({x}^{2} \cdot y\right)\right)\right), z\right) \]
      10. associate-*l*N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot y\right)\right), z\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left({x}^{3} \cdot y\right)\right), z\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left({x}^{3}\right)\right)\right), z\right) \]
      16. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), z\right) \]
      17. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), z\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), z\right) \]
      20. *-lowering-*.f6489.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), z\right) \]
    10. Simplified89.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \frac{1}{24}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), z\right)\right) \]
      8. *-lowering-*.f6488.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \frac{1}{24}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), z\right)\right) \]
    12. Applied egg-rr88.1%

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

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

Alternative 14: 86.4% accurate, 5.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3.7:\\ \;\;\;\;\left(1 + 0.5 \cdot \left(x\_m \cdot x\_m\right)\right) \cdot \frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot \frac{0.041666666666666664}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 3.7)
      (* (+ 1.0 (* 0.5 (* x_m x_m))) (/ (/ y_m z_m) x_m))
      (* (* y_m (* x_m (* x_m x_m))) (/ 0.041666666666666664 z_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = (1.0 + (0.5 * (x_m * x_m))) * ((y_m / z_m) / x_m);
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 3.7d0) then
        tmp = (1.0d0 + (0.5d0 * (x_m * x_m))) * ((y_m / z_m) / x_m)
    else
        tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664d0 / z_m)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = (1.0 + (0.5 * (x_m * x_m))) * ((y_m / z_m) / x_m);
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 3.7:
		tmp = (1.0 + (0.5 * (x_m * x_m))) * ((y_m / z_m) / x_m)
	else:
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 3.7)
		tmp = Float64(Float64(1.0 + Float64(0.5 * Float64(x_m * x_m))) * Float64(Float64(y_m / z_m) / x_m));
	else
		tmp = Float64(Float64(y_m * Float64(x_m * Float64(x_m * x_m))) * Float64(0.041666666666666664 / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 3.7)
		tmp = (1.0 + (0.5 * (x_m * x_m))) * ((y_m / z_m) / x_m);
	else
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 3.7], N[(N[(1.0 + N[(0.5 * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 3.7:\\
\;\;\;\;\left(1 + 0.5 \cdot \left(x\_m \cdot x\_m\right)\right) \cdot \frac{\frac{y\_m}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.7000000000000002

    1. Initial program 89.6%

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

        \[\leadsto \frac{\frac{\cosh x \cdot y}{x}}{z} \]
      2. associate-/r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\cosh x}{x}}{z}\right), y\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right), y\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right), y\right) \]
      10. cosh-lowering-cosh.f6493.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right), y\right) \]
    4. Applied egg-rr93.9%

      \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z} \cdot y} \]
    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{\frac{{x}^{2} \cdot y}{z} \cdot \frac{1}{2} + \frac{y}{z}}{x} \]
      2. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({x}^{2}\right)}\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot \color{blue}{x}\right)\right)\right)\right) \]
      19. *-lowering-*.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right)\right) \]
    7. Simplified79.0%

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

    if 3.7000000000000002 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(x \cdot \left({x}^{2} \cdot y\right)\right)\right), z\right) \]
      10. associate-*l*N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot y\right)\right), z\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left({x}^{3} \cdot y\right)\right), z\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left({x}^{3}\right)\right)\right), z\right) \]
      16. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), z\right) \]
      17. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), z\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), z\right) \]
      20. *-lowering-*.f6488.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), z\right) \]
    10. Simplified88.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{\frac{1}{24}}{z}\right)\right) \]
      7. /-lowering-/.f6488.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(\frac{1}{24}, \color{blue}{z}\right)\right) \]
    12. Applied egg-rr88.3%

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

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

Alternative 15: 86.4% accurate, 6.7× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3.7:\\ \;\;\;\;\frac{y\_m}{z\_m} \cdot \left(\frac{1}{x\_m} + x\_m \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot \frac{0.041666666666666664}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 3.7)
      (* (/ y_m z_m) (+ (/ 1.0 x_m) (* x_m 0.5)))
      (* (* y_m (* x_m (* x_m x_m))) (/ 0.041666666666666664 z_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = (y_m / z_m) * ((1.0 / x_m) + (x_m * 0.5));
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 3.7d0) then
        tmp = (y_m / z_m) * ((1.0d0 / x_m) + (x_m * 0.5d0))
    else
        tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664d0 / z_m)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 3.7) {
		tmp = (y_m / z_m) * ((1.0 / x_m) + (x_m * 0.5));
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 3.7:
		tmp = (y_m / z_m) * ((1.0 / x_m) + (x_m * 0.5))
	else:
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 3.7)
		tmp = Float64(Float64(y_m / z_m) * Float64(Float64(1.0 / x_m) + Float64(x_m * 0.5)));
	else
		tmp = Float64(Float64(y_m * Float64(x_m * Float64(x_m * x_m))) * Float64(0.041666666666666664 / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 3.7)
		tmp = (y_m / z_m) * ((1.0 / x_m) + (x_m * 0.5));
	else
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 3.7], N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(N[(1.0 / x$95$m), $MachinePrecision] + N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 3.7:\\
\;\;\;\;\frac{y\_m}{z\_m} \cdot \left(\frac{1}{x\_m} + x\_m \cdot 0.5\right)\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.7000000000000002

    1. Initial program 89.6%

      \[\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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{x \cdot z} + 1 \cdot \left(\left(\frac{1}{2} \cdot \frac{y}{z}\right) \cdot x\right) \]
    5. Simplified74.2%

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

    if 3.7000000000000002 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(x \cdot \left({x}^{2} \cdot y\right)\right)\right), z\right) \]
      10. associate-*l*N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot y\right)\right), z\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left({x}^{3} \cdot y\right)\right), z\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left({x}^{3}\right)\right)\right), z\right) \]
      16. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), z\right) \]
      17. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), z\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), z\right) \]
      20. *-lowering-*.f6488.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), z\right) \]
    10. Simplified88.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{\frac{1}{24}}{z}\right)\right) \]
      7. /-lowering-/.f6488.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(\frac{1}{24}, \color{blue}{z}\right)\right) \]
    12. Applied egg-rr88.3%

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

Alternative 16: 86.2% accurate, 6.7× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 2.2:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right) \cdot \frac{0.041666666666666664}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 2.2)
      (/ (/ y_m z_m) x_m)
      (* (* y_m (* x_m (* x_m x_m))) (/ 0.041666666666666664 z_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 2.2) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 2.2d0) then
        tmp = (y_m / z_m) / x_m
    else
        tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664d0 / z_m)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 2.2) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 2.2:
		tmp = (y_m / z_m) / x_m
	else:
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 2.2)
		tmp = Float64(Float64(y_m / z_m) / x_m);
	else
		tmp = Float64(Float64(y_m * Float64(x_m * Float64(x_m * x_m))) * Float64(0.041666666666666664 / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 2.2)
		tmp = (y_m / z_m) / x_m;
	else
		tmp = (y_m * (x_m * (x_m * x_m))) * (0.041666666666666664 / z_m);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 2.2], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 2.2:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.2000000000000002

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified65.4%

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

    if 2.2000000000000002 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(x \cdot \left({x}^{2} \cdot y\right)\right)\right), z\right) \]
      10. associate-*l*N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot y\right)\right), z\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left({x}^{3} \cdot y\right)\right), z\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left({x}^{3}\right)\right)\right), z\right) \]
      16. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), z\right) \]
      17. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), z\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), z\right) \]
      20. *-lowering-*.f6488.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), z\right) \]
    10. Simplified88.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{\frac{1}{24}}{z}\right)\right) \]
      7. /-lowering-/.f6488.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(\frac{1}{24}, \color{blue}{z}\right)\right) \]
    12. Applied egg-rr88.3%

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

Alternative 17: 86.5% accurate, 6.7× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 2.2:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(y\_m \cdot 0.041666666666666664\right) \cdot \frac{x\_m \cdot \left(x\_m \cdot x\_m\right)}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= x_m 2.2)
      (/ (/ y_m z_m) x_m)
      (* (* y_m 0.041666666666666664) (/ (* x_m (* x_m x_m)) z_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 2.2) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m * 0.041666666666666664) * ((x_m * (x_m * x_m)) / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 2.2d0) then
        tmp = (y_m / z_m) / x_m
    else
        tmp = (y_m * 0.041666666666666664d0) * ((x_m * (x_m * x_m)) / z_m)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 2.2) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m * 0.041666666666666664) * ((x_m * (x_m * x_m)) / z_m);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 2.2:
		tmp = (y_m / z_m) / x_m
	else:
		tmp = (y_m * 0.041666666666666664) * ((x_m * (x_m * x_m)) / z_m)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 2.2)
		tmp = Float64(Float64(y_m / z_m) / x_m);
	else
		tmp = Float64(Float64(y_m * 0.041666666666666664) * Float64(Float64(x_m * Float64(x_m * x_m)) / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 2.2)
		tmp = (y_m / z_m) / x_m;
	else
		tmp = (y_m * 0.041666666666666664) * ((x_m * (x_m * x_m)) / z_m);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 2.2], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(y$95$m * 0.041666666666666664), $MachinePrecision] * N[(N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 2.2:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.2000000000000002

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified65.4%

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

    if 2.2000000000000002 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \left(x \cdot \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
      11. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{24}\right)\right)\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified91.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(x \cdot \left({x}^{2} \cdot y\right)\right)\right), z\right) \]
      10. associate-*l*N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot y\right)\right), z\right) \]
      12. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{24} \cdot \left({x}^{3} \cdot y\right)\right), z\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left({x}^{3}\right)\right)\right), z\right) \]
      16. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \left(x \cdot \left(x \cdot x\right)\right)\right)\right), z\right) \]
      17. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left({x}^{2}\right)\right)\right)\right), z\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(x \cdot x\right)\right)\right)\right), z\right) \]
      20. *-lowering-*.f6488.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right)\right)\right), z\right) \]
    10. Simplified88.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \frac{1}{24}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), z\right)\right) \]
      8. *-lowering-*.f6486.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, \frac{1}{24}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), z\right)\right) \]
    12. Applied egg-rr86.9%

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

Alternative 18: 65.9% accurate, 8.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 1.4:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5 \cdot \left(x\_m \cdot y\_m\right)}{z\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (* x_s (if (<= x_m 1.4) (/ (/ y_m z_m) x_m) (/ (* 0.5 (* x_m y_m)) z_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 1.4) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (0.5 * (x_m * y_m)) / z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 1.4d0) then
        tmp = (y_m / z_m) / x_m
    else
        tmp = (0.5d0 * (x_m * y_m)) / z_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 1.4) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (0.5 * (x_m * y_m)) / z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 1.4:
		tmp = (y_m / z_m) / x_m
	else:
		tmp = (0.5 * (x_m * y_m)) / z_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 1.4)
		tmp = Float64(Float64(y_m / z_m) / x_m);
	else
		tmp = Float64(Float64(0.5 * Float64(x_m * y_m)) / z_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 1.4)
		tmp = (y_m / z_m) / x_m;
	else
		tmp = (0.5 * (x_m * y_m)) / z_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 1.4], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(0.5 * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.4:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.3999999999999999

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified65.4%

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

    if 1.3999999999999999 < x

    1. Initial program 81.8%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified100.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), y\right), z\right), x\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), y\right), z\right), x\right) \]
      4. *-lowering-*.f6473.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), y\right), z\right), x\right) \]
    7. Simplified73.7%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(y \cdot {x}^{2}\right) \cdot \frac{\frac{1}{2}}{z}\right), x\right) \]
      5. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot \left({x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right)\right)\right), x\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left({x}^{2} \cdot \frac{\frac{1}{2} \cdot 1}{z}\right)\right), x\right) \]
      10. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \left(\frac{\frac{1}{2} \cdot {x}^{2}}{z}\right)\right), x\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x}^{2}\right), z\right)\right), x\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right), z\right)\right), x\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right), z\right)\right), x\right) \]
      16. *-lowering-*.f6476.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right), z\right)\right), x\right) \]
    10. Simplified76.5%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot x\right)\right), z\right) \]
      5. *-lowering-*.f6446.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, x\right)\right), z\right) \]
    13. Simplified46.1%

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

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

Alternative 19: 62.1% accurate, 8.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 1.4:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{y\_m}{z\_m} \cdot \left(x\_m \cdot 0.5\right)\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (* x_s (if (<= x_m 1.4) (/ (/ y_m z_m) x_m) (* (/ y_m z_m) (* x_m 0.5)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 1.4) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m / z_m) * (x_m * 0.5);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (x_m <= 1.4d0) then
        tmp = (y_m / z_m) / x_m
    else
        tmp = (y_m / z_m) * (x_m * 0.5d0)
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (x_m <= 1.4) {
		tmp = (y_m / z_m) / x_m;
	} else {
		tmp = (y_m / z_m) * (x_m * 0.5);
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if x_m <= 1.4:
		tmp = (y_m / z_m) / x_m
	else:
		tmp = (y_m / z_m) * (x_m * 0.5)
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (x_m <= 1.4)
		tmp = Float64(Float64(y_m / z_m) / x_m);
	else
		tmp = Float64(Float64(y_m / z_m) * Float64(x_m * 0.5));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (x_m <= 1.4)
		tmp = (y_m / z_m) / x_m;
	else
		tmp = (y_m / z_m) * (x_m * 0.5);
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[x$95$m, 1.4], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 1.4:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.3999999999999999

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified97.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified65.4%

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

    if 1.3999999999999999 < x

    1. Initial program 81.8%

      \[\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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{x \cdot z} + 1 \cdot \left(\left(\frac{1}{2} \cdot \frac{y}{z}\right) \cdot x\right) \]
    5. Simplified36.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, z\right), \left(x \cdot \color{blue}{\frac{1}{2}}\right)\right) \]
      2. *-lowering-*.f6436.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, z\right), \mathsf{*.f64}\left(x, \color{blue}{\frac{1}{2}}\right)\right) \]
    8. Simplified36.1%

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

Alternative 20: 56.5% accurate, 10.7× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;y\_m \leq 15500000000:\\ \;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m}}{x\_m}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= y_m 15500000000.0) (/ (/ y_m x_m) z_m) (/ (/ y_m z_m) x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (y_m <= 15500000000.0) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = (y_m / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8) :: tmp
    if (y_m <= 15500000000.0d0) then
        tmp = (y_m / x_m) / z_m
    else
        tmp = (y_m / z_m) / x_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	double tmp;
	if (y_m <= 15500000000.0) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = (y_m / z_m) / x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	tmp = 0
	if y_m <= 15500000000.0:
		tmp = (y_m / x_m) / z_m
	else:
		tmp = (y_m / z_m) / x_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0
	if (y_m <= 15500000000.0)
		tmp = Float64(Float64(y_m / x_m) / z_m);
	else
		tmp = Float64(Float64(y_m / z_m) / x_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = 0.0;
	if (y_m <= 15500000000.0)
		tmp = (y_m / x_m) / z_m;
	else
		tmp = (y_m / z_m) / x_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[y$95$m, 15500000000.0], N[(N[(y$95$m / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(N[(y$95$m / z$95$m), $MachinePrecision] / x$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 15500000000:\\
\;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.55e10

    1. Initial program 85.4%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{x}\right)}, z\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6447.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified47.8%

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

    if 1.55e10 < y

    1. Initial program 94.3%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \cosh x}{z}\right), x\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\cosh x \cdot y}{z}\right), x\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\cosh x \cdot y\right), z\right), x\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\cosh x, y\right), z\right), x\right) \]
      9. cosh-lowering-cosh.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cosh.f64}\left(x\right), y\right), z\right), x\right) \]
    3. Simplified99.9%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{z}\right)}, x\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6461.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    7. Simplified61.1%

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

Alternative 21: 51.8% accurate, 10.7× speedup?

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

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 2.4 \cdot 10^{+116}:\\
\;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.4e116

    1. Initial program 86.7%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{x}\right)}, z\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6448.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified48.9%

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

    if 2.4e116 < y

    1. Initial program 91.9%

      \[\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 \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot z\right)}\right) \]
      2. *-lowering-*.f6443.2%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{z}\right)\right) \]
    5. Simplified43.2%

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

Alternative 22: 48.8% accurate, 21.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{y\_m}{x\_m \cdot z\_m}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s y_s x_s x_m y_m z_m)
 :precision binary64
 (* z_s (* y_s (* x_s (/ y_m (* x_m z_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	return z_s * (y_s * (x_s * (y_m / (x_m * z_m))));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    code = z_s * (y_s * (x_s * (y_m / (x_m * z_m))))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m) {
	return z_s * (y_s * (x_s * (y_m / (x_m * z_m))));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, y_s, x_s, x_m, y_m, z_m):
	return z_s * (y_s * (x_s * (y_m / (x_m * z_m))))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, y_s, x_s, x_m, y_m, z_m)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(y_m / Float64(x_m * z_m)))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m)
	tmp = z_s * (y_s * (x_s * (y_m / (x_m * z_m))));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
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_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(y$95$m / N[(x$95$m * z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{y\_m}{x\_m \cdot z\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 87.6%

    \[\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 \mathsf{/.f64}\left(y, \color{blue}{\left(x \cdot z\right)}\right) \]
    2. *-lowering-*.f6445.0%

      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{z}\right)\right) \]
  5. Simplified45.0%

    \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
  6. Add Preprocessing

Developer Target 1: 97.0% 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 2024145 
(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))