Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 85.1% → 98.1%
Time: 14.0s
Alternatives: 16
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 16 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: 85.1% 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: 98.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 98.9%

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

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

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

    if 2.00000000000000016e-5 < (/.f64 (*.f64 (cosh.f64 x) (/.f64 y x)) z)

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.0%

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

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

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

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

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+154} \lor \neg \left(x \leq 1.95 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{y \cdot \frac{0.5}{\frac{z}{x \cdot x}}}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.29999999999999994e154 or 1.94999999999999992e121 < x

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\frac{0.5}{\frac{z}{x \cdot x}}}}{x} \]
    11. Simplified97.4%

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

    if -1.29999999999999994e154 < x < 1.94999999999999992e121

    1. Initial program 94.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{\frac{z}{\frac{y}{x}}}} \]
      4. add-log-exp53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+182} \lor \neg \left(x \leq 5.5 \cdot 10^{+144}\right):\\
\;\;\;\;\frac{y \cdot \frac{0.5}{\frac{z}{x \cdot x}}}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.3000000000000001e182 or 5.50000000000000022e144 < x

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot \color{blue}{\left(0.5 \cdot \frac{{x}^{2}}{z}\right)}}{x} \]
    10. Step-by-step derivation
      1. unpow2100.0%

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

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

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

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

    if -3.3000000000000001e182 < x < 5.50000000000000022e144

    1. Initial program 94.8%

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

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

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

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

Alternative 5: 79.7% accurate, 6.2× speedup?

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

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

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

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


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y \cdot \color{blue}{\left(x \cdot \left(x \cdot 0.5\right)\right)}}{x}}{z} \]
    11. Applied egg-rr77.9%

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

    if -4.9999999999999997e32 < x < 1.4499999999999999e47

    1. Initial program 95.1%

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

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

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

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

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

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

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

    if 1.4499999999999999e47 < x

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.1% accurate, 6.2× speedup?

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

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

\mathbf{elif}\;x \leq 9.6 \cdot 10^{+109}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{z} + \frac{y}{x \cdot z}\\

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


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{y \cdot \color{blue}{\left(x \cdot \left(x \cdot 0.5\right)\right)}}{x}}{z} \]
    11. Applied egg-rr77.9%

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

    if -2.00000000000000011e32 < x < 9.59999999999999949e109

    1. Initial program 94.8%

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

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

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

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

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

    if 9.59999999999999949e109 < x

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{\frac{0.5}{\frac{z}{x \cdot x}}}}{x} \]
    11. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{y \cdot \left(x \cdot \left(x \cdot 0.5\right)\right)}{x}}{z}\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+109}:\\ \;\;\;\;0.5 \cdot \frac{x \cdot y}{z} + \frac{y}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \frac{0.5}{\frac{z}{x \cdot x}}}{x}\\ \end{array} \]

Alternative 7: 76.1% accurate, 7.1× speedup?

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

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

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


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

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{0.5 \cdot \frac{{x}^{2} \cdot y}{z}}}{x} \]
    10. Step-by-step derivation
      1. unpow270.9%

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 8: 80.4% accurate, 7.1× speedup?

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

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

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


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

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 9: 64.3% accurate, 7.1× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot z}\\
\mathbf{if}\;x \leq -1.45:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{z}\\

\mathbf{elif}\;x \leq 1.4:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\left(0.5 \cdot \left(x \cdot x\right)\right) \cdot t_0\\


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

    if 1.3999999999999999 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(0.5 \cdot {x}^{2}\right)} \cdot \frac{y}{x \cdot z} \]
    8. Step-by-step derivation
      1. unpow244.4%

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

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

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

Alternative 10: 79.8% accurate, 7.1× speedup?

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

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

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

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


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

    if 1.3999999999999999 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 80.8% accurate, 8.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 61.2% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 72.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. div-inv43.3%

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 13: 65.3% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 14: 65.1% accurate, 9.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{z}\\

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

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


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

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < x < 1.3999999999999999

    1. Initial program 94.6%

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

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

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

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

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

    if 1.3999999999999999 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 54.4% accurate, 15.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.35e-107

    1. Initial program 82.2%

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

        \[\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. Taylor expanded in x around 0 47.5%

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

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

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

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

    if 1.35e-107 < z

    1. Initial program 85.3%

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

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

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

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

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

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

Alternative 16: 48.9% 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.2%

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

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

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

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

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

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

Developer target: 96.9% 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 2023280 
(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))