Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.4% → 99.2%
Time: 14.8s
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.4% 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.2% 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 10^{+290}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \frac{\frac{\cosh x\_m}{x\_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 (<= (/ (* (cosh x_m) (/ y_m x_m)) z_m) 1e+290)
      (/
       (/
        (*
         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 (/ (/ (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 tmp;
	if (((cosh(x_m) * (y_m / x_m)) / z_m) <= 1e+290) {
		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 * ((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) :: tmp
    if (((cosh(x_m) * (y_m / x_m)) / z_m) <= 1d+290) 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 * ((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 tmp;
	if (((Math.cosh(x_m) * (y_m / x_m)) / z_m) <= 1e+290) {
		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 * ((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):
	tmp = 0
	if ((math.cosh(x_m) * (y_m / x_m)) / z_m) <= 1e+290:
		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 * ((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)
	tmp = 0.0
	if (Float64(Float64(cosh(x_m) * Float64(y_m / x_m)) / z_m) <= 1e+290)
		tmp = Float64(Float64(Float64(y_m * Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(Float64(x_m * x_m) * Float64(0.041666666666666664 + Float64(x_m * Float64(x_m * 0.001388888888888889)))))))) / x_m) / 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)
	tmp = 0.0;
	if (((cosh(x_m) * (y_m / x_m)) / z_m) <= 1e+290)
		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 * ((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_] := 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], 1e+290], N[(N[(N[(y$95$m * N[(1.0 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.5 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.041666666666666664 + N[(x$95$m * N[(x$95$m * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / 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)

\\
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 10^{+290}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{x\_m}}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y\_m \cdot \frac{\frac{\cosh x\_m}{x\_m}}{z\_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) < 1.00000000000000006e290

    1. Initial program 95.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if 1.00000000000000006e290 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z)

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.2% accurate, 3.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 := 1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;y\_m \leq 3.2 \cdot 10^{-148}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(t\_0 + x\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{elif}\;y\_m \leq 1.12 \cdot 10^{+115}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(t\_0 + x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{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 (+ 1.0 (* x_m (* x_m 0.5)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= y_m 3.2e-148)
        (/
         (/
          (* y_m (+ t_0 (* x_m (* 0.041666666666666664 (* x_m (* x_m x_m))))))
          x_m)
         z_m)
        (if (<= y_m 1.12e+115)
          (*
           (/ y_m x_m)
           (/
            (+
             1.0
             (*
              x_m
              (*
               x_m
               (+
                0.5
                (*
                 (* x_m x_m)
                 (+
                  0.041666666666666664
                  (* x_m (* x_m 0.001388888888888889))))))))
            z_m))
          (/
           (*
            (/ y_m z_m)
            (+ t_0 (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))))
           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 = 1.0 + (x_m * (x_m * 0.5));
	double tmp;
	if (y_m <= 3.2e-148) {
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	} else if (y_m <= 1.12e+115) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * (0.5 + ((x_m * x_m) * (0.041666666666666664 + (x_m * (x_m * 0.001388888888888889)))))))) / z_m);
	} else {
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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) :: tmp
    t_0 = 1.0d0 + (x_m * (x_m * 0.5d0))
    if (y_m <= 3.2d-148) then
        tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664d0 * (x_m * (x_m * x_m)))))) / x_m) / z_m
    else if (y_m <= 1.12d+115) then
        tmp = (y_m / x_m) * ((1.0d0 + (x_m * (x_m * (0.5d0 + ((x_m * x_m) * (0.041666666666666664d0 + (x_m * (x_m * 0.001388888888888889d0)))))))) / z_m)
    else
        tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0))))) / 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 = 1.0 + (x_m * (x_m * 0.5));
	double tmp;
	if (y_m <= 3.2e-148) {
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	} else if (y_m <= 1.12e+115) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * (0.5 + ((x_m * x_m) * (0.041666666666666664 + (x_m * (x_m * 0.001388888888888889)))))))) / z_m);
	} else {
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 = 1.0 + (x_m * (x_m * 0.5))
	tmp = 0
	if y_m <= 3.2e-148:
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m
	elif y_m <= 1.12e+115:
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * (0.5 + ((x_m * x_m) * (0.041666666666666664 + (x_m * (x_m * 0.001388888888888889)))))))) / z_m)
	else:
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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(1.0 + Float64(x_m * Float64(x_m * 0.5)))
	tmp = 0.0
	if (y_m <= 3.2e-148)
		tmp = Float64(Float64(Float64(y_m * Float64(t_0 + Float64(x_m * Float64(0.041666666666666664 * Float64(x_m * Float64(x_m * x_m)))))) / x_m) / z_m);
	elseif (y_m <= 1.12e+115)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * Float64(0.5 + Float64(Float64(x_m * x_m) * Float64(0.041666666666666664 + Float64(x_m * Float64(x_m * 0.001388888888888889)))))))) / z_m));
	else
		tmp = Float64(Float64(Float64(y_m / z_m) * Float64(t_0 + Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664))))) / 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 = 1.0 + (x_m * (x_m * 0.5));
	tmp = 0.0;
	if (y_m <= 3.2e-148)
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	elseif (y_m <= 1.12e+115)
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * (0.5 + ((x_m * x_m) * (0.041666666666666664 + (x_m * (x_m * 0.001388888888888889)))))))) / z_m);
	else
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[y$95$m, 3.2e-148], N[(N[(N[(y$95$m * N[(t$95$0 + N[(x$95$m * N[(0.041666666666666664 * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], If[LessEqual[y$95$m, 1.12e+115], 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[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.041666666666666664 + N[(x$95$m * N[(x$95$m * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(t$95$0 + N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 3.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(t\_0 + x\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{x\_m}}{z\_m}\\

\mathbf{elif}\;y\_m \leq 1.12 \cdot 10^{+115}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{z\_m}\\

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


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

    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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999993e-148 < y < 1.12e115

    1. Initial program 91.8%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    6. 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} + \left(x \cdot x\right) \cdot \left(\frac{1}{24} + x \cdot \left(x \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} + \left(x \cdot x\right) \cdot \left(\frac{1}{24} + x \cdot \left(x \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} + \left(x \cdot x\right) \cdot \left(\frac{1}{24} + x \cdot \left(x \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} + \left(x \cdot x\right) \cdot \left(\frac{1}{24} + x \cdot \left(x \cdot \frac{1}{720}\right)\right)\right)}{z}\right), \color{blue}{\left(\frac{y}{x}\right)}\right) \]
    7. Applied egg-rr91.7%

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

    if 1.12e115 < y

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.1% 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 1.12 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(\left(1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\right) + x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{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 1.12e+115)
      (/
       (/
        (*
         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 z_m)
        (+
         (+ 1.0 (* x_m (* x_m 0.5)))
         (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))))
       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 <= 1.12e+115) {
		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 / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.12d+115) 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 / z_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0))))) / 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 <= 1.12e+115) {
		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 / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.12e+115:
		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 / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.12e+115)
		tmp = Float64(Float64(Float64(y_m * Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(Float64(x_m * x_m) * Float64(0.041666666666666664 + Float64(x_m * Float64(x_m * 0.001388888888888889)))))))) / x_m) / z_m);
	else
		tmp = Float64(Float64(Float64(y_m / z_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) + Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.12e+115)
		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 / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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, 1.12e+115], N[(N[(N[(y$95$m * N[(1.0 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.5 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.041666666666666664 + N[(x$95$m * N[(x$95$m * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 1.12 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot \left(0.041666666666666664 + x\_m \cdot \left(x\_m \cdot 0.001388888888888889\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


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

    1. Initial program 86.3%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if 1.12e115 < y

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 90.5% accurate, 3.8× 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 := 1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;y\_m \leq 1.12 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(t\_0 + x\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(t\_0 + x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{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 (+ 1.0 (* x_m (* x_m 0.5)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= y_m 1.12e+115)
        (/
         (/
          (* y_m (+ t_0 (* x_m (* 0.041666666666666664 (* x_m (* x_m x_m))))))
          x_m)
         z_m)
        (/
         (*
          (/ y_m z_m)
          (+ t_0 (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))))
         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 = 1.0 + (x_m * (x_m * 0.5));
	double tmp;
	if (y_m <= 1.12e+115) {
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	} else {
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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) :: tmp
    t_0 = 1.0d0 + (x_m * (x_m * 0.5d0))
    if (y_m <= 1.12d+115) then
        tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664d0 * (x_m * (x_m * x_m)))))) / x_m) / z_m
    else
        tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0))))) / 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 = 1.0 + (x_m * (x_m * 0.5));
	double tmp;
	if (y_m <= 1.12e+115) {
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	} else {
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 = 1.0 + (x_m * (x_m * 0.5))
	tmp = 0
	if y_m <= 1.12e+115:
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m
	else:
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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(1.0 + Float64(x_m * Float64(x_m * 0.5)))
	tmp = 0.0
	if (y_m <= 1.12e+115)
		tmp = Float64(Float64(Float64(y_m * Float64(t_0 + Float64(x_m * Float64(0.041666666666666664 * Float64(x_m * Float64(x_m * x_m)))))) / x_m) / z_m);
	else
		tmp = Float64(Float64(Float64(y_m / z_m) * Float64(t_0 + Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664))))) / 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 = 1.0 + (x_m * (x_m * 0.5));
	tmp = 0.0;
	if (y_m <= 1.12e+115)
		tmp = ((y_m * (t_0 + (x_m * (0.041666666666666664 * (x_m * (x_m * x_m)))))) / x_m) / z_m;
	else
		tmp = ((y_m / z_m) * (t_0 + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[y$95$m, 1.12e+115], N[(N[(N[(y$95$m * N[(t$95$0 + N[(x$95$m * N[(0.041666666666666664 * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(t$95$0 + N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 1.12 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(t\_0 + x\_m \cdot \left(0.041666666666666664 \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


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

    1. Initial program 86.3%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.12e115 < y

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 90.5% accurate, 3.8× 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 1.25 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(\left(1 + x\_m \cdot \left(x\_m \cdot 0.5\right)\right) + x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{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 1.25e+115)
      (/
       (/
        (*
         y_m
         (+ 1.0 (* x_m (* x_m (+ 0.5 (* x_m (* x_m 0.041666666666666664)))))))
        x_m)
       z_m)
      (/
       (*
        (/ y_m z_m)
        (+
         (+ 1.0 (* x_m (* x_m 0.5)))
         (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))))
       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 <= 1.25e+115) {
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / x_m) / z_m;
	} else {
		tmp = ((y_m / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.25d+115) then
        tmp = ((y_m * (1.0d0 + (x_m * (x_m * (0.5d0 + (x_m * (x_m * 0.041666666666666664d0))))))) / x_m) / z_m
    else
        tmp = ((y_m / z_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0))))) / 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 <= 1.25e+115) {
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / x_m) / z_m;
	} else {
		tmp = ((y_m / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.25e+115:
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / x_m) / z_m
	else:
		tmp = ((y_m / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.25e+115)
		tmp = Float64(Float64(Float64(y_m * Float64(1.0 + Float64(x_m * Float64(x_m * Float64(0.5 + Float64(x_m * Float64(x_m * 0.041666666666666664))))))) / x_m) / z_m);
	else
		tmp = Float64(Float64(Float64(y_m / z_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) + Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664))))) / 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 <= 1.25e+115)
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / x_m) / z_m;
	else
		tmp = ((y_m / z_m) * ((1.0 + (x_m * (x_m * 0.5))) + (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664))))) / 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, 1.25e+115], 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 * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 1.25 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


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

    1. Initial program 86.3%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000002e115 < y

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.6% accurate, 4.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 4 \cdot 10^{+41}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\ \mathbf{elif}\;x\_m \leq 3.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.041666666666666664 \cdot \left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\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 4e+41)
      (* (/ y_m x_m) (/ (+ 1.0 (* x_m (* x_m 0.5))) z_m))
      (if (<= x_m 3.5e+102)
        (/
         (* (/ y_m z_m) (* x_m (* x_m (* x_m (* x_m 0.041666666666666664)))))
         x_m)
        (/ (* 0.041666666666666664 (* y_m (* 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 <= 4e+41) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else if (x_m <= 3.5e+102) {
		tmp = ((y_m / z_m) * (x_m * (x_m * (x_m * (x_m * 0.041666666666666664))))) / x_m;
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 4d+41) then
        tmp = (y_m / x_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) / z_m)
    else if (x_m <= 3.5d+102) then
        tmp = ((y_m / z_m) * (x_m * (x_m * (x_m * (x_m * 0.041666666666666664d0))))) / x_m
    else
        tmp = (0.041666666666666664d0 * (y_m * (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 <= 4e+41) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else if (x_m <= 3.5e+102) {
		tmp = ((y_m / z_m) * (x_m * (x_m * (x_m * (x_m * 0.041666666666666664))))) / x_m;
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 4e+41:
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m)
	elif x_m <= 3.5e+102:
		tmp = ((y_m / z_m) * (x_m * (x_m * (x_m * (x_m * 0.041666666666666664))))) / x_m
	else:
		tmp = (0.041666666666666664 * (y_m * (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 <= 4e+41)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) / z_m));
	elseif (x_m <= 3.5e+102)
		tmp = Float64(Float64(Float64(y_m / z_m) * Float64(x_m * Float64(x_m * Float64(x_m * Float64(x_m * 0.041666666666666664))))) / x_m);
	else
		tmp = Float64(Float64(0.041666666666666664 * Float64(y_m * 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 <= 4e+41)
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	elseif (x_m <= 3.5e+102)
		tmp = ((y_m / z_m) * (x_m * (x_m * (x_m * (x_m * 0.041666666666666664))))) / x_m;
	else
		tmp = (0.041666666666666664 * (y_m * (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, 4e+41], N[(N[(y$95$m / x$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$95$m, 3.5e+102], N[(N[(N[(y$95$m / z$95$m), $MachinePrecision] * N[(x$95$m * N[(x$95$m * N[(x$95$m * N[(x$95$m * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $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 4 \cdot 10^{+41}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\

\mathbf{elif}\;x\_m \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{y\_m}{z\_m} \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}\\

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


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

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(1 + \frac{1}{2} \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}\right) \cdot \left({x}^{-1} \cdot y\right) \]
      5. remove-double-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000002e41 < x < 3.50000000000000011e102

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.50000000000000011e102 < x

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      5. *-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) \]
      6. 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) \]
      7. 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) \]
      8. *-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) \]
      9. 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) \]
      10. *-lowering-*.f64100.0%

        \[\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) \]
    8. Simplified100.0%

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

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

Alternative 7: 90.4% accurate, 4.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}\;y\_m \leq 1.12 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{y\_m \cdot \frac{1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\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 1.12e+115)
      (/
       (/
        (*
         y_m
         (+ 1.0 (* x_m (* x_m (+ 0.5 (* x_m (* x_m 0.041666666666666664)))))))
        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 <= 1.12e+115) {
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / 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 <= 1.12d+115) then
        tmp = ((y_m * (1.0d0 + (x_m * (x_m * (0.5d0 + (x_m * (x_m * 0.041666666666666664d0))))))) / 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 <= 1.12e+115) {
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / 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 <= 1.12e+115:
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / 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 <= 1.12e+115)
		tmp = Float64(Float64(Float64(y_m * Float64(1.0 + Float64(x_m * Float64(x_m * Float64(0.5 + Float64(x_m * Float64(x_m * 0.041666666666666664))))))) / x_m) / z_m);
	else
		tmp = Float64(Float64(y_m * Float64(Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(Float64(x_m * 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 <= 1.12e+115)
		tmp = ((y_m * (1.0 + (x_m * (x_m * (0.5 + (x_m * (x_m * 0.041666666666666664))))))) / 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, 1.12e+115], 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 * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(N[(y$95$m * N[(N[(1.0 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.5 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $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 1.12 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{y\_m \cdot \left(1 + x\_m \cdot \left(x\_m \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)\right)\right)}{x\_m}}{z\_m}\\

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


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

    1. Initial program 86.3%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.12e115 < y

    1. Initial program 78.6%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \left(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) \]
      2. 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 \frac{1}{24}\right)\right)}{z}\right), x\right) \]
      3. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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 \frac{1}{24}\right)\right)\right)\right)\right), z\right)\right), x\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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 \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
      11. *-lowering-*.f6493.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
    7. Applied egg-rr93.6%

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

Alternative 8: 88.8% accurate, 4.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}\;x\_m \leq 4.3 \cdot 10^{-117}:\\ \;\;\;\;\frac{y\_m}{x\_m \cdot z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{y\_m \cdot \frac{1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + \left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\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 4.3e-117)
      (/ y_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 (x_m <= 4.3e-117) {
		tmp = y_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 (x_m <= 4.3d-117) then
        tmp = y_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 (x_m <= 4.3e-117) {
		tmp = y_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 x_m <= 4.3e-117:
		tmp = y_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 (x_m <= 4.3e-117)
		tmp = Float64(y_m / Float64(x_m * z_m));
	else
		tmp = Float64(Float64(y_m * Float64(Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(Float64(x_m * 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 (x_m <= 4.3e-117)
		tmp = y_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[x$95$m, 4.3e-117], N[(y$95$m / N[(x$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(N[(1.0 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * N[(0.5 + N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $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 4.3 \cdot 10^{-117}:\\
\;\;\;\;\frac{y\_m}{x\_m \cdot z\_m}\\

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


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

    1. Initial program 85.3%

      \[\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-/.f6458.2%

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. associate-/l/N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{z}\right)\right) \]
      4. *-lowering-*.f6460.0%

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

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

    if 4.3e-117 < x

    1. Initial program 85.6%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot \left(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) \]
      2. 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 \frac{1}{24}\right)\right)}{z}\right), x\right) \]
      3. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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 \frac{1}{24}\right)\right)\right)\right)\right), z\right)\right), x\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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 \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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(\left(x \cdot x\right), \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
      11. *-lowering-*.f6492.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, \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(\mathsf{*.f64}\left(x, x\right), \frac{1}{24}\right)\right)\right)\right), z\right)\right), x\right) \]
    7. Applied egg-rr92.7%

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

Alternative 9: 88.2% accurate, 4.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}\;x\_m \leq 2.3 \cdot 10^{+63}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{x\_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 (<= x_m 2.3e+63)
      (*
       (/ y_m x_m)
       (/
        (+ 1.0 (* (* x_m x_m) (+ 0.5 (* x_m (* x_m 0.041666666666666664)))))
        z_m))
      (/
       (/ (* y_m (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))) 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.3e+63) {
		tmp = (y_m / x_m) * ((1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664))))) / z_m);
	} else {
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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.3d+63) then
        tmp = (y_m / x_m) * ((1.0d0 + ((x_m * x_m) * (0.5d0 + (x_m * (x_m * 0.041666666666666664d0))))) / z_m)
    else
        tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0)))) / 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.3e+63) {
		tmp = (y_m / x_m) * ((1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664))))) / z_m);
	} else {
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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.3e+63:
		tmp = (y_m / x_m) * ((1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664))))) / z_m)
	else:
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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.3e+63)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(Float64(x_m * x_m) * Float64(0.5 + Float64(x_m * Float64(x_m * 0.041666666666666664))))) / z_m));
	else
		tmp = Float64(Float64(Float64(y_m * Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664)))) / 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.3e+63)
		tmp = (y_m / x_m) * ((1.0 + ((x_m * x_m) * (0.5 + (x_m * (x_m * 0.041666666666666664))))) / z_m);
	else
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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.3e+63], N[(N[(y$95$m / x$95$m), $MachinePrecision] * N[(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] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $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 2.3 \cdot 10^{+63}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + \left(x\_m \cdot x\_m\right) \cdot \left(0.5 + x\_m \cdot \left(x\_m \cdot 0.041666666666666664\right)\right)}{z\_m}\\

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


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

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{*.f64}\left(y, \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 \color{blue}{\frac{1}{24}}\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \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 \frac{1}{24}\right)\right)\right)\right), z\right), \left(\frac{y}{x}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \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 \frac{1}{24}\right)\right)\right)\right)\right), z\right), \left(\frac{y}{x}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \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), z\right), \left(\frac{y}{x}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \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), z\right), \left(\frac{y}{x}\right)\right) \]
      14. /-lowering-/.f6480.7%

        \[\leadsto \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), z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    9. Applied egg-rr80.7%

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

    if 2.29999999999999993e63 < x

    1. Initial program 68.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{\left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right) \cdot y}}{x}}{z} \]
    11. 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), x\right), z\right) \]
    12. Step-by-step derivation
      1. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 83.9% 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 0.96:\\ \;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\ \mathbf{elif}\;x\_m \leq 1.3 \cdot 10^{+154}:\\ \;\;\;\;\left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right) \cdot \left(0.041666666666666664 \cdot \frac{y\_m}{z\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \frac{\frac{\left(x\_m \cdot x\_m\right) \cdot 0.5}{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 0.96)
      (/ (/ 1.0 z_m) (/ x_m y_m))
      (if (<= x_m 1.3e+154)
        (* (* x_m (* x_m x_m)) (* 0.041666666666666664 (/ y_m z_m)))
        (* y_m (/ (/ (* (* x_m x_m) 0.5) 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else if (x_m <= 1.3e+154) {
		tmp = (x_m * (x_m * x_m)) * (0.041666666666666664 * (y_m / z_m));
	} else {
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96d0) then
        tmp = (1.0d0 / z_m) / (x_m / y_m)
    else if (x_m <= 1.3d+154) then
        tmp = (x_m * (x_m * x_m)) * (0.041666666666666664d0 * (y_m / z_m))
    else
        tmp = y_m * ((((x_m * x_m) * 0.5d0) / 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else if (x_m <= 1.3e+154) {
		tmp = (x_m * (x_m * x_m)) * (0.041666666666666664 * (y_m / z_m));
	} else {
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96:
		tmp = (1.0 / z_m) / (x_m / y_m)
	elif x_m <= 1.3e+154:
		tmp = (x_m * (x_m * x_m)) * (0.041666666666666664 * (y_m / z_m))
	else:
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96)
		tmp = Float64(Float64(1.0 / z_m) / Float64(x_m / y_m));
	elseif (x_m <= 1.3e+154)
		tmp = Float64(Float64(x_m * Float64(x_m * x_m)) * Float64(0.041666666666666664 * Float64(y_m / z_m)));
	else
		tmp = Float64(y_m * Float64(Float64(Float64(Float64(x_m * x_m) * 0.5) / 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 <= 0.96)
		tmp = (1.0 / z_m) / (x_m / y_m);
	elseif (x_m <= 1.3e+154)
		tmp = (x_m * (x_m * x_m)) * (0.041666666666666664 * (y_m / z_m));
	else
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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, 0.96], N[(N[(1.0 / z$95$m), $MachinePrecision] / N[(x$95$m / y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$95$m, 1.3e+154], N[(N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 * N[(y$95$m / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.5), $MachinePrecision] / z$95$m), $MachinePrecision] / x$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 0.96:\\
\;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\

\mathbf{elif}\;x\_m \leq 1.3 \cdot 10^{+154}:\\
\;\;\;\;\left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right) \cdot \left(0.041666666666666664 \cdot \frac{y\_m}{z\_m}\right)\\

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


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

    1. Initial program 87.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-/.f6464.6%

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \left(\frac{\color{blue}{x}}{y}\right)\right) \]
      7. /-lowering-/.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Applied egg-rr65.1%

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

    if 0.95999999999999996 < x < 1.29999999999999994e154

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

        \[\leadsto {x}^{3} \cdot \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{24}\right)\right) \cdot \frac{\color{blue}{y}}{z}\right) \]
      5. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \frac{1}{24} \cdot \frac{\color{blue}{y}}{z}\right)\right) \]
    8. Simplified57.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\frac{1}{24}, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      2. /-lowering-/.f6457.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \mathsf{*.f64}\left(\frac{1}{24}, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    11. Simplified57.1%

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

    if 1.29999999999999994e154 < x

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 88.0% 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.9 \cdot 10^{+21}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \cdot 0.041666666666666664\right)\right)\right)}{x\_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 (<= x_m 3.9e+21)
      (* (/ y_m x_m) (/ (+ 1.0 (* x_m (* x_m 0.5))) z_m))
      (/
       (/ (* y_m (* x_m (* x_m (* (* x_m x_m) 0.041666666666666664)))) 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 <= 3.9e+21) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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 <= 3.9d+21) then
        tmp = (y_m / x_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) / z_m)
    else
        tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664d0)))) / 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 <= 3.9e+21) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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 <= 3.9e+21:
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m)
	else:
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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 <= 3.9e+21)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) / z_m));
	else
		tmp = Float64(Float64(Float64(y_m * Float64(x_m * Float64(x_m * Float64(Float64(x_m * x_m) * 0.041666666666666664)))) / 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 <= 3.9e+21)
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	else
		tmp = ((y_m * (x_m * (x_m * ((x_m * x_m) * 0.041666666666666664)))) / 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, 3.9e+21], N[(N[(y$95$m / x$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$95$m * N[(x$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $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 3.9 \cdot 10^{+21}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\

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


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

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(1 + \frac{1}{2} \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}\right) \cdot \left({x}^{-1} \cdot y\right) \]
      5. remove-double-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right)\right), z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 3.9e21 < x

    1. Initial program 73.9%

      \[\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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)}{x}}}{z} \]
    6. Step-by-step derivation
      1. distribute-lft-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{\left(1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right)\right) \cdot y}}{x}}{z} \]
    11. 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), x\right), z\right) \]
    12. Step-by-step derivation
      1. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 87.0% 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 9 \cdot 10^{+20}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m \cdot \left(y\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \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 (<= x_m 9e+20)
      (* (/ y_m x_m) (/ (+ 1.0 (* x_m (* x_m 0.5))) z_m))
      (/
       (/ (* x_m (* y_m (* x_m (* (* 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 (x_m <= 9e+20) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = ((x_m * (y_m * (x_m * ((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 (x_m <= 9d+20) then
        tmp = (y_m / x_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) / z_m)
    else
        tmp = ((x_m * (y_m * (x_m * ((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 (x_m <= 9e+20) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = ((x_m * (y_m * (x_m * ((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 x_m <= 9e+20:
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m)
	else:
		tmp = ((x_m * (y_m * (x_m * ((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 (x_m <= 9e+20)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) / z_m));
	else
		tmp = Float64(Float64(Float64(x_m * Float64(y_m * Float64(x_m * Float64(Float64(x_m * 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 (x_m <= 9e+20)
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	else
		tmp = ((x_m * (y_m * (x_m * ((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[x$95$m, 9e+20], N[(N[(y$95$m / x$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * N[(y$95$m * N[(x$95$m * N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.041666666666666664), $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 9 \cdot 10^{+20}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x\_m \cdot \left(y\_m \cdot \left(x\_m \cdot \left(\left(x\_m \cdot x\_m\right) \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 x < 9e20

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(1 + \frac{1}{2} \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}\right) \cdot \left({x}^{-1} \cdot y\right) \]
      5. remove-double-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right)\right), z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 9e20 < x

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 85.9% 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 9 \cdot 10^{+20}:\\ \;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.041666666666666664 \cdot \left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\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 9e+20)
      (* (/ y_m x_m) (/ (+ 1.0 (* x_m (* x_m 0.5))) z_m))
      (/ (* 0.041666666666666664 (* y_m (* 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 <= 9e+20) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 9d+20) then
        tmp = (y_m / x_m) * ((1.0d0 + (x_m * (x_m * 0.5d0))) / z_m)
    else
        tmp = (0.041666666666666664d0 * (y_m * (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 <= 9e+20) {
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 9e+20:
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m)
	else:
		tmp = (0.041666666666666664 * (y_m * (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 <= 9e+20)
		tmp = Float64(Float64(y_m / x_m) * Float64(Float64(1.0 + Float64(x_m * Float64(x_m * 0.5))) / z_m));
	else
		tmp = Float64(Float64(0.041666666666666664 * Float64(y_m * 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 <= 9e+20)
		tmp = (y_m / x_m) * ((1.0 + (x_m * (x_m * 0.5))) / z_m);
	else
		tmp = (0.041666666666666664 * (y_m * (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, 9e+20], N[(N[(y$95$m / x$95$m), $MachinePrecision] * N[(N[(1.0 + N[(x$95$m * N[(x$95$m * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $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 9 \cdot 10^{+20}:\\
\;\;\;\;\frac{y\_m}{x\_m} \cdot \frac{1 + x\_m \cdot \left(x\_m \cdot 0.5\right)}{z\_m}\\

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


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

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(1 + \frac{1}{2} \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}\right) \cdot \left({x}^{-1} \cdot y\right) \]
      5. remove-double-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{1}{2}\right)\right)\right), z\right), \mathsf{/.f64}\left(y, \color{blue}{x}\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 9e20 < x

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      5. *-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) \]
      6. 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) \]
      7. 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) \]
      8. *-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) \]
      9. 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) \]
      10. *-lowering-*.f6477.1%

        \[\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) \]
    8. Simplified77.1%

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

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

Alternative 14: 65.5% accurate, 6.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.6 \cdot 10^{-120}:\\ \;\;\;\;\frac{y\_m}{x\_m \cdot z\_m}\\ \mathbf{elif}\;x\_m \leq 0.96:\\ \;\;\;\;\frac{1}{z\_m \cdot \frac{x\_m}{y\_m}}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \left(x\_m \cdot \frac{0.5}{z\_m}\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 3.6e-120)
      (/ y_m (* x_m z_m))
      (if (<= x_m 0.96)
        (/ 1.0 (* z_m (/ x_m y_m)))
        (* y_m (* x_m (/ 0.5 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.6e-120) {
		tmp = y_m / (x_m * z_m);
	} else if (x_m <= 0.96) {
		tmp = 1.0 / (z_m * (x_m / y_m));
	} else {
		tmp = y_m * (x_m * (0.5 / 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.6d-120) then
        tmp = y_m / (x_m * z_m)
    else if (x_m <= 0.96d0) then
        tmp = 1.0d0 / (z_m * (x_m / y_m))
    else
        tmp = y_m * (x_m * (0.5d0 / 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.6e-120) {
		tmp = y_m / (x_m * z_m);
	} else if (x_m <= 0.96) {
		tmp = 1.0 / (z_m * (x_m / y_m));
	} else {
		tmp = y_m * (x_m * (0.5 / 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.6e-120:
		tmp = y_m / (x_m * z_m)
	elif x_m <= 0.96:
		tmp = 1.0 / (z_m * (x_m / y_m))
	else:
		tmp = y_m * (x_m * (0.5 / 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.6e-120)
		tmp = Float64(y_m / Float64(x_m * z_m));
	elseif (x_m <= 0.96)
		tmp = Float64(1.0 / Float64(z_m * Float64(x_m / y_m)));
	else
		tmp = Float64(y_m * Float64(x_m * Float64(0.5 / 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.6e-120)
		tmp = y_m / (x_m * z_m);
	elseif (x_m <= 0.96)
		tmp = 1.0 / (z_m * (x_m / y_m));
	else
		tmp = y_m * (x_m * (0.5 / 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.6e-120], N[(y$95$m / N[(x$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$95$m, 0.96], N[(1.0 / N[(z$95$m * N[(x$95$m / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(x$95$m * N[(0.5 / z$95$m), $MachinePrecision]), $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.6 \cdot 10^{-120}:\\
\;\;\;\;\frac{y\_m}{x\_m \cdot z\_m}\\

\mathbf{elif}\;x\_m \leq 0.96:\\
\;\;\;\;\frac{1}{z\_m \cdot \frac{x\_m}{y\_m}}\\

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


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

    1. Initial program 85.3%

      \[\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-/.f6458.2%

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. associate-/l/N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{z}\right)\right) \]
      4. *-lowering-*.f6460.0%

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

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

    if 3.6000000000000003e-120 < x < 0.95999999999999996

    1. Initial program 99.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-/.f6496.5%

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. div-invN/A

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

        \[\leadsto \frac{1}{\frac{x}{y}} \cdot \frac{\color{blue}{1}}{z} \]
      3. frac-timesN/A

        \[\leadsto \frac{1 \cdot 1}{\color{blue}{\frac{x}{y} \cdot z}} \]
      4. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{x}{y}\right), \color{blue}{z}\right)\right) \]
      7. /-lowering-/.f6496.5%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, y\right), z\right)\right) \]
    7. Applied egg-rr96.5%

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

    if 0.95999999999999996 < x

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 86.1% 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 0.96:\\ \;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.041666666666666664 \cdot \left(y\_m \cdot \left(x\_m \cdot \left(x\_m \cdot x\_m\right)\right)\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 0.96)
      (/ (/ 1.0 z_m) (/ x_m y_m))
      (/ (* 0.041666666666666664 (* y_m (* 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 0.96d0) then
        tmp = (1.0d0 / z_m) / (x_m / y_m)
    else
        tmp = (0.041666666666666664d0 * (y_m * (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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = (0.041666666666666664 * (y_m * (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 <= 0.96:
		tmp = (1.0 / z_m) / (x_m / y_m)
	else:
		tmp = (0.041666666666666664 * (y_m * (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 <= 0.96)
		tmp = Float64(Float64(1.0 / z_m) / Float64(x_m / y_m));
	else
		tmp = Float64(Float64(0.041666666666666664 * Float64(y_m * 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 <= 0.96)
		tmp = (1.0 / z_m) / (x_m / y_m);
	else
		tmp = (0.041666666666666664 * (y_m * (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, 0.96], N[(N[(1.0 / z$95$m), $MachinePrecision] / N[(x$95$m / y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y$95$m * N[(x$95$m * N[(x$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $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 0.96:\\
\;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\

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


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

    1. Initial program 87.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-/.f6464.6%

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \left(\frac{\color{blue}{x}}{y}\right)\right) \]
      7. /-lowering-/.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Applied egg-rr65.1%

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

    if 0.95999999999999996 < x

    1. Initial program 75.5%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left({x}^{3} \cdot y\right)\right), z\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{24}, \left(y \cdot {x}^{3}\right)\right), z\right) \]
      5. *-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) \]
      6. 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) \]
      7. 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) \]
      8. *-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) \]
      9. 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) \]
      10. *-lowering-*.f6474.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) \]
    8. Simplified74.6%

      \[\leadsto \color{blue}{\frac{0.041666666666666664 \cdot \left(y \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 79.7% 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 0.96:\\ \;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \frac{\frac{\left(x\_m \cdot x\_m\right) \cdot 0.5}{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 0.96)
      (/ (/ 1.0 z_m) (/ x_m y_m))
      (* y_m (/ (/ (* (* x_m x_m) 0.5) 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96d0) then
        tmp = (1.0d0 / z_m) / (x_m / y_m)
    else
        tmp = y_m * ((((x_m * x_m) * 0.5d0) / 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96:
		tmp = (1.0 / z_m) / (x_m / y_m)
	else:
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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 <= 0.96)
		tmp = Float64(Float64(1.0 / z_m) / Float64(x_m / y_m));
	else
		tmp = Float64(y_m * Float64(Float64(Float64(Float64(x_m * x_m) * 0.5) / 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 <= 0.96)
		tmp = (1.0 / z_m) / (x_m / y_m);
	else
		tmp = y_m * ((((x_m * x_m) * 0.5) / 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, 0.96], N[(N[(1.0 / z$95$m), $MachinePrecision] / N[(x$95$m / y$95$m), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.5), $MachinePrecision] / z$95$m), $MachinePrecision] / x$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 0.96:\\
\;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\

\mathbf{else}:\\
\;\;\;\;y\_m \cdot \frac{\frac{\left(x\_m \cdot x\_m\right) \cdot 0.5}{z\_m}}{x\_m}\\


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.95999999999999996

    1. Initial program 87.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-/.f6464.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified64.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \frac{y}{x} \cdot \color{blue}{\frac{1}{z}} \]
      2. clear-numN/A

        \[\leadsto \frac{1}{\frac{x}{y}} \cdot \frac{\color{blue}{1}}{z} \]
      3. associate-*l/N/A

        \[\leadsto \frac{1 \cdot \frac{1}{z}}{\color{blue}{\frac{x}{y}}} \]
      4. div-invN/A

        \[\leadsto \frac{\frac{1}{z}}{\frac{\color{blue}{x}}{y}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{z}\right), \color{blue}{\left(\frac{x}{y}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \left(\frac{\color{blue}{x}}{y}\right)\right) \]
      7. /-lowering-/.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Applied egg-rr65.1%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{\frac{x}{y}}} \]

    if 0.95999999999999996 < x

    1. Initial program 75.5%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{y}{x} \cdot \cosh x}{z} \]
      2. div-invN/A

        \[\leadsto \frac{\left(y \cdot \frac{1}{x}\right) \cdot \cosh x}{z} \]
      3. associate-*l*N/A

        \[\leadsto \frac{y \cdot \left(\frac{1}{x} \cdot \cosh x\right)}{z} \]
      4. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{x} \cdot \cosh x}{z}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{1}{x} \cdot \cosh x\right), \color{blue}{z}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\cosh x \cdot \frac{1}{x}\right), z\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right)\right) \]
      10. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right)\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{2} \cdot \frac{{x}^{2}}{z} + \frac{1}{z}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{\frac{1}{2} \cdot {x}^{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{{x}^{2} \cdot \frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2} \cdot 1}{z} + \frac{1}{z}}{x}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}}{x}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left({x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}\right), \color{blue}{x}\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left({x}^{2} \cdot \frac{1}{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      9. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2} + 1\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot {x}^{2}\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      16. /-lowering-/.f6464.6%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(1, z\right)\right), x\right)\right) \]
    7. Simplified64.6%

      \[\leadsto y \cdot \color{blue}{\frac{\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}}{x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{{x}^{2}}{z}\right)}, x\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{\frac{1}{2} \cdot {x}^{2}}{z}\right), x\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x}^{2}\right), z\right), x\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right), z\right), x\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right), z\right), x\right)\right) \]
      5. *-lowering-*.f6464.6%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right), z\right), x\right)\right) \]
    10. Simplified64.6%

      \[\leadsto y \cdot \frac{\color{blue}{\frac{0.5 \cdot \left(x \cdot x\right)}{z}}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.96:\\ \;\;\;\;\frac{\frac{1}{z}}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{\left(x \cdot x\right) \cdot 0.5}{z}}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 65.4% 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 0.96:\\ \;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \left(x\_m \cdot \frac{0.5}{z\_m}\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 0.96)
      (/ (/ 1.0 z_m) (/ x_m y_m))
      (* y_m (* x_m (/ 0.5 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96d0) then
        tmp = (1.0d0 / z_m) / (x_m / y_m)
    else
        tmp = y_m * (x_m * (0.5d0 / 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 <= 0.96) {
		tmp = (1.0 / z_m) / (x_m / y_m);
	} else {
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96:
		tmp = (1.0 / z_m) / (x_m / y_m)
	else:
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96)
		tmp = Float64(Float64(1.0 / z_m) / Float64(x_m / y_m));
	else
		tmp = Float64(y_m * Float64(x_m * Float64(0.5 / 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 <= 0.96)
		tmp = (1.0 / z_m) / (x_m / y_m);
	else
		tmp = y_m * (x_m * (0.5 / 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, 0.96], N[(N[(1.0 / z$95$m), $MachinePrecision] / N[(x$95$m / y$95$m), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(x$95$m * N[(0.5 / z$95$m), $MachinePrecision]), $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 0.96:\\
\;\;\;\;\frac{\frac{1}{z\_m}}{\frac{x\_m}{y\_m}}\\

\mathbf{else}:\\
\;\;\;\;y\_m \cdot \left(x\_m \cdot \frac{0.5}{z\_m}\right)\\


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.95999999999999996

    1. Initial program 87.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-/.f6464.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified64.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \frac{y}{x} \cdot \color{blue}{\frac{1}{z}} \]
      2. clear-numN/A

        \[\leadsto \frac{1}{\frac{x}{y}} \cdot \frac{\color{blue}{1}}{z} \]
      3. associate-*l/N/A

        \[\leadsto \frac{1 \cdot \frac{1}{z}}{\color{blue}{\frac{x}{y}}} \]
      4. div-invN/A

        \[\leadsto \frac{\frac{1}{z}}{\frac{\color{blue}{x}}{y}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{z}\right), \color{blue}{\left(\frac{x}{y}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \left(\frac{\color{blue}{x}}{y}\right)\right) \]
      7. /-lowering-/.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, z\right), \mathsf{/.f64}\left(x, \color{blue}{y}\right)\right) \]
    7. Applied egg-rr65.1%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{\frac{x}{y}}} \]

    if 0.95999999999999996 < x

    1. Initial program 75.5%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{y}{x} \cdot \cosh x}{z} \]
      2. div-invN/A

        \[\leadsto \frac{\left(y \cdot \frac{1}{x}\right) \cdot \cosh x}{z} \]
      3. associate-*l*N/A

        \[\leadsto \frac{y \cdot \left(\frac{1}{x} \cdot \cosh x\right)}{z} \]
      4. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{x} \cdot \cosh x}{z}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{1}{x} \cdot \cosh x\right), \color{blue}{z}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\cosh x \cdot \frac{1}{x}\right), z\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right)\right) \]
      10. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right)\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{2} \cdot \frac{{x}^{2}}{z} + \frac{1}{z}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{\frac{1}{2} \cdot {x}^{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{{x}^{2} \cdot \frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2} \cdot 1}{z} + \frac{1}{z}}{x}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}}{x}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left({x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}\right), \color{blue}{x}\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left({x}^{2} \cdot \frac{1}{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      9. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2} + 1\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot {x}^{2}\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      16. /-lowering-/.f6464.6%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(1, z\right)\right), x\right)\right) \]
    7. Simplified64.6%

      \[\leadsto y \cdot \color{blue}{\frac{\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}}{x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{2} \cdot \frac{x}{z}\right)}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{z} \cdot \color{blue}{\frac{1}{2}}\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x \cdot \frac{1}{2}}{\color{blue}{z}}\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \color{blue}{\frac{\frac{1}{2}}{z}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \frac{\frac{1}{2} \cdot 1}{z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{1}{z}}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \frac{1}{z}\right)}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(\frac{\frac{1}{2} \cdot 1}{\color{blue}{z}}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(\frac{\frac{1}{2}}{z}\right)\right)\right) \]
      9. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\frac{1}{2}, \color{blue}{z}\right)\right)\right) \]
    10. Simplified44.9%

      \[\leadsto y \cdot \color{blue}{\left(x \cdot \frac{0.5}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 65.2% 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 0.96:\\ \;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;y\_m \cdot \left(x\_m \cdot \frac{0.5}{z\_m}\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 0.96) (/ (/ y_m x_m) z_m) (* y_m (* x_m (/ 0.5 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 <= 0.96) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96d0) then
        tmp = (y_m / x_m) / z_m
    else
        tmp = y_m * (x_m * (0.5d0 / 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 <= 0.96) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96:
		tmp = (y_m / x_m) / z_m
	else:
		tmp = y_m * (x_m * (0.5 / 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 <= 0.96)
		tmp = Float64(Float64(y_m / x_m) / z_m);
	else
		tmp = Float64(y_m * Float64(x_m * Float64(0.5 / 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 <= 0.96)
		tmp = (y_m / x_m) / z_m;
	else
		tmp = y_m * (x_m * (0.5 / 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, 0.96], N[(N[(y$95$m / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(y$95$m * N[(x$95$m * N[(0.5 / z$95$m), $MachinePrecision]), $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 0.96:\\
\;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;y\_m \cdot \left(x\_m \cdot \frac{0.5}{z\_m}\right)\\


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.95999999999999996

    1. Initial program 87.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-/.f6464.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified64.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]

    if 0.95999999999999996 < x

    1. Initial program 75.5%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{y}{x} \cdot \cosh x}{z} \]
      2. div-invN/A

        \[\leadsto \frac{\left(y \cdot \frac{1}{x}\right) \cdot \cosh x}{z} \]
      3. associate-*l*N/A

        \[\leadsto \frac{y \cdot \left(\frac{1}{x} \cdot \cosh x\right)}{z} \]
      4. associate-/l*N/A

        \[\leadsto y \cdot \color{blue}{\frac{\frac{1}{x} \cdot \cosh x}{z}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{x} \cdot \cosh x}{z}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{1}{x} \cdot \cosh x\right), \color{blue}{z}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\cosh x \cdot \frac{1}{x}\right), z\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\frac{\cosh x}{x}\right), z\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\cosh x, x\right), z\right)\right) \]
      10. cosh-lowering-cosh.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cosh.f64}\left(x\right), x\right), z\right)\right) \]
    4. Applied egg-rr100.0%

      \[\leadsto \color{blue}{y \cdot \frac{\frac{\cosh x}{x}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{\frac{1}{2} \cdot \frac{{x}^{2}}{z} + \frac{1}{z}}{x}\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{\frac{1}{2} \cdot {x}^{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{\frac{{x}^{2} \cdot \frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2}}{z} + \frac{1}{z}}{x}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \frac{\frac{1}{2} \cdot 1}{z} + \frac{1}{z}}{x}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{{x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}}{x}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left({x}^{2} \cdot \left(\frac{1}{2} \cdot \frac{1}{z}\right) + \frac{1}{z}\right), \color{blue}{x}\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left({x}^{2} \cdot \frac{1}{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z} + \frac{1}{z}\right), x\right)\right) \]
      9. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot {x}^{2} + 1\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right) \cdot \frac{1}{z}\right), x\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(1 + \frac{1}{2} \cdot {x}^{2}\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot {x}^{2}\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left({x}^{2}\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \left(x \cdot x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \left(\frac{1}{z}\right)\right), x\right)\right) \]
      16. /-lowering-/.f6464.6%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x, x\right)\right)\right), \mathsf{/.f64}\left(1, z\right)\right), x\right)\right) \]
    7. Simplified64.6%

      \[\leadsto y \cdot \color{blue}{\frac{\left(1 + 0.5 \cdot \left(x \cdot x\right)\right) \cdot \frac{1}{z}}{x}} \]
    8. Taylor expanded in x around inf

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{1}{2} \cdot \frac{x}{z}\right)}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{z} \cdot \color{blue}{\frac{1}{2}}\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x \cdot \frac{1}{2}}{\color{blue}{z}}\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \color{blue}{\frac{\frac{1}{2}}{z}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \frac{\frac{1}{2} \cdot 1}{z}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(x \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{1}{z}}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \frac{1}{z}\right)}\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(\frac{\frac{1}{2} \cdot 1}{\color{blue}{z}}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \left(\frac{\frac{1}{2}}{z}\right)\right)\right) \]
      9. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\frac{1}{2}, \color{blue}{z}\right)\right)\right) \]
    10. Simplified44.9%

      \[\leadsto y \cdot \color{blue}{\left(x \cdot \frac{0.5}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 61.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 0.96:\\ \;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(0.5 \cdot \frac{y\_m}{z\_m}\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 0.96) (/ (/ y_m x_m) z_m) (* x_m (* 0.5 (/ 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 <= 0.96) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = x_m * (0.5 * (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 <= 0.96d0) then
        tmp = (y_m / x_m) / z_m
    else
        tmp = x_m * (0.5d0 * (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 <= 0.96) {
		tmp = (y_m / x_m) / z_m;
	} else {
		tmp = x_m * (0.5 * (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 <= 0.96:
		tmp = (y_m / x_m) / z_m
	else:
		tmp = x_m * (0.5 * (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 <= 0.96)
		tmp = Float64(Float64(y_m / x_m) / z_m);
	else
		tmp = Float64(x_m * Float64(0.5 * 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 (x_m <= 0.96)
		tmp = (y_m / x_m) / z_m;
	else
		tmp = x_m * (0.5 * (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, 0.96], N[(N[(y$95$m / x$95$m), $MachinePrecision] / z$95$m), $MachinePrecision], N[(x$95$m * N[(0.5 * N[(y$95$m / z$95$m), $MachinePrecision]), $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 0.96:\\
\;\;\;\;\frac{\frac{y\_m}{x\_m}}{z\_m}\\

\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(0.5 \cdot \frac{y\_m}{z\_m}\right)\\


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.95999999999999996

    1. Initial program 87.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-/.f6464.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified64.6%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]

    if 0.95999999999999996 < x

    1. Initial program 75.5%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{{x}^{2} \cdot \left(\frac{1}{24} \cdot \frac{{x}^{2} \cdot y}{z} + \frac{1}{2} \cdot \frac{y}{z}\right) + \frac{y}{z}}{x}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({x}^{2} \cdot \left(\frac{1}{24} \cdot \frac{{x}^{2} \cdot y}{z} + \frac{1}{2} \cdot \frac{y}{z}\right) + \frac{y}{z}\right), \color{blue}{x}\right) \]
    5. Simplified74.2%

      \[\leadsto \color{blue}{\frac{\frac{y}{z} \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)}{x}} \]
    6. Taylor expanded in x around inf

      \[\leadsto \color{blue}{{x}^{3} \cdot \left(\frac{1}{24} \cdot \frac{y}{z} + \frac{1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto {x}^{3} \cdot \left(\frac{1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \color{blue}{\frac{1}{24} \cdot \frac{y}{z}}\right) \]
      2. metadata-evalN/A

        \[\leadsto {x}^{3} \cdot \left(\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{y}{{x}^{2} \cdot z} + \frac{1}{24} \cdot \frac{y}{z}\right) \]
      3. distribute-lft-neg-inN/A

        \[\leadsto {x}^{3} \cdot \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \color{blue}{\frac{1}{24}} \cdot \frac{y}{z}\right) \]
      4. metadata-evalN/A

        \[\leadsto {x}^{3} \cdot \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{24}\right)\right) \cdot \frac{\color{blue}{y}}{z}\right) \]
      5. distribute-lft-neg-inN/A

        \[\leadsto {x}^{3} \cdot \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{24} \cdot \frac{y}{z}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto {x}^{3} \cdot \left(\mathsf{neg}\left(\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \frac{-1}{24} \cdot \frac{y}{z}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({x}^{3}\right), \color{blue}{\left(\mathsf{neg}\left(\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \frac{-1}{24} \cdot \frac{y}{z}\right)\right)\right)}\right) \]
      8. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot x\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \frac{-1}{24} \cdot \frac{y}{z}\right)}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot {x}^{2}\right), \left(\mathsf{neg}\left(\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \color{blue}{\frac{-1}{24} \cdot \frac{y}{z}}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left({x}^{2}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \frac{-1}{24} \cdot \frac{y}{z}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot x\right)\right), \left(\mathsf{neg}\left(\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \color{blue}{\frac{-1}{24} \cdot \frac{y}{z}}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\mathsf{neg}\left(\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z} + \color{blue}{\frac{-1}{24} \cdot \frac{y}{z}}\right)\right)\right)\right) \]
      13. distribute-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{-1}{24} \cdot \frac{y}{z}\right)\right)}\right)\right) \]
      14. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{24}\right)\right) \cdot \color{blue}{\frac{y}{z}}\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, x\right)\right), \left(\left(\mathsf{neg}\left(\frac{-1}{2} \cdot \frac{y}{{x}^{2} \cdot z}\right)\right) + \frac{1}{24} \cdot \frac{\color{blue}{y}}{z}\right)\right) \]
    8. Simplified66.4%

      \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(\frac{y}{z} \cdot \left(0.041666666666666664 + \frac{0.5}{x \cdot x}\right)\right)} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{z} \cdot \color{blue}{\frac{1}{2}} \]
      2. associate-/l*N/A

        \[\leadsto \left(x \cdot \frac{y}{z}\right) \cdot \frac{1}{2} \]
      3. associate-*r*N/A

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} \cdot \frac{1}{2}\right)} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\frac{y}{z}}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \frac{y}{z}\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      7. /-lowering-/.f6431.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    11. Simplified31.3%

      \[\leadsto \color{blue}{x \cdot \left(0.5 \cdot \frac{y}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 55.7% 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 5 \cdot 10^{+18}:\\ \;\;\;\;\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 5e+18) (/ (/ 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 <= 5e+18) {
		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 <= 5d+18) 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 <= 5e+18) {
		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 <= 5e+18:
		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 <= 5e+18)
		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 <= 5e+18)
		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, 5e+18], 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 5 \cdot 10^{+18}:\\
