Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.8% → 97.4%
Time: 9.4s
Alternatives: 15
Speedup: 1.0×

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

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

Initial Program: 84.8% accurate, 1.0× speedup?

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

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

Alternative 1: 97.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+75}:\\ \;\;\;\;\frac{\cosh x}{x \cdot \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \frac{\cosh x}{x}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -4.5e+75) (/ (cosh x) (* x (/ z y))) (/ (* y (/ (cosh x) x)) z)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -4.5e+75) {
		tmp = cosh(x) / (x * (z / y));
	} else {
		tmp = (y * (cosh(x) / x)) / z;
	}
	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) :: tmp
    if (y <= (-4.5d+75)) then
        tmp = cosh(x) / (x * (z / y))
    else
        tmp = (y * (cosh(x) / x)) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -4.5e+75) {
		tmp = Math.cosh(x) / (x * (z / y));
	} else {
		tmp = (y * (Math.cosh(x) / x)) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -4.5e+75:
		tmp = math.cosh(x) / (x * (z / y))
	else:
		tmp = (y * (math.cosh(x) / x)) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -4.5e+75)
		tmp = Float64(cosh(x) / Float64(x * Float64(z / y)));
	else
		tmp = Float64(Float64(y * Float64(cosh(x) / x)) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -4.5e+75)
		tmp = cosh(x) / (x * (z / y));
	else
		tmp = (y * (cosh(x) / x)) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -4.5e+75], N[(N[Cosh[x], $MachinePrecision] / N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;\frac{\cosh x}{x \cdot \frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.5000000000000004e75

    1. Initial program 85.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. associate-/l*85.7%

        \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
      2. associate-/r/99.8%

        \[\leadsto \frac{\cosh x}{\color{blue}{\frac{z}{y} \cdot x}} \]
    3. Simplified99.8%

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

    if -4.5000000000000004e75 < y

    1. Initial program 84.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative84.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/84.7%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified84.7%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times81.8%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/81.5%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative81.5%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*93.8%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+75}:\\ \;\;\;\;\frac{\cosh x}{x \cdot \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \frac{\cosh x}{x}}{z}\\ \end{array} \]

Alternative 2: 92.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\ \;\;\;\;\frac{y}{x} \cdot \frac{\cosh x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= (* (cosh x) (/ y x)) INFINITY)
   (* (/ y x) (/ (cosh x) z))
   (* y (/ (cosh x) (* x z)))))
double code(double x, double y, double z) {
	double tmp;
	if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
		tmp = (y / x) * (cosh(x) / z);
	} else {
		tmp = y * (cosh(x) / (x * z));
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double tmp;
	if ((Math.cosh(x) * (y / x)) <= Double.POSITIVE_INFINITY) {
		tmp = (y / x) * (Math.cosh(x) / z);
	} else {
		tmp = y * (Math.cosh(x) / (x * z));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (math.cosh(x) * (y / x)) <= math.inf:
		tmp = (y / x) * (math.cosh(x) / z)
	else:
		tmp = y * (math.cosh(x) / (x * z))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (Float64(cosh(x) * Float64(y / x)) <= Inf)
		tmp = Float64(Float64(y / x) * Float64(cosh(x) / z));
	else
		tmp = Float64(y * Float64(cosh(x) / Float64(x * z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((cosh(x) * (y / x)) <= Inf)
		tmp = (y / x) * (cosh(x) / z);
	else
		tmp = y * (cosh(x) / (x * z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / x), $MachinePrecision] * N[(N[Cosh[x], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{y}{x} \cdot \frac{\cosh x}{z}\\

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


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

    1. Initial program 94.9%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative94.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/94.9%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified94.9%

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

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

    1. Initial program 0.0%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/100.0%

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z \cdot x} \cdot y} \]
      4. *-commutative70.4%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
      5. *-commutative70.4%

        \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
    3. Simplified70.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\ \;\;\;\;\frac{y}{x} \cdot \frac{\cosh x}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \end{array} \]

Alternative 3: 85.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-35} \lor \neg \left(z \leq 2.8 \cdot 10^{-87}\right):\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\cosh x \cdot \frac{\frac{y}{z}}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -4e-35) (not (<= z 2.8e-87)))
   (* y (/ (cosh x) (* x z)))
   (* (cosh x) (/ (/ y z) x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -4e-35) || !(z <= 2.8e-87)) {
		tmp = y * (cosh(x) / (x * z));
	} else {
		tmp = cosh(x) * ((y / z) / x);
	}
	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) :: tmp
    if ((z <= (-4d-35)) .or. (.not. (z <= 2.8d-87))) then
        tmp = y * (cosh(x) / (x * z))
    else
        tmp = cosh(x) * ((y / z) / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -4e-35) || !(z <= 2.8e-87)) {
		tmp = y * (Math.cosh(x) / (x * z));
	} else {
		tmp = Math.cosh(x) * ((y / z) / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -4e-35) or not (z <= 2.8e-87):
		tmp = y * (math.cosh(x) / (x * z))
	else:
		tmp = math.cosh(x) * ((y / z) / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -4e-35) || !(z <= 2.8e-87))
		tmp = Float64(y * Float64(cosh(x) / Float64(x * z)));
	else
		tmp = Float64(cosh(x) * Float64(Float64(y / z) / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -4e-35) || ~((z <= 2.8e-87)))
		tmp = y * (cosh(x) / (x * z));
	else
		tmp = cosh(x) * ((y / z) / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -4e-35], N[Not[LessEqual[z, 2.8e-87]], $MachinePrecision]], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-35} \lor \neg \left(z \leq 2.8 \cdot 10^{-87}\right):\\
