Linear.Quaternion:$ctan from linear-1.19.1.3

Percentage Accurate: 84.6% → 98.0%
Time: 9.0s
Alternatives: 18
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 18 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.6% 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.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 98.6%

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

    if 1.99999999999999985e210 < (*.f64 (cosh.f64 x) (/.f64 y x))

    1. Initial program 68.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u32.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef29.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
      6. frac-times40.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative40.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/35.0%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr27.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def30.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p60.2%

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

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

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

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

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

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

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

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

Alternative 2: 92.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x \leq -1.65 \cdot 10^{-76}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.8 \cdot 10^{-222}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{z}\\

\mathbf{elif}\;x \leq 2.7 \cdot 10^{+154}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.4500000000000001e191 or 2.70000000000000006e154 < x

    1. Initial program 63.5%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(0.5 \cdot x + \frac{1}{x}\right)}{z}} \]
    4. Step-by-step derivation
      1. distribute-lft-in48.3%

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

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

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

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

        \[\leadsto \frac{\frac{\left(y \cdot \left(x \cdot 0.5\right)\right) \cdot \left(y \cdot \left(x \cdot 0.5\right)\right) - \color{blue}{\frac{y}{x}} \cdot \left(y \cdot \frac{1}{x}\right)}{y \cdot \left(0.5 \cdot x\right) - y \cdot \frac{1}{x}}}{z} \]
      6. un-div-inv45.3%

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(0.25 \cdot {x}^{2} - \frac{1}{{x}^{2}}\right)}{0.5 \cdot x - \frac{1}{x}}}}{z} \]
    7. Step-by-step derivation
      1. associate-/l*100.0%

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{0.5 \cdot x - \frac{1}{x}}{0.25 \cdot {x}^{2} - \frac{1}{{x}^{2}}}}}}{z} \]
      2. *-commutative100.0%

        \[\leadsto \frac{\frac{y}{\frac{\color{blue}{x \cdot 0.5} - \frac{1}{x}}{0.25 \cdot {x}^{2} - \frac{1}{{x}^{2}}}}}{z} \]
      3. *-commutative100.0%

        \[\leadsto \frac{\frac{y}{\frac{x \cdot 0.5 - \frac{1}{x}}{\color{blue}{{x}^{2} \cdot 0.25} - \frac{1}{{x}^{2}}}}}{z} \]
      4. unpow2100.0%

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

        \[\leadsto \frac{\frac{y}{\frac{x \cdot 0.5 - \frac{1}{x}}{\color{blue}{x \cdot \left(x \cdot 0.25\right)} - \frac{1}{{x}^{2}}}}}{z} \]
      6. unpow2100.0%

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

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

    if -1.4500000000000001e191 < x < -1.64999999999999992e-76 or -1.79999999999999987e-222 < x < 2.70000000000000006e154

    1. Initial program 91.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u55.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef39.8%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative41.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/38.5%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr36.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def51.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p85.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1 \cdot \frac{\cosh x}{z}}{x}} \]
      12. *-lft-identity97.7%

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

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

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

    if -1.64999999999999992e-76 < x < -1.79999999999999987e-222

    1. Initial program 96.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+191}:\\ \;\;\;\;\frac{\frac{y}{\frac{x \cdot 0.5 + \frac{-1}{x}}{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}}}{z}\\ \mathbf{elif}\;x \leq -1.65 \cdot 10^{-76}:\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-222}:\\ \;\;\;\;\frac{y}{x} \cdot \frac{1}{z}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+154}:\\ \;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{\frac{x \cdot 0.5 + \frac{-1}{x}}{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}}}{z}\\ \end{array} \]

Alternative 3: 96.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
    4. expm1-log1p-u48.8%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
    5. expm1-udef36.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
    6. frac-times38.0%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
    7. *-commutative38.0%

      \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
    8. associate-*r/35.2%

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

      \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
  5. Applied egg-rr33.9%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
  6. Step-by-step derivation
    1. expm1-def46.1%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
    2. expm1-log1p80.1%

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

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

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

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

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

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

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

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

