Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.5% → 99.4%
Time: 8.1s
Alternatives: 12
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 12 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.5% 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.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{+180} \lor \neg \left(t_0 \leq 10^{-68}\right):\\
\;\;\;\;\frac{\frac{\cosh x \cdot y}{z}}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < -2e180 or 1.00000000000000007e-68 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z)

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

    if -2e180 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z) < 1.00000000000000007e-68

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

Alternative 2: 92.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\cosh x \cdot \frac{y}{x}}{z}\\
\mathbf{if}\;t_0 \leq 10^{-68}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 95.5%

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

    if 1.00000000000000007e-68 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z)

    1. Initial program 71.7%

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

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

      \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
    4. Step-by-step derivation
      1. associate-/r/71.6%

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

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

        \[\leadsto \frac{\cosh x \cdot y}{\color{blue}{x \cdot z}} \]
      4. times-frac93.1%

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

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

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

Alternative 3: 90.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.99999999999999983e-103 or 5.5000000000000001e-285 < y

    1. Initial program 87.8%

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

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

      \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
    4. Step-by-step derivation
      1. associate-/r/87.7%

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      2. frac-times84.7%

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

        \[\leadsto \frac{\cosh x \cdot y}{\color{blue}{x \cdot z}} \]
      4. times-frac96.2%

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

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

    if -3.99999999999999983e-103 < y < 5.5000000000000001e-285

    1. Initial program 63.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      3. add-log-exp33.6%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      4. *-un-lft-identity33.6%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      5. log-prod33.6%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      6. metadata-eval33.6%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
      7. add-log-exp63.9%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      8. associate-*r/99.9%

        \[\leadsto 0 + \frac{\color{blue}{\frac{\cosh x \cdot y}{x}}}{z} \]
      9. associate-/r*89.9%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      10. times-frac69.0%

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

      \[\leadsto \color{blue}{0 + \frac{\cosh x}{x} \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. +-lft-identity69.0%

        \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
      2. times-frac89.9%

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

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

        \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
      5. *-commutative89.8%

        \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
      6. associate-/l/91.8%

        \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
      7. associate-*r*91.8%

        \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
      8. associate-/l/89.8%

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

        \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
      10. *-rgt-identity89.8%

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{x \cdot z} \]
      11. *-commutative89.8%

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

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

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

Alternative 4: 83.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4.5e246

    1. Initial program 83.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      3. add-log-exp59.2%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      4. *-un-lft-identity59.2%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      5. log-prod59.2%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      6. metadata-eval59.2%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
      7. add-log-exp83.4%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      8. associate-*r/94.1%

        \[\leadsto 0 + \frac{\color{blue}{\frac{\cosh x \cdot y}{x}}}{z} \]
      9. associate-/r*88.2%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      10. times-frac90.7%

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

      \[\leadsto \color{blue}{0 + \frac{\cosh x}{x} \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. +-lft-identity90.7%

        \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
      2. times-frac88.2%

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

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

        \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
      5. *-commutative88.0%

        \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
      6. associate-/l/90.9%

        \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
      7. associate-*r*90.9%

        \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
      8. associate-/l/88.0%

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

        \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
      10. *-rgt-identity88.1%

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{x \cdot z} \]
      11. *-commutative88.1%

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

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

    if 4.5e246 < x

    1. Initial program 78.6%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Taylor expanded in x around 0 79.4%

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

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

Alternative 5: 71.3% accurate, 5.0× speedup?

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

\\
\begin{array}{l}
t_0 := 1 + 0.5 \cdot \left(x \cdot x\right)\\
t_1 := \frac{y}{x} \cdot \frac{t_0}{z}\\
t_2 := \frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+107}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{-286}:\\
\;\;\;\;y \cdot \frac{t_0}{x \cdot z}\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+181}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.11999999999999997e107 or 7.9999999999999993e181 < y

    1. Initial program 83.9%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Taylor expanded in x around 0 77.0%

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

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

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

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

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

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

    if -1.11999999999999997e107 < y < -5.59999999999999997e-93 or 2.1999999999999999e-286 < y < 7.9999999999999993e181

    1. Initial program 90.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      3. add-log-exp63.6%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      4. *-un-lft-identity63.6%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      5. log-prod63.6%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      6. metadata-eval63.6%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
      7. add-log-exp90.2%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      8. associate-*r/97.8%

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

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      10. times-frac94.8%

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

      \[\leadsto \color{blue}{0 + \frac{\cosh x}{x} \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. +-lft-identity94.8%

        \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
      2. times-frac83.0%

        \[\leadsto \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      3. *-rgt-identity83.0%

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

        \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
      5. *-commutative82.8%

        \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
      6. associate-/l/85.8%

        \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
      7. associate-*r*85.8%

        \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
      8. associate-/l/82.8%

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

        \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
      10. *-rgt-identity82.8%

        \[\leadsto y \cdot \frac{\color{blue}{\cosh x}}{x \cdot z} \]
      11. *-commutative82.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(1 + 0.5 \cdot {x}^{2}\right) \cdot y}{z \cdot x}} \]
    12. Step-by-step derivation
      1. times-frac71.9%

        \[\leadsto \color{blue}{\frac{1 + 0.5 \cdot {x}^{2}}{z} \cdot \frac{y}{x}} \]
      2. unpow271.9%

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

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

    if -5.59999999999999997e-93 < y < 2.1999999999999999e-286

    1. Initial program 64.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      3. add-log-exp33.1%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      4. *-un-lft-identity33.1%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      5. log-prod33.1%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      6. metadata-eval33.1%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
      7. add-log-exp64.7%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      8. associate-*r/99.9%

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

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      10. times-frac69.5%

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
      2. times-frac86.9%

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

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

        \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
      5. *-commutative86.9%

        \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
      6. associate-/l/90.5%

        \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
      7. associate-*r*90.5%

        \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
      8. associate-/l/86.9%

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

        \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
      10. *-rgt-identity86.9%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1 \cdot z + \left(z \cdot x\right) \cdot \left(x \cdot 0.5\right)}{\left(z \cdot x\right) \cdot z}} \]
      4. *-un-lft-identity67.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+107}:\\ \;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-93}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1 + 0.5 \cdot \left(x \cdot x\right)}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-286}:\\ \;\;\;\;y \cdot \frac{1 + 0.5 \cdot \left(x \cdot x\right)}{x \cdot z}\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+181}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1 + 0.5 \cdot \left(x \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{x} - x \cdot -0.5}{\frac{z}{y}}\\ \end{array} \]