\;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.00000000000000003e-35 or 2.8000000000000001e-87 < z

    1. Initial program 80.1%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/92.0%

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z \cdot x} \cdot y} \]
      4. *-commutative81.6%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
      5. *-commutative81.6%

        \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
    3. Simplified81.6%

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

    if -4.00000000000000003e-35 < z < 2.8000000000000001e-87

    1. Initial program 91.0%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. associate-*r/91.0%

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

        \[\leadsto \cosh x \cdot \color{blue}{\frac{y}{z \cdot x}} \]
      3. associate-/r*99.8%

        \[\leadsto \cosh x \cdot \color{blue}{\frac{\frac{y}{z}}{x}} \]
    3. Simplified99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-35} \lor \neg \left(z \leq 2.8 \cdot 10^{-87}\right):\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\cosh x \cdot \frac{\frac{y}{z}}{x}\\ \end{array} \]

Alternative 4: 83.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ y \cdot \frac{\cosh x}{x \cdot z} \end{array} \]
(FPCore (x y z) :precision binary64 (* y (/ (cosh x) (* x z))))
double code(double x, double y, double z) {
	return y * (cosh(x) / (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 = y * (cosh(x) / (x * z))
end function
public static double code(double x, double y, double z) {
	return y * (Math.cosh(x) / (x * z));
}
def code(x, y, z):
	return y * (math.cosh(x) / (x * z))
function code(x, y, z)
	return Float64(y * Float64(cosh(x) / Float64(x * z)))
end
function tmp = code(x, y, z)
	tmp = y * (cosh(x) / (x * z));
end
code[x_, y_, z_] := N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot \frac{\cosh x}{x \cdot z}
\end{array}
Derivation
  1. Initial program 84.9%

    \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
  2. Step-by-step derivation
    1. associate-*r/95.5%

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

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

      \[\leadsto \color{blue}{\frac{\cosh x}{z \cdot x} \cdot y} \]
    4. *-commutative84.9%

      \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
    5. *-commutative84.9%

      \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
  3. Simplified84.9%

    \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
  4. Final simplification84.9%

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

Alternative 5: 67.9% accurate, 4.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x \cdot z}\\ \mathbf{if}\;z \leq -8.4 \cdot 10^{-76}:\\ \;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-174}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \frac{z}{x} + z \cdot \left(y \cdot 0.5\right)}{z \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (* x z))))
   (if (<= z -8.4e-76)
     (+ t_0 (* 0.5 (/ (* y x) z)))
     (if (<= z -5.1e-174)
       (/ (+ (* (/ y x) (/ z x)) (* z (* y 0.5))) (* z (/ z x)))
       (+ t_0 (* 0.5 (* y (/ x z))))))))