Alternative 4: 75.1% accurate, 3.7× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.0000000000000005e163 or 7.3999999999999995e184 < x

    1. Initial program 66.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\left(y \cdot \left(x \cdot 0.5\right)\right) \cdot \left(y \cdot \left(x \cdot 0.5\right)\right) - \color{blue}{\frac{y}{x}} \cdot \left(y \cdot \frac{1}{x}\right)}{y \cdot \left(0.5 \cdot x\right) - y \cdot \frac{1}{x}}}{z} \]
      6. un-div-inv46.9%

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

        \[\leadsto \frac{\frac{\left(y \cdot \left(x \cdot 0.5\right)\right) \cdot \left(y \cdot \left(x \cdot 0.5\right)\right) - \frac{y}{x} \cdot \frac{y}{x}}{y \cdot \color{blue}{\left(x \cdot 0.5\right)} - y \cdot \frac{1}{x}}}{z} \]
      8. un-div-inv46.9%

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

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

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

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

        \[\leadsto \frac{y}{z} \cdot \frac{\color{blue}{{x}^{2} \cdot 0.25} - \frac{1}{{x}^{2}}}{0.5 \cdot x - \frac{1}{x}} \]
      3. unpow290.0%

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

        \[\leadsto \frac{y}{z} \cdot \frac{\color{blue}{x \cdot \left(x \cdot 0.25\right)} - \frac{1}{{x}^{2}}}{0.5 \cdot x - \frac{1}{x}} \]
      5. unpow290.0%

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

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

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

    if -7.0000000000000005e163 < x < 2.8000000000000002e25

    1. Initial program 94.7%

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

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

    if 2.8000000000000002e25 < x < 7.3999999999999995e184

    1. Initial program 75.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u47.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef47.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative55.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/47.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr36.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def36.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p61.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{\left(x \cdot 0.5\right) \cdot \left(-x \cdot z\right) + z \cdot -1}{z \cdot \left(-x \cdot z\right)}} \]
      6. distribute-rgt-neg-in40.0%

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \color{blue}{\left(x \cdot \left(-z\right)\right)} + z \cdot -1}{z \cdot \left(-x \cdot z\right)} \]
      7. distribute-rgt-neg-in40.0%

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

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

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

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

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot \left(-z\right)\right) + \color{blue}{-1 \cdot z}}{x \cdot \left(\left(-z\right) \cdot z\right)} \]
      4. neg-mul-140.0%

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot \left(-z\right)\right) + \color{blue}{\left(-z\right)}}{x \cdot \left(\left(-z\right) \cdot z\right)} \]
      5. unsub-neg40.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+163}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}{x \cdot 0.5 + \frac{-1}{x}}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+25}:\\ \;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(x \cdot y\right)}{z}\\ \mathbf{elif}\;x \leq 7.4 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \frac{z \cdot \left(\left(x \cdot 0.5\right) \cdot \left(-x\right)\right) - z}{x \cdot \left(z \cdot \left(-z\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot \frac{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}{x \cdot 0.5 + \frac{-1}{x}}\\ \end{array} \]

Alternative 5: 78.3% accurate, 3.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-133} \lor \neg \left(x \leq 2.1 \cdot 10^{+154}\right):\\
\;\;\;\;\frac{\frac{y}{\frac{x \cdot 0.5 + \frac{-1}{x}}{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6999999999999999e-133 or 2.09999999999999994e154 < x

    1. Initial program 83.3%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(0.5 \cdot x + \frac{1}{x}\right)}{z}} \]
    4. Step-by-step derivation
      1. distribute-lft-in56.3%

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

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

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

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

        \[\leadsto \frac{\frac{\left(y \cdot \left(x \cdot 0.5\right)\right) \cdot \left(y \cdot \left(x \cdot 0.5\right)\right) - \color{blue}{\frac{y}{x}} \cdot \left(y \cdot \frac{1}{x}\right)}{y \cdot \left(0.5 \cdot x\right) - y \cdot \frac{1}{x}}}{z} \]
      6. un-div-inv41.6%

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

        \[\leadsto \frac{\frac{\left(y \cdot \left(x \cdot 0.5\right)\right) \cdot \left(y \cdot \left(x \cdot 0.5\right)\right) - \frac{y}{x} \cdot \frac{y}{x}}{y \cdot \color{blue}{\left(x \cdot 0.5\right)} - y \cdot \frac{1}{x}}}{z} \]
      8. un-div-inv41.7%

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

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot \left(0.25 \cdot {x}^{2} - \frac{1}{{x}^{2}}\right)}{0.5 \cdot x - \frac{1}{x}}}}{z} \]
    7. Step-by-step derivation
      1. associate-/l*78.1%

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{0.5 \cdot x - \frac{1}{x}}{0.25 \cdot {x}^{2} - \frac{1}{{x}^{2}}}}}}{z} \]
      2. *-commutative78.1%

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

        \[\leadsto \frac{\frac{y}{\frac{x \cdot 0.5 - \frac{1}{x}}{\color{blue}{{x}^{2} \cdot 0.25} - \frac{1}{{x}^{2}}}}}{z} \]
      4. unpow278.1%

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

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

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

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

    if -2.6999999999999999e-133 < x < 2.09999999999999994e154

    1. Initial program 89.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u58.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef41.1%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative42.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/39.6%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr37.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def55.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p85.6%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-133} \lor \neg \left(x \leq 2.1 \cdot 10^{+154}\right):\\ \;\;\;\;\frac{\frac{y}{\frac{x \cdot 0.5 + \frac{-1}{x}}{x \cdot \left(x \cdot 0.25\right) + \frac{-1}{x \cdot x}}}}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{1}{x \cdot z} + y \cdot \left(0.5 \cdot \frac{x}{z}\right)\\ \end{array} \]