Alternative 6: 65.4% accurate, 8.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e235

    1. Initial program 71.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{z \cdot x}} \]
    5. Step-by-step derivation
      1. clear-num84.8%

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

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

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

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

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

    if -4.5e235 < z

    1. Initial program 84.1%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Taylor expanded in x around 0 63.5%

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

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

Alternative 7: 65.3% accurate, 8.2× speedup?

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
    3. add-log-exp60.2%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    4. *-un-lft-identity60.2%

      \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    5. log-prod60.2%

      \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    6. metadata-eval60.2%

      \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
    7. add-log-exp83.1%

      \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
    8. associate-*r/94.4%

      \[\leadsto 0 + \frac{\color{blue}{\frac{\cosh x \cdot y}{x}}}{z} \]
    9. associate-/r*85.7%

      \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
    10. times-frac90.8%

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

    \[\leadsto \color{blue}{0 + \frac{\cosh x}{x} \cdot \frac{y}{z}} \]
  6. Step-by-step derivation
    1. +-lft-identity90.8%

      \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
    2. times-frac85.7%

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

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

      \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
    5. *-commutative85.6%

      \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
    6. associate-/l/88.3%

      \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
    7. associate-*r*88.3%

      \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
    8. associate-/l/85.6%

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

      \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
    10. *-rgt-identity85.6%

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

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

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

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

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

Alternative 8: 67.9% accurate, 8.2× speedup?

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
    3. add-log-exp60.2%

      \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    4. *-un-lft-identity60.2%

      \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    5. log-prod60.2%

      \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
    6. metadata-eval60.2%

      \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
    7. add-log-exp83.1%

      \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
    8. associate-*r/94.4%

      \[\leadsto 0 + \frac{\color{blue}{\frac{\cosh x \cdot y}{x}}}{z} \]
    9. associate-/r*85.7%

      \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
    10. times-frac90.8%

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

    \[\leadsto \color{blue}{0 + \frac{\cosh x}{x} \cdot \frac{y}{z}} \]
  6. Step-by-step derivation
    1. +-lft-identity90.8%

      \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
    2. times-frac85.7%

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

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

      \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
    5. *-commutative85.6%

      \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
    6. associate-/l/88.3%

      \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
    7. associate-*r*88.3%

      \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
    8. associate-/l/85.6%

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

      \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
    10. *-rgt-identity85.6%

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{1 \cdot z + \left(z \cdot x\right) \cdot \left(x \cdot 0.5\right)}{\left(z \cdot x\right) \cdot z}} \]
    4. *-un-lft-identity61.0%

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

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

    \[\leadsto y \cdot \color{blue}{\frac{1 + 0.5 \cdot {x}^{2}}{z \cdot x}} \]
  12. Step-by-step derivation
    1. unpow268.8%

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

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

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

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

Alternative 9: 65.0% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 77.7%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Taylor expanded in x around 0 38.8%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} \]
    5. Simplified38.0%

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

    if -1.3999999999999999 < x < 1.3999999999999999

    1. Initial program 88.7%

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

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

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

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

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

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

Alternative 10: 65.1% accurate, 9.6× speedup?

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

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