double code(double x, double y, double z) {
	double t_0 = y / (x * z);
	double tmp;
	if (z <= -8.4e-76) {
		tmp = t_0 + (0.5 * ((y * x) / z));
	} else if (z <= -5.1e-174) {
		tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x));
	} else {
		tmp = t_0 + (0.5 * (y * (x / z)));
	}
	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 / (x * z)
    if (z <= (-8.4d-76)) then
        tmp = t_0 + (0.5d0 * ((y * x) / z))
    else if (z <= (-5.1d-174)) then
        tmp = (((y / x) * (z / x)) + (z * (y * 0.5d0))) / (z * (z / x))
    else
        tmp = t_0 + (0.5d0 * (y * (x / z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / (x * z);
	double tmp;
	if (z <= -8.4e-76) {
		tmp = t_0 + (0.5 * ((y * x) / z));
	} else if (z <= -5.1e-174) {
		tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x));
	} else {
		tmp = t_0 + (0.5 * (y * (x / z)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / (x * z)
	tmp = 0
	if z <= -8.4e-76:
		tmp = t_0 + (0.5 * ((y * x) / z))
	elif z <= -5.1e-174:
		tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x))
	else:
		tmp = t_0 + (0.5 * (y * (x / z)))
	return tmp
function code(x, y, z)
	t_0 = Float64(y / Float64(x * z))
	tmp = 0.0
	if (z <= -8.4e-76)
		tmp = Float64(t_0 + Float64(0.5 * Float64(Float64(y * x) / z)));
	elseif (z <= -5.1e-174)
		tmp = Float64(Float64(Float64(Float64(y / x) * Float64(z / x)) + Float64(z * Float64(y * 0.5))) / Float64(z * Float64(z / x)));
	else
		tmp = Float64(t_0 + Float64(0.5 * Float64(y * Float64(x / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / (x * z);
	tmp = 0.0;
	if (z <= -8.4e-76)
		tmp = t_0 + (0.5 * ((y * x) / z));
	elseif (z <= -5.1e-174)
		tmp = (((y / x) * (z / x)) + (z * (y * 0.5))) / (z * (z / x));
	else
		tmp = t_0 + (0.5 * (y * (x / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.4e-76], N[(t$95$0 + N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.1e-174], N[(N[(N[(N[(y / x), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot z}\\
\mathbf{if}\;z \leq -8.4 \cdot 10^{-76}:\\
\;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\

\mathbf{elif}\;z \leq -5.1 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \frac{z}{x} + z \cdot \left(y \cdot 0.5\right)}{z \cdot \frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.39999999999999969e-76

    1. Initial program 80.2%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/80.2%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified80.2%

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

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

    if -8.39999999999999969e-76 < z < -5.10000000000000032e-174

    1. Initial program 95.1%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/95.0%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified95.0%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative59.4%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*63.7%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative63.7%

        \[\leadsto 0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{\color{blue}{x \cdot z}} \]
    6. Simplified63.7%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Step-by-step derivation
      1. +-commutative63.7%

        \[\leadsto \color{blue}{\frac{y}{x \cdot z} + 0.5 \cdot \frac{y}{\frac{z}{x}}} \]
      2. associate-/r*77.4%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{z}} + 0.5 \cdot \frac{y}{\frac{z}{x}} \]
      3. associate-*r/77.4%

        \[\leadsto \frac{\frac{y}{x}}{z} + \color{blue}{\frac{0.5 \cdot y}{\frac{z}{x}}} \]
      4. frac-add90.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x} \cdot \frac{z}{x} + z \cdot \left(0.5 \cdot y\right)}{z \cdot \frac{z}{x}}} \]
    8. Applied egg-rr90.6%

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

    if -5.10000000000000032e-174 < z

    1. Initial program 85.8%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative85.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/85.8%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified85.8%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative70.6%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*74.1%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative74.1%

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Taylor expanded in y around 0 70.6%

      \[\leadsto 0.5 \cdot \color{blue}{\frac{y \cdot x}{z}} + \frac{y}{x \cdot z} \]
    8. Step-by-step derivation
      1. associate-*r/74.7%

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{z}\right)} + \frac{y}{x \cdot z} \]
    9. Simplified74.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{-76}:\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq -5.1 \cdot 10^{-174}:\\ \;\;\;\;\frac{\frac{y}{x} \cdot \frac{z}{x} + z \cdot \left(y \cdot 0.5\right)}{z \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \end{array} \]

Alternative 6: 65.5% accurate, 6.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-258} \lor \neg \left(y \leq 1.5 \cdot 10^{-292}\right):\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= y -4.2e-258) (not (<= y 1.5e-292)))
   (+ (/ y (* x z)) (* 0.5 (* y (/ x z))))
   (/ (* y (+ (* x 0.5) (/ 1.0 x))) z)))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -4.2e-258) || !(y <= 1.5e-292)) {
		tmp = (y / (x * z)) + (0.5 * (y * (x / z)));
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	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) :: tmp
    if ((y <= (-4.2d-258)) .or. (.not. (y <= 1.5d-292))) then
        tmp = (y / (x * z)) + (0.5d0 * (y * (x / z)))
    else
        tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((y <= -4.2e-258) || !(y <= 1.5e-292)) {
		tmp = (y / (x * z)) + (0.5 * (y * (x / z)));
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -4.2e-258) or not (y <= 1.5e-292):
		tmp = (y / (x * z)) + (0.5 * (y * (x / z)))
	else:
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -4.2e-258) || !(y <= 1.5e-292))
		tmp = Float64(Float64(y / Float64(x * z)) + Float64(0.5 * Float64(y * Float64(x / z))));
	else
		tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y <= -4.2e-258) || ~((y <= 1.5e-292)))
		tmp = (y / (x * z)) + (0.5 * (y * (x / z)));
	else
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.2e-258], N[Not[LessEqual[y, 1.5e-292]], $MachinePrecision]], N[(N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-258} \lor \neg \left(y \leq 1.5 \cdot 10^{-292}\right):\\
\;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.1999999999999998e-258 or 1.50000000000000008e-292 < y

    1. Initial program 86.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative86.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/86.7%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified86.7%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*70.0%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative70.0%

        \[\leadsto 0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{\color{blue}{x \cdot z}} \]
    6. Simplified70.0%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Taylor expanded in y around 0 68.4%

      \[\leadsto 0.5 \cdot \color{blue}{\frac{y \cdot x}{z}} + \frac{y}{x \cdot z} \]
    8. Step-by-step derivation
      1. associate-*r/70.4%

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{z}\right)} + \frac{y}{x \cdot z} \]
    9. Simplified70.4%

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

    if -4.1999999999999998e-258 < y < 1.50000000000000008e-292

    1. Initial program 60.9%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative60.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/61.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified61.1%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times50.5%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/46.5%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative46.5%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*57.6%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/99.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-258} \lor \neg \left(y \leq 1.5 \cdot 10^{-292}\right):\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \end{array} \]