Alternative 6: 68.1% accurate, 4.6× speedup?

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

\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.5e15 or 2.8000000000000002e25 < x

    1. Initial program 77.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u36.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef36.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
      6. frac-times39.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative39.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/34.1%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr30.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def30.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p65.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{\left(x \cdot 0.5\right) \cdot \left(-x \cdot z\right) + z \cdot -1}{z \cdot \left(-x \cdot z\right)}} \]
      6. distribute-rgt-neg-in47.9%

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \color{blue}{\left(x \cdot \left(-z\right)\right)} + z \cdot -1}{z \cdot \left(-x \cdot z\right)} \]
      7. distribute-rgt-neg-in47.9%

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

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

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

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

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot \left(-z\right)\right) + \color{blue}{-1 \cdot z}}{x \cdot \left(\left(-z\right) \cdot z\right)} \]
      4. neg-mul-148.7%

        \[\leadsto y \cdot \frac{\left(x \cdot 0.5\right) \cdot \left(x \cdot \left(-z\right)\right) + \color{blue}{\left(-z\right)}}{x \cdot \left(\left(-z\right) \cdot z\right)} \]
      5. unsub-neg48.7%

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

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

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

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

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

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

    if -4.5e15 < x < 2.8000000000000002e25

    1. Initial program 94.8%

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

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

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

Alternative 7: 67.0% accurate, 5.1× speedup?

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

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

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

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


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

    1. Initial program 47.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u29.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef29.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
      6. frac-times35.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative35.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/29.4%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr23.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def23.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999987e232 < x < 1.05e26

    1. Initial program 94.0%

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

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

    if 1.05e26 < x

    1. Initial program 73.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u39.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef39.3%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative46.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/39.3%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr32.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def32.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+232}:\\ \;\;\;\;y \cdot \frac{z \cdot \left(x \cdot 0.5\right) + \frac{z}{x}}{z \cdot z}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(x \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z + \left(x \cdot 0.5\right) \cdot \left(x \cdot z\right)}{z \cdot \left(x \cdot z\right)}\\ \end{array} \]

