
(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:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(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(Float64(y * Float64(cosh(x) / z)) / x) end
function tmp = code(x, y, z) tmp = (y * (cosh(x) / z)) / x; end
code[x_, y_, z_] := N[(N[(y * N[(N[Cosh[x], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y \cdot \frac{\cosh x}{z}}{x}
\end{array}
Initial program 85.3%
associate-*r/81.0%
Simplified81.0%
associate-*r/85.3%
associate-*l/85.3%
*-commutative85.3%
associate-*l/97.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (cosh x) (/ (/ y x) z))))
(if (<= x -1e-11)
t_0
(if (<= x 1.6e-302)
(/ (/ y z) x)
(if (<= x 3.2e+229) t_0 (/ (- y) (/ z (+ (* x -0.5) (/ -1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = cosh(x) * ((y / x) / z);
double tmp;
if (x <= -1e-11) {
tmp = t_0;
} else if (x <= 1.6e-302) {
tmp = (y / z) / x;
} else if (x <= 3.2e+229) {
tmp = t_0;
} else {
tmp = -y / (z / ((x * -0.5) + (-1.0 / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = cosh(x) * ((y / x) / z)
if (x <= (-1d-11)) then
tmp = t_0
else if (x <= 1.6d-302) then
tmp = (y / z) / x
else if (x <= 3.2d+229) then
tmp = t_0
else
tmp = -y / (z / ((x * (-0.5d0)) + ((-1.0d0) / 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) / z);
double tmp;
if (x <= -1e-11) {
tmp = t_0;
} else if (x <= 1.6e-302) {
tmp = (y / z) / x;
} else if (x <= 3.2e+229) {
tmp = t_0;
} else {
tmp = -y / (z / ((x * -0.5) + (-1.0 / x)));
}
return tmp;
}
def code(x, y, z): t_0 = math.cosh(x) * ((y / x) / z) tmp = 0 if x <= -1e-11: tmp = t_0 elif x <= 1.6e-302: tmp = (y / z) / x elif x <= 3.2e+229: tmp = t_0 else: tmp = -y / (z / ((x * -0.5) + (-1.0 / x))) return tmp
function code(x, y, z) t_0 = Float64(cosh(x) * Float64(Float64(y / x) / z)) tmp = 0.0 if (x <= -1e-11) tmp = t_0; elseif (x <= 1.6e-302) tmp = Float64(Float64(y / z) / x); elseif (x <= 3.2e+229) tmp = t_0; else tmp = Float64(Float64(-y) / Float64(z / Float64(Float64(x * -0.5) + Float64(-1.0 / x)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = cosh(x) * ((y / x) / z); tmp = 0.0; if (x <= -1e-11) tmp = t_0; elseif (x <= 1.6e-302) tmp = (y / z) / x; elseif (x <= 3.2e+229) tmp = t_0; else tmp = -y / (z / ((x * -0.5) + (-1.0 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Cosh[x], $MachinePrecision] * N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e-11], t$95$0, If[LessEqual[x, 1.6e-302], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, 3.2e+229], t$95$0, N[((-y) / N[(z / N[(N[(x * -0.5), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cosh x \cdot \frac{\frac{y}{x}}{z}\\
\mathbf{if}\;x \leq -1 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+229}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{z}{x \cdot -0.5 + \frac{-1}{x}}}\\
\end{array}
\end{array}
if x < -9.99999999999999939e-12 or 1.59999999999999989e-302 < x < 3.1999999999999998e229Initial program 89.3%
associate-*r/83.4%
Simplified83.4%
if -9.99999999999999939e-12 < x < 1.59999999999999989e-302Initial program 83.2%
associate-*r/83.2%
Simplified83.2%
associate-*r/83.2%
associate-*l/83.0%
*-commutative83.0%
associate-*l/95.6%
Applied egg-rr95.6%
Taylor expanded in x around 0 95.7%
if 3.1999999999999998e229 < x Initial program 55.6%
associate-*r/50.0%
Simplified50.0%
Taylor expanded in x around 0 57.2%
Taylor expanded in y around 0 73.0%
Taylor expanded in z around -inf 57.2%
mul-1-neg57.2%
associate-/l*73.0%
*-commutative73.0%
Simplified73.0%
Final simplification86.0%
(FPCore (x y z) :precision binary64 (* (/ (cosh x) x) (/ y z)))
double code(double x, double y, double z) {
return (cosh(x) / 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 = (cosh(x) / x) * (y / z)
end function
public static double code(double x, double y, double z) {
return (Math.cosh(x) / x) * (y / z);
}
def code(x, y, z): return (math.cosh(x) / x) * (y / z)
function code(x, y, z) return Float64(Float64(cosh(x) / x) * Float64(y / z)) end
function tmp = code(x, y, z) tmp = (cosh(x) / x) * (y / z); end
code[x_, y_, z_] := N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x}{x} \cdot \frac{y}{z}
\end{array}
Initial program 85.3%
associate-/l*80.6%
associate-/r/86.3%
associate-*l/79.9%
*-commutative79.9%
Simplified79.9%
associate-/l*86.5%
associate-/r/91.2%
Applied egg-rr91.2%
Final simplification91.2%
(FPCore (x y z)
:precision binary64
(if (<= z -1.1e+76)
(+ (* 0.5 (/ (* y x) z)) (/ y (* x z)))
(if (<= z -4e-161)
(/ (+ (* z (/ y z)) (* x (* 0.5 (* y x)))) (* x z))
(* (/ y z) (+ (/ 1.0 x) (* x 0.5))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+76) {
tmp = (0.5 * ((y * x) / z)) + (y / (x * z));
} else if (z <= -4e-161) {
tmp = ((z * (y / z)) + (x * (0.5 * (y * x)))) / (x * z);
} else {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.1d+76)) then
tmp = (0.5d0 * ((y * x) / z)) + (y / (x * z))
else if (z <= (-4d-161)) then
tmp = ((z * (y / z)) + (x * (0.5d0 * (y * x)))) / (x * z)
else
tmp = (y / z) * ((1.0d0 / x) + (x * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+76) {
tmp = (0.5 * ((y * x) / z)) + (y / (x * z));
} else if (z <= -4e-161) {
tmp = ((z * (y / z)) + (x * (0.5 * (y * x)))) / (x * z);
} else {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1e+76: tmp = (0.5 * ((y * x) / z)) + (y / (x * z)) elif z <= -4e-161: tmp = ((z * (y / z)) + (x * (0.5 * (y * x)))) / (x * z) else: tmp = (y / z) * ((1.0 / x) + (x * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1e+76) tmp = Float64(Float64(0.5 * Float64(Float64(y * x) / z)) + Float64(y / Float64(x * z))); elseif (z <= -4e-161) tmp = Float64(Float64(Float64(z * Float64(y / z)) + Float64(x * Float64(0.5 * Float64(y * x)))) / Float64(x * z)); else tmp = Float64(Float64(y / z) * Float64(Float64(1.0 / x) + Float64(x * 0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1e+76) tmp = (0.5 * ((y * x) / z)) + (y / (x * z)); elseif (z <= -4e-161) tmp = ((z * (y / z)) + (x * (0.5 * (y * x)))) / (x * z); else tmp = (y / z) * ((1.0 / x) + (x * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1e+76], N[(N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-161], N[(N[(N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(0.5 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{x \cdot z}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-161}:\\
\;\;\;\;\frac{z \cdot \frac{y}{z} + x \cdot \left(0.5 \cdot \left(y \cdot x\right)\right)}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(\frac{1}{x} + x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -1.1e76Initial program 69.9%
associate-*r/63.3%
Simplified63.3%
Taylor expanded in x around 0 73.9%
if -1.1e76 < z < -4.00000000000000011e-161Initial program 87.6%
associate-*r/87.6%
Simplified87.6%
Taylor expanded in x around 0 67.1%
+-commutative67.1%
associate-/r*67.0%
*-un-lft-identity67.0%
associate-*l/67.0%
associate-*r/67.0%
associate-*r/67.0%
frac-add82.2%
associate-*l/82.3%
*-un-lft-identity82.3%
*-commutative82.3%
*-commutative82.3%
Applied egg-rr82.3%
if -4.00000000000000011e-161 < z Initial program 88.9%
associate-/l*83.9%
associate-/r/89.9%
associate-*l/79.5%
*-commutative79.5%
Simplified79.5%
associate-/l*89.9%
associate-/r/94.2%
Applied egg-rr94.2%
Taylor expanded in x around 0 76.0%
Final simplification76.8%
(FPCore (x y z)
:precision binary64
(if (<= x -2.1e+101)
(* 0.5 (* y (/ x z)))
(if (<= x 40000000000.0)
(* (/ y z) (+ (/ 1.0 x) (* x 0.5)))
(* (* y x) (/ 0.5 z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e+101) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 40000000000.0) {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
} else {
tmp = (y * x) * (0.5 / 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.1d+101)) then
tmp = 0.5d0 * (y * (x / z))
else if (x <= 40000000000.0d0) then
tmp = (y / z) * ((1.0d0 / x) + (x * 0.5d0))
else
tmp = (y * x) * (0.5d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e+101) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 40000000000.0) {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
} else {
tmp = (y * x) * (0.5 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.1e+101: tmp = 0.5 * (y * (x / z)) elif x <= 40000000000.0: tmp = (y / z) * ((1.0 / x) + (x * 0.5)) else: tmp = (y * x) * (0.5 / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.1e+101) tmp = Float64(0.5 * Float64(y * Float64(x / z))); elseif (x <= 40000000000.0) tmp = Float64(Float64(y / z) * Float64(Float64(1.0 / x) + Float64(x * 0.5))); else tmp = Float64(Float64(y * x) * Float64(0.5 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.1e+101) tmp = 0.5 * (y * (x / z)); elseif (x <= 40000000000.0) tmp = (y / z) * ((1.0 / x) + (x * 0.5)); else tmp = (y * x) * (0.5 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.1e+101], N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 40000000000.0], N[(N[(y / z), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+101}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;x \leq 40000000000:\\
\;\;\;\;\frac{y}{z} \cdot \left(\frac{1}{x} + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < -2.1e101Initial program 67.4%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in x around 0 44.1%
Taylor expanded in x around inf 44.1%
associate-*l/55.2%
*-commutative55.2%
Simplified55.2%
if -2.1e101 < x < 4e10Initial program 91.3%
associate-/l*90.0%
associate-/r/93.6%
associate-*l/88.9%
*-commutative88.9%
Simplified88.9%
associate-/l*93.9%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in x around 0 85.5%
if 4e10 < x Initial program 82.1%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in x around 0 55.3%
Taylor expanded in x around inf 55.3%
associate-*r/55.3%
*-commutative55.3%
Simplified55.3%
div-inv55.3%
associate-*r*55.3%
associate-*r*53.6%
div-inv53.6%
clear-num53.6%
un-div-inv53.6%
remove-double-neg53.6%
remove-double-neg53.6%
distribute-frac-neg53.6%
frac-2neg53.6%
associate-*r/53.6%
div-inv53.6%
times-frac55.3%
add-sqr-sqrt31.2%
sqrt-unprod27.7%
sqr-neg27.7%
sqrt-unprod0.2%
add-sqr-sqrt0.3%
add-sqr-sqrt0.2%
sqrt-unprod31.2%
sqr-neg31.2%
sqrt-unprod29.3%
add-sqr-sqrt55.3%
Applied egg-rr55.3%
Taylor expanded in z around 0 55.3%
associate-*r/55.3%
*-commutative55.3%
associate-*l/55.3%
Simplified55.3%
Final simplification73.8%
(FPCore (x y z)
:precision binary64
(if (<= x -2.1e+101)
(* 0.5 (* y (/ x z)))
(if (<= x 4.2e-302)
(* (/ y z) (+ (/ 1.0 x) (* x 0.5)))
(/ (+ (/ y x) (* 0.5 (* y x))) z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.1e+101) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 4.2e-302) {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
} else {
tmp = ((y / x) + (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 <= (-2.1d+101)) then
tmp = 0.5d0 * (y * (x / z))
else if (x <= 4.2d-302) then
tmp = (y / z) * ((1.0d0 / x) + (x * 0.5d0))
else
tmp = ((y / x) + (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 <= -2.1e+101) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 4.2e-302) {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
} else {
tmp = ((y / x) + (0.5 * (y * x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.1e+101: tmp = 0.5 * (y * (x / z)) elif x <= 4.2e-302: tmp = (y / z) * ((1.0 / x) + (x * 0.5)) else: tmp = ((y / x) + (0.5 * (y * x))) / z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.1e+101) tmp = Float64(0.5 * Float64(y * Float64(x / z))); elseif (x <= 4.2e-302) tmp = Float64(Float64(y / z) * Float64(Float64(1.0 / x) + Float64(x * 0.5))); else tmp = Float64(Float64(Float64(y / x) + Float64(0.5 * Float64(y * x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.1e+101) tmp = 0.5 * (y * (x / z)); elseif (x <= 4.2e-302) tmp = (y / z) * ((1.0 / x) + (x * 0.5)); else tmp = ((y / x) + (0.5 * (y * x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.1e+101], N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-302], N[(N[(y / z), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / x), $MachinePrecision] + N[(0.5 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+101}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-302}:\\
\;\;\;\;\frac{y}{z} \cdot \left(\frac{1}{x} + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(y \cdot x\right)}{z}\\
\end{array}
\end{array}
if x < -2.1e101Initial program 67.4%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in x around 0 44.1%
Taylor expanded in x around inf 44.1%
associate-*l/55.2%
*-commutative55.2%
Simplified55.2%
if -2.1e101 < x < 4.20000000000000026e-302Initial program 86.2%
associate-/l*83.8%
associate-/r/93.3%
associate-*l/86.5%
*-commutative86.5%
Simplified86.5%
associate-/l*93.2%
associate-/r/94.4%
Applied egg-rr94.4%
Taylor expanded in x around 0 81.7%
if 4.20000000000000026e-302 < x Initial program 90.9%
associate-*r/85.2%
Simplified85.2%
Taylor expanded in x around 0 73.2%
frac-2neg73.2%
div-inv73.2%
*-commutative73.2%
distribute-rgt-neg-in73.2%
Applied egg-rr73.2%
associate-*r/73.2%
*-rgt-identity73.2%
distribute-rgt-neg-out73.2%
distribute-neg-frac73.2%
associate-/l*72.4%
distribute-neg-frac72.4%
Simplified72.4%
Taylor expanded in z around 0 76.4%
Final simplification74.7%
(FPCore (x y z) :precision binary64 (if (<= x -2e-8) (* y (+ (* 0.5 (/ x z)) (/ 1.0 (* x z)))) (if (<= x 1.85e-301) (/ (/ y z) x) (/ (+ (/ y x) (* 0.5 (* y x))) z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2e-8) {
tmp = y * ((0.5 * (x / z)) + (1.0 / (x * z)));
} else if (x <= 1.85e-301) {
tmp = (y / z) / x;
} else {
tmp = ((y / x) + (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 <= (-2d-8)) then
tmp = y * ((0.5d0 * (x / z)) + (1.0d0 / (x * z)))
else if (x <= 1.85d-301) then
tmp = (y / z) / x
else
tmp = ((y / x) + (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 <= -2e-8) {
tmp = y * ((0.5 * (x / z)) + (1.0 / (x * z)));
} else if (x <= 1.85e-301) {
tmp = (y / z) / x;
} else {
tmp = ((y / x) + (0.5 * (y * x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2e-8: tmp = y * ((0.5 * (x / z)) + (1.0 / (x * z))) elif x <= 1.85e-301: tmp = (y / z) / x else: tmp = ((y / x) + (0.5 * (y * x))) / z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2e-8) tmp = Float64(y * Float64(Float64(0.5 * Float64(x / z)) + Float64(1.0 / Float64(x * z)))); elseif (x <= 1.85e-301) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(Float64(y / x) + Float64(0.5 * Float64(y * x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2e-8) tmp = y * ((0.5 * (x / z)) + (1.0 / (x * z))); elseif (x <= 1.85e-301) tmp = (y / z) / x; else tmp = ((y / x) + (0.5 * (y * x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2e-8], N[(y * N[(N[(0.5 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e-301], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(y / x), $MachinePrecision] + N[(0.5 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \left(0.5 \cdot \frac{x}{z} + \frac{1}{x \cdot z}\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x} + 0.5 \cdot \left(y \cdot x\right)}{z}\\
\end{array}
\end{array}
if x < -2e-8Initial program 76.9%
associate-*r/70.8%
Simplified70.8%
Taylor expanded in x around 0 43.8%
Taylor expanded in y around 0 49.7%
if -2e-8 < x < 1.8499999999999999e-301Initial program 83.2%
associate-*r/83.2%
Simplified83.2%
associate-*r/83.2%
associate-*l/83.0%
*-commutative83.0%
associate-*l/95.6%
Applied egg-rr95.6%
Taylor expanded in x around 0 95.7%
if 1.8499999999999999e-301 < x Initial program 90.9%
associate-*r/85.2%
Simplified85.2%
Taylor expanded in x around 0 73.2%
frac-2neg73.2%
div-inv73.2%
*-commutative73.2%
distribute-rgt-neg-in73.2%
Applied egg-rr73.2%
associate-*r/73.2%
*-rgt-identity73.2%
distribute-rgt-neg-out73.2%
distribute-neg-frac73.2%
associate-/l*72.4%
distribute-neg-frac72.4%
Simplified72.4%
Taylor expanded in z around 0 76.4%
Final simplification74.7%
(FPCore (x y z) :precision binary64 (if (<= z -7.5e-53) (+ (* 0.5 (/ (* y x) z)) (/ y (* x z))) (* (/ y z) (+ (/ 1.0 x) (* x 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7.5e-53) {
tmp = (0.5 * ((y * x) / z)) + (y / (x * z));
} else {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
}
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 <= (-7.5d-53)) then
tmp = (0.5d0 * ((y * x) / z)) + (y / (x * z))
else
tmp = (y / z) * ((1.0d0 / x) + (x * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7.5e-53) {
tmp = (0.5 * ((y * x) / z)) + (y / (x * z));
} else {
tmp = (y / z) * ((1.0 / x) + (x * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7.5e-53: tmp = (0.5 * ((y * x) / z)) + (y / (x * z)) else: tmp = (y / z) * ((1.0 / x) + (x * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7.5e-53) tmp = Float64(Float64(0.5 * Float64(Float64(y * x) / z)) + Float64(y / Float64(x * z))); else tmp = Float64(Float64(y / z) * Float64(Float64(1.0 / x) + Float64(x * 0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7.5e-53) tmp = (0.5 * ((y * x) / z)) + (y / (x * z)); else tmp = (y / z) * ((1.0 / x) + (x * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7.5e-53], N[(N[(0.5 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-53}:\\
\;\;\;\;0.5 \cdot \frac{y \cdot x}{z} + \frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(\frac{1}{x} + x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -7.5000000000000001e-53Initial program 79.5%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in x around 0 70.1%
if -7.5000000000000001e-53 < z Initial program 87.6%
associate-/l*83.2%
associate-/r/90.6%
associate-*l/81.5%
*-commutative81.5%
Simplified81.5%
associate-/l*90.6%
associate-/r/94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 75.4%
Final simplification73.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.42) (not (<= x 3.9e-5))) (* 0.5 (* y (/ x z))) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.42) || !(x <= 3.9e-5)) {
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.42d0)) .or. (.not. (x <= 3.9d-5))) 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.42) || !(x <= 3.9e-5)) {
tmp = 0.5 * (y * (x / z));
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.42) or not (x <= 3.9e-5): tmp = 0.5 * (y * (x / z)) else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.42) || !(x <= 3.9e-5)) 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.42) || ~((x <= 3.9e-5))) 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.42], N[Not[LessEqual[x, 3.9e-5]], $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.42 \lor \neg \left(x \leq 3.9 \cdot 10^{-5}\right):\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if x < -1.4199999999999999 or 3.8999999999999999e-5 < x Initial program 80.0%
associate-*r/71.2%
Simplified71.2%
Taylor expanded in x around 0 48.5%
Taylor expanded in x around inf 48.5%
associate-*l/50.8%
*-commutative50.8%
Simplified50.8%
if -1.4199999999999999 < x < 3.8999999999999999e-5Initial program 90.4%
associate-*r/90.4%
Simplified90.4%
associate-*r/90.4%
associate-*l/90.3%
*-commutative90.3%
associate-*l/95.1%
Applied egg-rr95.1%
Taylor expanded in x around 0 95.0%
Final simplification73.4%
(FPCore (x y z) :precision binary64 (if (<= x -1.42) (* 0.5 (* y (/ x z))) (if (<= x 3.9e-5) (/ (/ y z) x) (* (* y x) (/ 0.5 z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.42) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 3.9e-5) {
tmp = (y / z) / x;
} else {
tmp = (y * x) * (0.5 / 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.42d0)) then
tmp = 0.5d0 * (y * (x / z))
else if (x <= 3.9d-5) then
tmp = (y / z) / x
else
tmp = (y * x) * (0.5d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.42) {
tmp = 0.5 * (y * (x / z));
} else if (x <= 3.9e-5) {
tmp = (y / z) / x;
} else {
tmp = (y * x) * (0.5 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.42: tmp = 0.5 * (y * (x / z)) elif x <= 3.9e-5: tmp = (y / z) / x else: tmp = (y * x) * (0.5 / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.42) tmp = Float64(0.5 * Float64(y * Float64(x / z))); elseif (x <= 3.9e-5) tmp = Float64(Float64(y / z) / x); else tmp = Float64(Float64(y * x) * Float64(0.5 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.42) tmp = 0.5 * (y * (x / z)); elseif (x <= 3.9e-5) tmp = (y / z) / x; else tmp = (y * x) * (0.5 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.42], N[(0.5 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e-5], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < -1.4199999999999999Initial program 76.6%
associate-*r/70.3%
Simplified70.3%
Taylor expanded in x around 0 43.0%
Taylor expanded in x around inf 43.0%
associate-*l/48.9%
*-commutative48.9%
Simplified48.9%
if -1.4199999999999999 < x < 3.8999999999999999e-5Initial program 90.4%
associate-*r/90.4%
Simplified90.4%
associate-*r/90.4%
associate-*l/90.3%
*-commutative90.3%
associate-*l/95.1%
Applied egg-rr95.1%
Taylor expanded in x around 0 95.0%
if 3.8999999999999999e-5 < x Initial program 83.6%
associate-*r/72.1%
Simplified72.1%
Taylor expanded in x around 0 54.4%
Taylor expanded in x around inf 54.4%
associate-*r/54.4%
*-commutative54.4%
Simplified54.4%
div-inv54.4%
associate-*r*54.4%
associate-*r*52.8%
div-inv52.8%
clear-num52.8%
un-div-inv52.8%
remove-double-neg52.8%
remove-double-neg52.8%
distribute-frac-neg52.8%
frac-2neg52.8%
associate-*r/52.8%
div-inv52.8%
times-frac54.4%
add-sqr-sqrt32.2%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod0.2%
add-sqr-sqrt2.0%
add-sqr-sqrt0.2%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod28.6%
add-sqr-sqrt54.4%
Applied egg-rr54.4%
Taylor expanded in z around 0 54.4%
associate-*r/54.4%
*-commutative54.4%
associate-*l/54.4%
Simplified54.4%
Final simplification73.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5e-130) (not (<= z 3.8))) (/ y (* x z)) (/ (/ y x) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5e-130) || !(z <= 3.8)) {
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 <= (-5d-130)) .or. (.not. (z <= 3.8d0))) 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 <= -5e-130) || !(z <= 3.8)) {
tmp = y / (x * z);
} else {
tmp = (y / x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5e-130) or not (z <= 3.8): tmp = y / (x * z) else: tmp = (y / x) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5e-130) || !(z <= 3.8)) 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 <= -5e-130) || ~((z <= 3.8))) tmp = y / (x * z); else tmp = (y / x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5e-130], N[Not[LessEqual[z, 3.8]], $MachinePrecision]], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-130} \lor \neg \left(z \leq 3.8\right):\\
\;\;\;\;\frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\end{array}
\end{array}
if z < -4.9999999999999996e-130 or 3.7999999999999998 < z Initial program 80.1%
associate-*r/72.4%
Simplified72.4%
Taylor expanded in x around 0 52.7%
if -4.9999999999999996e-130 < z < 3.7999999999999998Initial program 91.9%
associate-*l/91.8%
Simplified91.8%
Taylor expanded in x around 0 57.3%
associate-*l/57.4%
*-un-lft-identity57.4%
Applied egg-rr57.4%
Final simplification54.7%
(FPCore (x y z) :precision binary64 (if (<= z -40000000.0) (/ y (* x z)) (/ (/ y z) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -40000000.0) {
tmp = 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 (z <= (-40000000.0d0)) then
tmp = 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 (z <= -40000000.0) {
tmp = y / (x * z);
} else {
tmp = (y / z) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -40000000.0: tmp = y / (x * z) else: tmp = (y / z) / x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -40000000.0) tmp = 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 (z <= -40000000.0) tmp = y / (x * z); else tmp = (y / z) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -40000000.0], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -40000000:\\
\;\;\;\;\frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{x}\\
\end{array}
\end{array}
if z < -4e7Initial program 77.4%
associate-*r/72.4%
Simplified72.4%
Taylor expanded in x around 0 55.6%
if -4e7 < z Initial program 87.7%
associate-*r/83.7%
Simplified83.7%
associate-*r/87.7%
associate-*l/87.7%
*-commutative87.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 63.2%
Final simplification61.4%
(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}
Initial program 85.3%
associate-*r/81.0%
Simplified81.0%
Taylor expanded in x around 0 49.3%
Final simplification49.3%
(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}
herbie shell --seed 2023306
(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))