\mathbf{elif}\;x \leq 1.4:\\
\;\;\;\;\frac{y}{x \cdot z}\\

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


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

    1. Initial program 74.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      3. add-log-exp74.6%

        \[\leadsto \color{blue}{\log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      4. *-un-lft-identity74.6%

        \[\leadsto \log \color{blue}{\left(1 \cdot e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      5. log-prod74.6%

        \[\leadsto \color{blue}{\log 1 + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right)} \]
      6. metadata-eval74.6%

        \[\leadsto \color{blue}{0} + \log \left(e^{\frac{\cosh x \cdot \frac{y}{x}}{z}}\right) \]
      7. add-log-exp74.6%

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot \frac{y}{x}}{z}} \]
      8. associate-*r/100.0%

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

        \[\leadsto 0 + \color{blue}{\frac{\cosh x \cdot y}{x \cdot z}} \]
      10. times-frac90.5%

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{x} \cdot \frac{y}{z}} \]
      2. times-frac79.4%

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

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

        \[\leadsto \color{blue}{\left(\cosh x \cdot y\right) \cdot \frac{1}{x \cdot z}} \]
      5. *-commutative79.4%

        \[\leadsto \color{blue}{\left(y \cdot \cosh x\right)} \cdot \frac{1}{x \cdot z} \]
      6. associate-/l/84.1%

        \[\leadsto \left(y \cdot \cosh x\right) \cdot \color{blue}{\frac{\frac{1}{z}}{x}} \]
      7. associate-*r*84.1%

        \[\leadsto \color{blue}{y \cdot \left(\cosh x \cdot \frac{\frac{1}{z}}{x}\right)} \]
      8. associate-/l/79.4%

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

        \[\leadsto y \cdot \color{blue}{\frac{\cosh x \cdot 1}{x \cdot z}} \]
      10. *-rgt-identity79.4%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1 \cdot z + \left(z \cdot x\right) \cdot \left(x \cdot 0.5\right)}{\left(z \cdot x\right) \cdot z}} \]
      4. *-un-lft-identity37.8%

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

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

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

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

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

        \[\leadsto \frac{0.5 \cdot \color{blue}{\frac{y}{\frac{1}{x}}}}{z} \]
      4. associate-*l/33.1%

        \[\leadsto \color{blue}{\frac{0.5}{z} \cdot \frac{y}{\frac{1}{x}}} \]
      5. *-commutative33.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{1}{x}} \cdot \frac{0.5}{z}} \]
      6. associate-/r/33.1%

        \[\leadsto \color{blue}{\left(\frac{y}{1} \cdot x\right)} \cdot \frac{0.5}{z} \]
      7. /-rgt-identity33.1%

        \[\leadsto \left(\color{blue}{y} \cdot x\right) \cdot \frac{0.5}{z} \]
      8. *-commutative33.1%

        \[\leadsto \color{blue}{\left(x \cdot y\right)} \cdot \frac{0.5}{z} \]
    13. Simplified33.1%

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

    if -1.4199999999999999 < x < 1.3999999999999999

    1. Initial program 88.7%

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

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

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

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

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

    if 1.3999999999999999 < x

    1. Initial program 80.6%

      \[\frac{\cosh x \cdot \frac{y}{x}}{z} \]
    2. Taylor expanded in x around 0 44.2%

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{y}{\frac{z}{x}}} \]
    5. Simplified46.9%

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

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

Alternative 11: 56.2% accurate, 11.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+26} \lor \neg \left(y \leq 2.6 \cdot 10^{+71}\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 -3e+26) (not (<= y 2.6e+71))) (/ (/ y z) x) (/ (/ y x) z)))
double code(double x, double y, double z) {
	double tmp;
	if ((y <= -3e+26) || !(y <= 2.6e+71)) {
		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 <= (-3d+26)) .or. (.not. (y <= 2.6d+71))) 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 <= -3e+26) || !(y <= 2.6e+71)) {
		tmp = (y / z) / x;
	} else {
		tmp = (y / x) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (y <= -3e+26) or not (y <= 2.6e+71):
		tmp = (y / z) / x
	else:
		tmp = (y / x) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((y <= -3e+26) || !(y <= 2.6e+71))
		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 <= -3e+26) || ~((y <= 2.6e+71)))
		tmp = (y / z) / x;
	else
		tmp = (y / x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[y, -3e+26], N[Not[LessEqual[y, 2.6e+71]], $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 -3 \cdot 10^{+26} \lor \neg \left(y \leq 2.6 \cdot 10^{+71}\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 < -2.99999999999999997e26 or 2.59999999999999991e71 < y

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

    if -2.99999999999999997e26 < y < 2.59999999999999991e71

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+26} \lor \neg \left(y \leq 2.6 \cdot 10^{+71}\right):\\ \;\;\;\;\frac{\frac{y}{z}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{z}\\ \end{array} \]

Alternative 12: 49.2% 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 83.1%

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

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

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

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

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

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

Developer target: 96.6% 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 2023268 
(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))