Alternative 7: 67.0% accurate, 6.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{x \cdot z}\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{+102}:\\ \;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-295}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t_0 + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ y (* x z))))
   (if (<= y -2.5e+102)
     (+ t_0 (* 0.5 (/ (* y x) z)))
     (if (<= y 8e-295)
       (/ (* y (+ (* x 0.5) (/ 1.0 x))) z)
       (+ t_0 (* 0.5 (* y (/ x z))))))))
double code(double x, double y, double z) {
	double t_0 = y / (x * z);
	double tmp;
	if (y <= -2.5e+102) {
		tmp = t_0 + (0.5 * ((y * x) / z));
	} else if (y <= 8e-295) {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	} else {
		tmp = t_0 + (0.5 * (y * (x / z)));
	}
	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 / (x * z)
    if (y <= (-2.5d+102)) then
        tmp = t_0 + (0.5d0 * ((y * x) / z))
    else if (y <= 8d-295) then
        tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
    else
        tmp = t_0 + (0.5d0 * (y * (x / z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = y / (x * z);
	double tmp;
	if (y <= -2.5e+102) {
		tmp = t_0 + (0.5 * ((y * x) / z));
	} else if (y <= 8e-295) {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	} else {
		tmp = t_0 + (0.5 * (y * (x / z)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = y / (x * z)
	tmp = 0
	if y <= -2.5e+102:
		tmp = t_0 + (0.5 * ((y * x) / z))
	elif y <= 8e-295:
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z
	else:
		tmp = t_0 + (0.5 * (y * (x / z)))
	return tmp
function code(x, y, z)
	t_0 = Float64(y / Float64(x * z))
	tmp = 0.0
	if (y <= -2.5e+102)
		tmp = Float64(t_0 + Float64(0.5 * Float64(Float64(y * x) / z)));
	elseif (y <= 8e-295)
		tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z);
	else
		tmp = Float64(t_0 + Float64(0.5 * Float64(y * Float64(x / z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = y / (x * z);
	tmp = 0.0;
	if (y <= -2.5e+102)
		tmp = t_0 + (0.5 * ((y * x) / z));
	elseif (y <= 8e-295)
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	else
		tmp = t_0 + (0.5 * (y * (x / z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+102], N[(t$95$0 + N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-295], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(t$95$0 + N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot z}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+102}:\\
\;\;\;\;t_0 + 0.5 \cdot \frac{y \cdot x}{z}\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-295}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.5e102

    1. Initial program 84.2%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/84.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified84.3%

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

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

    if -2.5e102 < y < 8.00000000000000048e-295

    1. Initial program 82.9%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative82.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/83.0%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified83.0%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times77.1%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/76.2%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative76.2%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*89.6%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/99.8%

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

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

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

    if 8.00000000000000048e-295 < y

    1. Initial program 86.5%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative86.5%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/86.5%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified86.5%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative68.5%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*71.5%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative71.5%

        \[\leadsto 0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{\color{blue}{x \cdot z}} \]
    6. Simplified71.5%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Taylor expanded in y around 0 68.5%

      \[\leadsto 0.5 \cdot \color{blue}{\frac{y \cdot x}{z}} + \frac{y}{x \cdot z} \]
    8. Step-by-step derivation
      1. associate-*r/72.3%

        \[\leadsto 0.5 \cdot \color{blue}{\left(y \cdot \frac{x}{z}\right)} + \frac{y}{x \cdot z} \]
    9. Simplified72.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-295}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x \cdot z} + 0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\ \end{array} \]

Alternative 8: 65.0% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 2.1 \cdot 10^{+97}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{1}{x}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z 2.1e+97) (/ (* y (+ (* x 0.5) (/ 1.0 x))) z) (* y (/ (/ 1.0 x) z))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= 2.1e+97) {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	} else {
		tmp = y * ((1.0 / x) / z);
	}
	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) :: tmp
    if (z <= 2.1d+97) then
        tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
    else
        tmp = y * ((1.0d0 / x) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= 2.1e+97) {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	} else {
		tmp = y * ((1.0 / x) / z);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= 2.1e+97:
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z
	else:
		tmp = y * ((1.0 / x) / z)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= 2.1e+97)
		tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z);
	else
		tmp = Float64(y * Float64(Float64(1.0 / x) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= 2.1e+97)
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	else
		tmp = y * ((1.0 / x) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, 2.1e+97], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(y * N[(N[(1.0 / x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 86.9%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative86.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/86.9%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified86.9%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times87.8%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/87.5%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative87.5%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*94.2%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/96.9%

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

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

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

    if 2.10000000000000012e97 < z

    1. Initial program 72.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative72.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/72.8%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified72.8%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x}} \]
    5. Step-by-step derivation
      1. *-commutative55.9%

        \[\leadsto \frac{y}{\color{blue}{x \cdot z}} \]
      2. associate-/r*42.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{z}} \]
      3. div-inv42.9%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{1}{x}}}{z} \]
      4. *-un-lft-identity42.9%

        \[\leadsto \frac{y \cdot \frac{1}{x}}{\color{blue}{1 \cdot z}} \]
      5. times-frac56.0%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \frac{\frac{1}{x}}{z}} \]
    6. Applied egg-rr56.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.1 \cdot 10^{+97}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{1}{x}}{z}\\ \end{array} \]