\;\;\;\;\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 < 5e18

    1. Initial program 85.5%

      \[\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-/.f6455.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified55.3%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]

    if 5e18 < y

    1. Initial program 84.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. associate-/l/N/A

        \[\leadsto \frac{\frac{y}{z}}{\color{blue}{x}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y}{z}\right), \color{blue}{x}\right) \]
      3. /-lowering-/.f6466.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, z\right), x\right) \]
    5. Simplified66.6%

      \[\leadsto \color{blue}{\frac{\frac{y}{z}}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 51.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 3 \cdot 10^{-62}:\\ \;\;\;\;\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 3e-62) (/ (/ 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 <= 3e-62) {
		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 <= 3d-62) 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 <= 3e-62) {
		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 <= 3e-62:
		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 <= 3e-62)
		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 <= 3e-62)
		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, 3e-62], 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 3 \cdot 10^{-62}:\\
\;\;\;\;\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 < 3.0000000000000001e-62

    1. Initial program 84.0%

      \[\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-/.f6453.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified53.4%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]

    if 3.0000000000000001e-62 < y

    1. Initial program 89.5%

      \[\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-/.f6454.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
    5. Simplified54.0%

      \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
    6. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(z \cdot x\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{z}\right)\right) \]
      4. *-lowering-*.f6464.2%

        \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{z}\right)\right) \]
    7. Applied egg-rr64.2%

      \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 48.3% 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 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-/.f6453.6%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, x\right), z\right) \]
  5. Simplified53.6%

    \[\leadsto \frac{\color{blue}{\frac{y}{x}}}{z} \]
  6. Step-by-step derivation
    1. associate-/l/N/A

      \[\leadsto \frac{y}{\color{blue}{z \cdot x}} \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(z \cdot x\right)}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(y, \left(x \cdot \color{blue}{z}\right)\right) \]
    4. *-lowering-*.f6453.0%

      \[\leadsto \mathsf{/.f64}\left(y, \mathsf{*.f64}\left(x, \color{blue}{z}\right)\right) \]
  7. Applied egg-rr53.0%

    \[\leadsto \color{blue}{\frac{y}{x \cdot z}} \]
  8. 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 2024192 
(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))