Alternative 8: 67.5% accurate, 5.6× speedup?

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

    1. Initial program 68.4%

      \[\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*63.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u38.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef38.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
      6. frac-times44.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative44.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/38.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr31.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def31.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999997e232 < x < 1.3e17

    1. Initial program 93.9%

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

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

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

Alternative 9: 65.4% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-290}:\\ \;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(x \cdot y\right)}{z}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+233}:\\ \;\;\;\;\frac{-y}{\frac{z}{x \cdot -0.5 + \frac{-1}{x}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -1.15e-290)
   (/ (+ (/ y x) (* 0.5 (* x y))) z)
   (if (<= y 2.8e+233)
     (/ (- y) (/ z (+ (* x -0.5) (/ -1.0 x))))
     (/ (* y (+ (* x 0.5) (/ 1.0 x))) z))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.15e-290) {
		tmp = ((y / x) + (0.5 * (x * y))) / z;
	} else if (y <= 2.8e+233) {
		tmp = -y / (z / ((x * -0.5) + (-1.0 / x)));
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= (-1.15d-290)) then
        tmp = ((y / x) + (0.5d0 * (x * y))) / z
    else if (y <= 2.8d+233) then
        tmp = -y / (z / ((x * (-0.5d0)) + ((-1.0d0) / x)))
    else
        tmp = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.15e-290) {
		tmp = ((y / x) + (0.5 * (x * y))) / z;
	} else if (y <= 2.8e+233) {
		tmp = -y / (z / ((x * -0.5) + (-1.0 / x)));
	} else {
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -1.15e-290:
		tmp = ((y / x) + (0.5 * (x * y))) / z
	elif y <= 2.8e+233:
		tmp = -y / (z / ((x * -0.5) + (-1.0 / x)))
	else:
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -1.15e-290)
		tmp = Float64(Float64(Float64(y / x) + Float64(0.5 * Float64(x * y))) / z);
	elseif (y <= 2.8e+233)
		tmp = Float64(Float64(-y) / Float64(z / Float64(Float64(x * -0.5) + Float64(-1.0 / x))));
	else
		tmp = Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -1.15e-290)
		tmp = ((y / x) + (0.5 * (x * y))) / z;
	elseif (y <= 2.8e+233)
		tmp = -y / (z / ((x * -0.5) + (-1.0 / x)));
	else
		tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -1.15e-290], N[(N[(N[(y / x), $MachinePrecision] + N[(0.5 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.8e+233], N[((-y) / N[(z / N[(N[(x * -0.5), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+233}:\\
\;\;\;\;\frac{-y}{\frac{z}{x \cdot -0.5 + \frac{-1}{x}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.15e-290

    1. Initial program 88.4%

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

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

    if -1.15e-290 < y < 2.8000000000000001e233

    1. Initial program 83.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u50.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef35.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative39.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/36.3%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr32.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def48.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e233 < y

    1. Initial program 95.6%

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

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

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

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

Alternative 10: 66.0% accurate, 7.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.6999999999999999e-222

    1. Initial program 88.9%

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

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

    if -3.6999999999999999e-222 < x

    1. Initial program 83.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\cosh x}{z} \cdot \frac{y}{x}} \]
      4. expm1-log1p-u51.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)\right)} \]
      5. expm1-udef37.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cosh x}{z} \cdot \frac{y}{x}\right)} - 1} \]
      6. frac-times42.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cosh x \cdot y}{z \cdot x}}\right)} - 1 \]
      7. *-commutative42.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\cosh x \cdot y}{\color{blue}{x \cdot z}}\right)} - 1 \]
      8. associate-*r/39.1%

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

        \[\leadsto e^{\mathsf{log1p}\left(\cosh x \cdot \color{blue}{\frac{\frac{y}{x}}{z}}\right)} - 1 \]
    5. Applied egg-rr34.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)} - 1} \]
    6. Step-by-step derivation
      1. expm1-def48.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\cosh x \cdot \frac{\frac{y}{x}}{z}\right)\right)} \]
      2. expm1-log1p79.1%

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

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

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

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

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

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

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

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

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

Alternative 11: 62.2% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001 < x < 1.3999999999999999

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

Alternative 12: 66.0% accurate, 9.6× speedup?

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

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

    if -1.6000000000000001 < x < 1.3999999999999999

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

Alternative 13: 66.2% accurate, 9.6× speedup?

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

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

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

\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.6000000000000001

    1. Initial program 82.2%

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

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

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

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

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

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

    if -1.6000000000000001 < x < 1.3999999999999999

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    if 1.3999999999999999 < x

    1. Initial program 77.2%

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

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

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

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

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

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

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

Alternative 14: 65.7% accurate, 9.7× speedup?

\[\begin{array}{l} \\ \frac{y \cdot \left(x \cdot 0.5 + \frac{1}{x}\right)}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* y (+ (* x 0.5) (/ 1.0 x))) z))
double code(double x, double y, double z) {
	return (y * ((x * 0.5) + (1.0 / x))) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (y * ((x * 0.5d0) + (1.0d0 / x))) / z
end function
public static double code(double x, double y, double z) {
	return (y * ((x * 0.5) + (1.0 / x))) / z;
}
def code(x, y, z):
	return (y * ((x * 0.5) + (1.0 / x))) / z
function code(x, y, z)
	return Float64(Float64(y * Float64(Float64(x * 0.5) + Float64(1.0 / x))) / z)
end
function tmp = code(x, y, z)
	tmp = (y * ((x * 0.5) + (1.0 / x))) / z;
end
code[x_, y_, z_] := N[(N[(y * N[(N[(x * 0.5), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

Alternative 15: 65.7% accurate, 9.7× speedup?

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

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

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

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

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

Alternative 16: 49.5% accurate, 15.2× speedup?

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

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

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


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

    1. Initial program 88.8%

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

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

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

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

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

    if -1e-167 < z

    1. Initial program 84.6%

      \[\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*80.4%

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

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

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

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

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

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

Alternative 17: 48.4% accurate, 21.4× speedup?

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

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

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

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

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

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

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

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

Alternative 18: 53.1% accurate, 21.4× speedup?

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{1 \cdot y}{z}}}{x} \]
    3. *-un-lft-identity48.7%

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

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

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

Developer target: 96.7% 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 2023293 
(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))