Alternative 9: 65.1% accurate, 8.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -8.5e+102)
   (/ (- (/ 1.0 x) (* x -0.5)) (/ z y))
   (/ (* y (+ (* x 0.5) (/ 1.0 x))) z)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -8.5e+102) {
		tmp = ((1.0 / x) - (x * -0.5)) / (z / y);
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	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) :: tmp
    if (y <= (-8.5d+102)) then
        tmp = ((1.0d0 / x) - (x * (-0.5d0))) / (z / y)
    else
        tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -8.5e+102) {
		tmp = ((1.0 / x) - (x * -0.5)) / (z / y);
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -8.5e+102:
		tmp = ((1.0 / x) - (x * -0.5)) / (z / y)
	else:
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -8.5e+102)
		tmp = Float64(Float64(Float64(1.0 / x) - Float64(x * -0.5)) / Float64(z / y));
	else
		tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -8.5e+102)
		tmp = ((1.0 / x) - (x * -0.5)) / (z / y);
	else
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -8.5e+102], N[(N[(N[(1.0 / x), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.4999999999999996e102

    1. Initial program 84.2%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/84.3%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified84.3%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times97.7%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/97.7%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative97.7%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*99.8%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/84.3%

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

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

      \[\leadsto \frac{\color{blue}{\frac{y}{x} + 0.5 \cdot \left(y \cdot x\right)}}{z} \]
    7. Step-by-step derivation
      1. associate-*r*72.3%

        \[\leadsto \frac{\frac{y}{x} + \color{blue}{\left(0.5 \cdot y\right) \cdot x}}{z} \]
      2. *-commutative72.3%

        \[\leadsto \frac{\frac{y}{x} + \color{blue}{x \cdot \left(0.5 \cdot y\right)}}{z} \]
      3. associate-*r*72.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(-0.5 \cdot x - \frac{1}{x}\right) \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg72.4%

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

        \[\leadsto -\color{blue}{\frac{-0.5 \cdot x - \frac{1}{x}}{\frac{z}{y}}} \]
      3. *-commutative85.9%

        \[\leadsto -\frac{\color{blue}{x \cdot -0.5} - \frac{1}{x}}{\frac{z}{y}} \]
    11. Simplified85.9%

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

    if -8.4999999999999996e102 < y

    1. Initial program 85.1%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/85.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified85.1%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times82.3%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/81.9%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative81.9%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*93.9%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/98.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \end{array} \]

Alternative 10: 65.2% accurate, 8.2× speedup?

\[\begin{array}{l} \\ y \cdot \left(0.5 \cdot \frac{x}{z} - \frac{-1}{x \cdot z}\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* y (- (* 0.5 (/ x z)) (/ -1.0 (* x z)))))
double code(double x, double y, double z) {
	return y * ((0.5 * (x / z)) - (-1.0 / (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 = y * ((0.5d0 * (x / z)) - ((-1.0d0) / (x * z)))
end function
public static double code(double x, double y, double z) {
	return y * ((0.5 * (x / z)) - (-1.0 / (x * z)));
}
def code(x, y, z):
	return y * ((0.5 * (x / z)) - (-1.0 / (x * z)))
function code(x, y, z)
	return Float64(y * Float64(Float64(0.5 * Float64(x / z)) - Float64(-1.0 / Float64(x * z))))
end
function tmp = code(x, y, z)
	tmp = y * ((0.5 * (x / z)) - (-1.0 / (x * z)));
end
code[x_, y_, z_] := N[(y * N[(N[(0.5 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(-1.0 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y \cdot \left(0.5 \cdot \frac{x}{z} - \frac{-1}{x \cdot z}\right)
\end{array}
Derivation
  1. Initial program 84.9%

    \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
  2. Step-by-step derivation
    1. associate-*r/95.5%

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

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

      \[\leadsto \color{blue}{\frac{\cosh x}{z \cdot x} \cdot y} \]
    4. *-commutative84.9%

      \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{z \cdot x}} \]
    5. *-commutative84.9%

      \[\leadsto y \cdot \frac{\cosh x}{\color{blue}{x \cdot z}} \]
  3. Simplified84.9%

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

    \[\leadsto y \cdot \color{blue}{\left(\frac{1}{z \cdot x} + 0.5 \cdot \frac{x}{z}\right)} \]
  5. Final simplification66.4%

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

Alternative 11: 61.4% accurate, 9.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1.4) (not (<= x 1.4))) (* x (/ (* y 0.5) z)) (/ (/ y z) x)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.4) || !(x <= 1.4)) {
		tmp = x * ((y * 0.5) / z);
	} else {
		tmp = (y / z) / x;
	}
	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) :: tmp
    if ((x <= (-1.4d0)) .or. (.not. (x <= 1.4d0))) then
        tmp = x * ((y * 0.5d0) / z)
    else
        tmp = (y / z) / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.4) || !(x <= 1.4)) {
		tmp = x * ((y * 0.5) / z);
	} else {
		tmp = (y / z) / x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -1.4) or not (x <= 1.4):
		tmp = x * ((y * 0.5) / z)
	else:
		tmp = (y / z) / x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1.4) || !(x <= 1.4))
		tmp = Float64(x * Float64(Float64(y * 0.5) / z));
	else
		tmp = Float64(Float64(y / z) / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1.4) || ~((x <= 1.4)))
		tmp = x * ((y * 0.5) / z);
	else
		tmp = (y / z) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.4], N[Not[LessEqual[x, 1.4]], $MachinePrecision]], N[(x * N[(N[(y * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3999999999999999 or 1.3999999999999999 < x

    1. Initial program 79.4%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative79.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/79.4%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified79.4%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative40.5%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*43.4%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative43.4%

        \[\leadsto 0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{\color{blue}{x \cdot z}} \]
    6. Simplified43.4%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Taylor expanded in x around inf 40.5%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/40.5%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(y \cdot x\right)}{z}} \]
      2. associate-*r*40.5%

        \[\leadsto \frac{\color{blue}{\left(0.5 \cdot y\right) \cdot x}}{z} \]
      3. *-commutative40.5%

        \[\leadsto \frac{\color{blue}{x \cdot \left(0.5 \cdot y\right)}}{z} \]
      4. associate-*r*40.5%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 0.5\right) \cdot y}}{z} \]
    9. Simplified40.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot 0.5\right) \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-*l*40.5%

        \[\leadsto \frac{\color{blue}{x \cdot \left(0.5 \cdot y\right)}}{z} \]
      2. *-un-lft-identity40.5%

        \[\leadsto \frac{x \cdot \left(0.5 \cdot y\right)}{\color{blue}{1 \cdot z}} \]
      3. times-frac38.4%

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{0.5 \cdot y}{z}} \]
      4. /-rgt-identity38.4%

        \[\leadsto \color{blue}{x} \cdot \frac{0.5 \cdot y}{z} \]
    11. Applied egg-rr38.4%

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

    if -1.3999999999999999 < x < 1.3999999999999999

    1. Initial program 90.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/90.7%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified90.7%

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

      \[\leadsto \frac{y}{x} \cdot \color{blue}{\frac{1}{z}} \]
    5. Step-by-step derivation
      1. associate-*l/92.4%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{1}{z}}{x}} \]
      2. div-inv92.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \end{array} \]

