
(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 14 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
(let* ((t_0 (* (cosh x) (/ y x))))
(if (<= t_0 INFINITY)
(/ t_0 z)
(/ (* 0.041666666666666664 (* y (* x (* x x)))) z))))
double code(double x, double y, double z) {
double t_0 = cosh(x) * (y / x);
double tmp;
if (t_0 <= ((double) INFINITY)) {
tmp = t_0 / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = Math.cosh(x) * (y / x);
double tmp;
if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = t_0 / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
def code(x, y, z): t_0 = math.cosh(x) * (y / x) tmp = 0 if t_0 <= math.inf: tmp = t_0 / z else: tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z return tmp
function code(x, y, z) t_0 = Float64(cosh(x) * Float64(y / x)) tmp = 0.0 if (t_0 <= Inf) tmp = Float64(t_0 / z); else tmp = Float64(Float64(0.041666666666666664 * Float64(y * Float64(x * Float64(x * x)))) / z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = cosh(x) * (y / x); tmp = 0.0; if (t_0 <= Inf) tmp = t_0 / z; else tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z; 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, Infinity], N[(t$95$0 / z), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cosh x \cdot \frac{y}{x}\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{t\_0}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.041666666666666664 \cdot \left(y \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0Initial program 98.3%
if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f640.0
Simplified0.0%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.7
Applied egg-rr72.7%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified100.0%
(FPCore (x y z)
:precision binary64
(if (<= (* (cosh x) (/ y x)) 1e+101)
(/ (/ y x) z)
(/
(/
(*
y
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0))
z)
x)))
double code(double x, double y, double z) {
double tmp;
if ((cosh(x) * (y / x)) <= 1e+101) {
tmp = (y / x) / z;
} else {
tmp = ((y * fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= 1e+101) tmp = Float64(Float64(y / x) / z); else tmp = Float64(Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], 1e+101], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq 10^{+101}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < 9.9999999999999998e100Initial program 97.9%
Taylor expanded in x around 0
/-lowering-/.f6464.5
Simplified64.5%
if 9.9999999999999998e100 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 79.2%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.9
Simplified68.9%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr91.3%
(FPCore (x y z)
:precision binary64
(if (<= (* (cosh x) (/ y x)) INFINITY)
(/
(* (/ y x) (fma x (* x (* x (* x (* (* x x) 0.001388888888888889)))) 1.0))
z)
(/ (* 0.041666666666666664 (* y (* x (* x x)))) z)))
double code(double x, double y, double z) {
double tmp;
if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
tmp = ((y / x) * fma(x, (x * (x * (x * ((x * x) * 0.001388888888888889)))), 1.0)) / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= Inf) tmp = Float64(Float64(Float64(y / x) * fma(x, Float64(x * Float64(x * Float64(x * Float64(Float64(x * x) * 0.001388888888888889)))), 1.0)) / z); else tmp = Float64(Float64(0.041666666666666664 * Float64(y * Float64(x * Float64(x * x)))) / z); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(y / x), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right)\right), 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.041666666666666664 \cdot \left(y \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0Initial program 98.3%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6490.1
Simplified90.1%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.1
Simplified90.1%
if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f640.0
Simplified0.0%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.7
Applied egg-rr72.7%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified100.0%
Final simplification90.9%
(FPCore (x y z) :precision binary64 (if (<= (* (cosh x) (/ y x)) INFINITY) (/ (* (/ y x) (fma (* x x) (* x (* x 0.041666666666666664)) 1.0)) z) (/ (* 0.041666666666666664 (* y (* x (* x x)))) z)))
double code(double x, double y, double z) {
double tmp;
if ((cosh(x) * (y / x)) <= ((double) INFINITY)) {
tmp = ((y / x) * fma((x * x), (x * (x * 0.041666666666666664)), 1.0)) / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(cosh(x) * Float64(y / x)) <= Inf) tmp = Float64(Float64(Float64(y / x) * fma(Float64(x * x), Float64(x * Float64(x * 0.041666666666666664)), 1.0)) / z); else tmp = Float64(Float64(0.041666666666666664 * Float64(y * Float64(x * Float64(x * x)))) / z); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(y / x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{y}{x} \leq \infty:\\
\;\;\;\;\frac{\frac{y}{x} \cdot \mathsf{fma}\left(x \cdot x, x \cdot \left(x \cdot 0.041666666666666664\right), 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.041666666666666664 \cdot \left(y \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 y x)) < +inf.0Initial program 98.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6488.8
Simplified88.8%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.8
Simplified88.8%
if +inf.0 < (*.f64 (cosh.f64 x) (/.f64 y x)) Initial program 0.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f640.0
Simplified0.0%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.7
Applied egg-rr72.7%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified100.0%
Final simplification89.7%
(FPCore (x y z)
:precision binary64
(if (<= x 7.5e-37)
(/ (/ y x) z)
(if (<= x 4.6e+42)
(/ (* (cosh x) y) (* x z))
(/
(/
(*
y
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0))
z)
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 7.5e-37) {
tmp = (y / x) / z;
} else if (x <= 4.6e+42) {
tmp = (cosh(x) * y) / (x * z);
} else {
tmp = ((y * fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 7.5e-37) tmp = Float64(Float64(y / x) / z); elseif (x <= 4.6e+42) tmp = Float64(Float64(cosh(x) * y) / Float64(x * z)); else tmp = Float64(Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 7.5e-37], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 4.6e+42], N[(N[(N[Cosh[x], $MachinePrecision] * y), $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+42}:\\
\;\;\;\;\frac{\cosh x \cdot y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if x < 7.5000000000000004e-37Initial program 90.5%
Taylor expanded in x around 0
/-lowering-/.f6465.4
Simplified65.4%
if 7.5000000000000004e-37 < x < 4.6e42Initial program 100.0%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
associate-/l*N/A
frac-timesN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f64N/A
*-lowering-*.f6492.9
Applied egg-rr92.9%
if 4.6e42 < x Initial program 83.3%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6483.3
Simplified83.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
(FPCore (x y z)
:precision binary64
(if (<= x 1.02e-12)
(/ (/ y x) z)
(if (<= x 4.6e+42)
(* y (/ (cosh x) (* x z)))
(/
(/
(*
y
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0))
z)
x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.02e-12) {
tmp = (y / x) / z;
} else if (x <= 4.6e+42) {
tmp = y * (cosh(x) / (x * z));
} else {
tmp = ((y * fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.02e-12) tmp = Float64(Float64(y / x) / z); elseif (x <= 4.6e+42) tmp = Float64(y * Float64(cosh(x) / Float64(x * z))); else tmp = Float64(Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.02e-12], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 4.6e+42], N[(y * N[(N[Cosh[x], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.02 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \frac{\cosh x}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if x < 1.02e-12Initial program 90.6%
Taylor expanded in x around 0
/-lowering-/.f6465.9
Simplified65.9%
if 1.02e-12 < x < 4.6e42Initial program 100.0%
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
*-commutativeN/A
*-lowering-*.f6490.9
Applied egg-rr90.9%
if 4.6e42 < x Initial program 83.3%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6483.3
Simplified83.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
(FPCore (x y z)
:precision binary64
(if (<= x 4.6e+42)
(/ (cosh x) (* z (/ x y)))
(/
(/
(*
y
(fma
x
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
1.0))
z)
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.6e+42) {
tmp = cosh(x) / (z * (x / y));
} else {
tmp = ((y * fma(x, (x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 4.6e+42) tmp = Float64(cosh(x) / Float64(z * Float64(x / y))); else tmp = Float64(Float64(Float64(y * fma(x, Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 1.0)) / z) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 4.6e+42], N[(N[Cosh[x], $MachinePrecision] / N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.6 \cdot 10^{+42}:\\
\;\;\;\;\frac{\cosh x}{z \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)}{z}}{x}\\
\end{array}
\end{array}
if x < 4.6e42Initial program 91.1%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6485.6
Applied egg-rr85.6%
if 4.6e42 < x Initial program 83.3%
Taylor expanded in x around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6483.3
Simplified83.3%
div-invN/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.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(Float64(cosh(x) / x) * y) / z) end
function tmp = code(x, y, z) tmp = ((cosh(x) / x) * y) / z; end
code[x_, y_, z_] := N[(N[(N[(N[Cosh[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\cosh x}{x} \cdot y}{z}
\end{array}
Initial program 89.8%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f6498.4
Applied egg-rr98.4%
(FPCore (x y z) :precision binary64 (/ (/ (fma x (* x (* y (fma x (* x 0.041666666666666664) 0.5))) y) x) z))
double code(double x, double y, double z) {
return (fma(x, (x * (y * fma(x, (x * 0.041666666666666664), 0.5))), y) / x) / z;
}
function code(x, y, z) return Float64(Float64(fma(x, Float64(x * Float64(y * fma(x, Float64(x * 0.041666666666666664), 0.5))), y) / x) / z) end
code[x_, y_, z_] := N[(N[(N[(x * N[(x * N[(y * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\mathsf{fma}\left(x, x \cdot \left(y \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right)\right), y\right)}{x}}{z}
\end{array}
Initial program 89.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified88.6%
(FPCore (x y z) :precision binary64 (if (<= x 0.00028) (/ (/ y x) z) (/ (* 0.041666666666666664 (* y (* x (* x x)))) z)))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = (y / x) / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 0.00028d0) then
tmp = (y / x) / z
else
tmp = (0.041666666666666664d0 * (y * (x * (x * x)))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = (y / x) / z;
} else {
tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00028: tmp = (y / x) / z else: tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00028) tmp = Float64(Float64(y / x) / z); else tmp = Float64(Float64(0.041666666666666664 * Float64(y * Float64(x * Float64(x * x)))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00028) tmp = (y / x) / z; else tmp = (0.041666666666666664 * (y * (x * (x * x)))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00028], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(N[(0.041666666666666664 * N[(y * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00028:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.041666666666666664 \cdot \left(y \cdot \left(x \cdot \left(x \cdot x\right)\right)\right)}{z}\\
\end{array}
\end{array}
if x < 2.7999999999999998e-4Initial program 90.7%
Taylor expanded in x around 0
/-lowering-/.f6466.0
Simplified66.0%
if 2.7999999999999998e-4 < x Initial program 86.5%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6469.9
Simplified69.9%
associate-/l*N/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.2
Applied egg-rr62.2%
Taylor expanded in x around inf
associate-*r/N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
Simplified79.6%
(FPCore (x y z) :precision binary64 (if (<= x 0.00028) (/ (/ y x) z) (* y (/ (* x 0.5) z))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = (y / x) / z;
} 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 <= 0.00028d0) then
tmp = (y / x) / z
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 <= 0.00028) {
tmp = (y / x) / z;
} else {
tmp = y * ((x * 0.5) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00028: tmp = (y / x) / z else: tmp = y * ((x * 0.5) / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00028) tmp = Float64(Float64(y / x) / z); else tmp = Float64(y * Float64(Float64(x * 0.5) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00028) tmp = (y / x) / z; else tmp = y * ((x * 0.5) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00028], N[(N[(y / x), $MachinePrecision] / z), $MachinePrecision], N[(y * N[(N[(x * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00028:\\
\;\;\;\;\frac{\frac{y}{x}}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\
\end{array}
\end{array}
if x < 2.7999999999999998e-4Initial program 90.7%
Taylor expanded in x around 0
/-lowering-/.f6466.0
Simplified66.0%
if 2.7999999999999998e-4 < x Initial program 86.5%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.6
Simplified57.6%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.6
Simplified57.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6459.2
Applied egg-rr59.2%
Final simplification64.7%
(FPCore (x y z) :precision binary64 (if (<= x 0.00028) (/ y (* x z)) (* y (/ (* x 0.5) z))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = y / (x * z);
} 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 <= 0.00028d0) then
tmp = y / (x * z)
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 <= 0.00028) {
tmp = y / (x * z);
} else {
tmp = y * ((x * 0.5) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00028: tmp = y / (x * z) else: tmp = y * ((x * 0.5) / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00028) tmp = Float64(y / Float64(x * z)); else tmp = Float64(y * Float64(Float64(x * 0.5) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00028) tmp = y / (x * z); else tmp = y * ((x * 0.5) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00028], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x * 0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00028:\\
\;\;\;\;\frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x \cdot 0.5}{z}\\
\end{array}
\end{array}
if x < 2.7999999999999998e-4Initial program 90.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6463.2
Simplified63.2%
if 2.7999999999999998e-4 < x Initial program 86.5%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.6
Simplified57.6%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.6
Simplified57.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6459.2
Applied egg-rr59.2%
Final simplification62.4%
(FPCore (x y z) :precision binary64 (if (<= x 0.00028) (/ y (* x z)) (* (* x y) (/ 0.5 z))))
double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = y / (x * z);
} else {
tmp = (x * y) * (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 <= 0.00028d0) then
tmp = y / (x * z)
else
tmp = (x * y) * (0.5d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 0.00028) {
tmp = y / (x * z);
} else {
tmp = (x * y) * (0.5 / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 0.00028: tmp = y / (x * z) else: tmp = (x * y) * (0.5 / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 0.00028) tmp = Float64(y / Float64(x * z)); else tmp = Float64(Float64(x * y) * Float64(0.5 / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 0.00028) tmp = y / (x * z); else tmp = (x * y) * (0.5 / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 0.00028], N[(y / N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] * N[(0.5 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00028:\\
\;\;\;\;\frac{y}{x \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{z}\\
\end{array}
\end{array}
if x < 2.7999999999999998e-4Initial program 90.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6463.2
Simplified63.2%
if 2.7999999999999998e-4 < x Initial program 86.5%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
associate-/l*N/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6457.6
Simplified57.6%
Taylor expanded in x around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.6
Simplified57.6%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6457.6
Applied egg-rr57.6%
(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 89.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6452.1
Simplified52.1%
(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 2024198
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< y -2309451133843521/5000000000000000000000000000000000000000000000000000000000000000000) (* (/ (/ y z) x) (cosh x)) (if (< y 1038530535935153/1000000000000000000000000000000000000000000000000000000) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x)))))
(/ (* (cosh x) (/ y x)) z))