Alternative 12: 65.5% accurate, 9.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1.4) (not (<= x 1.4))) (* y (/ (* x 0.5) z)) (/ (/ y z) x)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.4) || !(x <= 1.4)) {
		tmp = y * ((x * 0.5) / z);
	} else {
		tmp = (y / z) / x;
	}
	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) :: tmp
    if ((x <= (-1.4d0)) .or. (.not. (x <= 1.4d0))) then
        tmp = y * ((x * 0.5d0) / z)
    else
        tmp = (y / z) / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.4) || !(x <= 1.4)) {
		tmp = y * ((x * 0.5) / z);
	} else {
		tmp = (y / z) / x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -1.4) or not (x <= 1.4):
		tmp = y * ((x * 0.5) / z)
	else:
		tmp = (y / z) / x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1.4) || !(x <= 1.4))
		tmp = Float64(y * Float64(Float64(x * 0.5) / z));
	else
		tmp = Float64(Float64(y / z) / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1.4) || ~((x <= 1.4)))
		tmp = y * ((x * 0.5) / z);
	else
		tmp = (y / z) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.4], N[Not[LessEqual[x, 1.4]], $MachinePrecision]], N[(y * N[(N[(x * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\
\;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3999999999999999 or 1.3999999999999999 < x

    1. Initial program 79.4%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative79.4%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/79.4%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified79.4%

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x} + 0.5 \cdot \frac{y \cdot x}{z}} \]
    5. Step-by-step derivation
      1. +-commutative40.5%

        \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{z \cdot x}} \]
      2. associate-/l*43.4%

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} + \frac{y}{z \cdot x} \]
      3. *-commutative43.4%

        \[\leadsto 0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{\color{blue}{x \cdot z}} \]
    6. Simplified43.4%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{\frac{z}{x}} + \frac{y}{x \cdot z}} \]
    7. Taylor expanded in x around inf 40.5%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y \cdot x}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/40.5%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(y \cdot x\right)}{z}} \]
      2. associate-*r*40.5%

        \[\leadsto \frac{\color{blue}{\left(0.5 \cdot y\right) \cdot x}}{z} \]
      3. *-commutative40.5%

        \[\leadsto \frac{\color{blue}{x \cdot \left(0.5 \cdot y\right)}}{z} \]
      4. associate-*r*40.5%

        \[\leadsto \frac{\color{blue}{\left(x \cdot 0.5\right) \cdot y}}{z} \]
    9. Simplified40.5%

      \[\leadsto \color{blue}{\frac{\left(x \cdot 0.5\right) \cdot y}{z}} \]
    10. Step-by-step derivation
      1. *-commutative40.5%

        \[\leadsto \frac{\color{blue}{y \cdot \left(x \cdot 0.5\right)}}{z} \]
      2. *-un-lft-identity40.5%

        \[\leadsto \frac{y \cdot \left(x \cdot 0.5\right)}{\color{blue}{1 \cdot z}} \]
      3. times-frac44.1%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \frac{x \cdot 0.5}{z}} \]
      4. /-rgt-identity44.1%

        \[\leadsto \color{blue}{y} \cdot \frac{x \cdot 0.5}{z} \]
    11. Applied egg-rr44.1%

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

    if -1.3999999999999999 < x < 1.3999999999999999

    1. Initial program 90.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/90.7%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified90.7%

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

      \[\leadsto \frac{y}{x} \cdot \color{blue}{\frac{1}{z}} \]
    5. Step-by-step derivation
      1. associate-*l/92.4%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{1}{z}}{x}} \]
      2. div-inv92.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.4 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \end{array} \]

Alternative 13: 55.4% accurate, 11.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{-68} \lor \neg \left(y \leq 6.8 \cdot 10^{-146}\right):\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= y -9.6e-68) (not (<= y 6.8e-146))) (/ (/ y z) x) (/ (/ y x) z)))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -9.6e-68) || !(y <= 6.8e-146)) {
		tmp = (y / z) / x;
	} else {
		tmp = (y / x) / z;
	}
	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) :: tmp
    if ((y <= (-9.6d-68)) .or. (.not. (y <= 6.8d-146))) then
        tmp = (y / z) / x
    else
        tmp = (y / x) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((y <= -9.6e-68) || !(y <= 6.8e-146)) {
		tmp = (y / z) / x;
	} else {
		tmp = (y / x) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -9.6e-68) or not (y <= 6.8e-146):
		tmp = (y / z) / x
	else:
		tmp = (y / x) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -9.6e-68) || !(y <= 6.8e-146))
		tmp = Float64(Float64(y / z) / x);
	else
		tmp = Float64(Float64(y / x) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y <= -9.6e-68) || ~((y <= 6.8e-146)))
		tmp = (y / z) / x;
	else
		tmp = (y / x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -9.6e-68], N[Not[LessEqual[y, 6.8e-146]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{-68} \lor \neg \left(y \leq 6.8 \cdot 10^{-146}\right):\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.59999999999999965e-68 or 6.8000000000000001e-146 < y

    1. Initial program 91.1%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/91.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified91.1%

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

      \[\leadsto \frac{y}{x} \cdot \color{blue}{\frac{1}{z}} \]
    5. Step-by-step derivation
      1. associate-*l/61.1%

        \[\leadsto \color{blue}{\frac{y \cdot \frac{1}{z}}{x}} \]
      2. div-inv61.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{z}}}{x} \]
    6. Applied egg-rr61.1%

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

    if -9.59999999999999965e-68 < y < 6.8000000000000001e-146

    1. Initial program 71.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative71.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/71.7%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified71.7%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times74.6%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/73.7%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative73.7%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*87.2%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/99.8%

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

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x}} \]
    7. Step-by-step derivation
      1. associate-/l/49.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{z}} \]
    8. Simplified49.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{-68} \lor \neg \left(y \leq 6.8 \cdot 10^{-146}\right):\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{z}\\ \end{array} \]

Alternative 14: 49.8% accurate, 15.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{y}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -6.8e-125) (/ y (* x z)) (/ (/ y x) z)))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -6.8e-125) {
		tmp = y / (x * z);
	} else {
		tmp = (y / x) / z;
	}
	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) :: tmp
    if (y <= (-6.8d-125)) then
        tmp = y / (x * z)
    else
        tmp = (y / x) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -6.8e-125) {
		tmp = y / (x * z);
	} else {
		tmp = (y / x) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -6.8e-125:
		tmp = y / (x * z)
	else:
		tmp = (y / x) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -6.8e-125)
		tmp = Float64(y / Float64(x * z));
	else
		tmp = Float64(Float64(y / x) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -6.8e-125)
		tmp = y / (x * z);
	else
		tmp = (y / x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -6.8e-125], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{y}{x \cdot z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.7999999999999995e-125

    1. Initial program 89.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/89.8%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified89.8%

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

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

    if -6.7999999999999995e-125 < y

    1. Initial program 82.1%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
      2. associate-*r/82.1%

        \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    3. Simplified82.1%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
    4. Step-by-step derivation
      1. frac-times81.0%

        \[\leadsto \color{blue}{\frac{y \cdot \cosh x}{x \cdot z}} \]
      2. associate-*r/80.5%

        \[\leadsto \color{blue}{y \cdot \frac{\cosh x}{x \cdot z}} \]
      3. *-commutative80.5%

        \[\leadsto \color{blue}{\frac{\cosh x}{x \cdot z} \cdot y} \]
      4. associate-/r*92.2%

        \[\leadsto \color{blue}{\frac{\frac{\cosh x}{x}}{z}} \cdot y \]
      5. associate-*l/97.6%

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

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x}} \]
    7. Step-by-step derivation
      1. associate-/l/50.4%

        \[\leadsto \color{blue}{\frac{\frac{y}{x}}{z}} \]
    8. Simplified50.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{y}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{z}\\ \end{array} \]

Alternative 15: 48.4% accurate, 21.4× speedup?

\[\begin{array}{l} \\ \frac{y}{x \cdot z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ y (* x z)))
double code(double x, double y, double z) {
	return 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 = y / (x * z)
end function
public static double code(double x, double y, double z) {
	return y / (x * z);
}
def code(x, y, z):
	return y / (x * z)
function code(x, y, z)
	return Float64(y / Float64(x * z))
end
function tmp = code(x, y, z)
	tmp = y / (x * z);
end
code[x_, y_, z_] := N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{y}{x \cdot z}
\end{array}
Derivation
  1. Initial program 84.9%

    \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
  2. Step-by-step derivation
    1. *-commutative84.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{x} \cdot \cosh x}}{z} \]
    2. associate-*r/84.9%

      \[\leadsto \color{blue}{\frac{y}{x} \cdot \frac{\cosh x}{z}} \]
  3. Simplified84.9%

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

    \[\leadsto \color{blue}{\frac{y}{z \cdot x}} \]
  5. Final simplification48.1%

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

Developer target: 97.1% accurate, 1.0× 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 2023174 
(FPCore (x y z)
  :name "Linear.Quaternion:$ctan from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< y -4.618902267687042e-52) (* (/ (/ y z) x) (cosh x)) (if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x))))

  (/ (* (cosh x) (/ y x)) z))