
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (/ (* 0.5 (sin y)) y) (* (cosh x) 2.0)))
double code(double x, double y) {
return ((0.5 * sin(y)) / y) * (cosh(x) * 2.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((0.5d0 * sin(y)) / y) * (cosh(x) * 2.0d0)
end function
public static double code(double x, double y) {
return ((0.5 * Math.sin(y)) / y) * (Math.cosh(x) * 2.0);
}
def code(x, y): return ((0.5 * math.sin(y)) / y) * (math.cosh(x) * 2.0)
function code(x, y) return Float64(Float64(Float64(0.5 * sin(y)) / y) * Float64(cosh(x) * 2.0)) end
function tmp = code(x, y) tmp = ((0.5 * sin(y)) / y) * (cosh(x) * 2.0); end
code[x_, y_] := N[(N[(N[(0.5 * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * N[(N[Cosh[x], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5 \cdot \sin y}{y} \cdot \left(\cosh x \cdot 2\right)
\end{array}
Initial program 99.9%
*-commutativeN/A
cosh-defN/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
associate-/l/N/A
*-lowering-*.f64N/A
associate-/l/N/A
clear-numN/A
associate-/r/N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sin-lowering-sin.f64N/A
cosh-undefN/A
*-commutativeN/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f6499.9
Applied egg-rr99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(* (cosh x) (* (* y y) -0.16666666666666666))
(if (<= t_1 0.2) (* t_0 (fma 0.5 (* x x) 1.0)) (cosh x)))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double t_1 = cosh(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = cosh(x) * ((y * y) * -0.16666666666666666);
} else if (t_1 <= 0.2) {
tmp = t_0 * fma(0.5, (x * x), 1.0);
} else {
tmp = cosh(x);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) t_1 = Float64(cosh(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(cosh(x) * Float64(Float64(y * y) * -0.16666666666666666)); elseif (t_1 <= 0.2) tmp = Float64(t_0 * fma(0.5, Float64(x * x), 1.0)); else tmp = cosh(x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cosh[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.2], N[(t$95$0 * N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[Cosh[x], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
t_1 := \cosh x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\cosh x \cdot \left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;t\_1 \leq 0.2:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 0.20000000000000001Initial program 99.5%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.5
Simplified99.5%
if 0.20000000000000001 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified100.0%
*-rgt-identityN/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (cosh x) (/ (sin y) y))))
(if (<= t_0 (- INFINITY))
(* (cosh x) (* (* y y) -0.16666666666666666))
(if (<= t_0 0.2) (* (/ (* 0.5 (sin y)) y) 2.0) (cosh x)))))
double code(double x, double y) {
double t_0 = cosh(x) * (sin(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = cosh(x) * ((y * y) * -0.16666666666666666);
} else if (t_0 <= 0.2) {
tmp = ((0.5 * sin(y)) / y) * 2.0;
} else {
tmp = cosh(x);
}
return tmp;
}
public static double code(double x, double y) {
double t_0 = Math.cosh(x) * (Math.sin(y) / y);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = Math.cosh(x) * ((y * y) * -0.16666666666666666);
} else if (t_0 <= 0.2) {
tmp = ((0.5 * Math.sin(y)) / y) * 2.0;
} else {
tmp = Math.cosh(x);
}
return tmp;
}
def code(x, y): t_0 = math.cosh(x) * (math.sin(y) / y) tmp = 0 if t_0 <= -math.inf: tmp = math.cosh(x) * ((y * y) * -0.16666666666666666) elif t_0 <= 0.2: tmp = ((0.5 * math.sin(y)) / y) * 2.0 else: tmp = math.cosh(x) return tmp
function code(x, y) t_0 = Float64(cosh(x) * Float64(sin(y) / y)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(cosh(x) * Float64(Float64(y * y) * -0.16666666666666666)); elseif (t_0 <= 0.2) tmp = Float64(Float64(Float64(0.5 * sin(y)) / y) * 2.0); else tmp = cosh(x); end return tmp end
function tmp_2 = code(x, y) t_0 = cosh(x) * (sin(y) / y); tmp = 0.0; if (t_0 <= -Inf) tmp = cosh(x) * ((y * y) * -0.16666666666666666); elseif (t_0 <= 0.2) tmp = ((0.5 * sin(y)) / y) * 2.0; else tmp = cosh(x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.2], N[(N[(N[(0.5 * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * 2.0), $MachinePrecision], N[Cosh[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cosh x \cdot \frac{\sin y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\cosh x \cdot \left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;t\_0 \leq 0.2:\\
\;\;\;\;\frac{0.5 \cdot \sin y}{y} \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 0.20000000000000001Initial program 99.5%
*-commutativeN/A
cosh-defN/A
clear-numN/A
associate-/r/N/A
associate-*r*N/A
div-invN/A
associate-/l/N/A
*-lowering-*.f64N/A
associate-/l/N/A
clear-numN/A
associate-/r/N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sin-lowering-sin.f64N/A
cosh-undefN/A
*-commutativeN/A
*-lowering-*.f64N/A
cosh-lowering-cosh.f6499.6
Applied egg-rr99.6%
Taylor expanded in x around 0
Simplified99.5%
if 0.20000000000000001 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified100.0%
*-rgt-identityN/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(* (cosh x) (* (* y y) -0.16666666666666666))
(if (<= t_1 0.2) t_0 (cosh x)))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double t_1 = cosh(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = cosh(x) * ((y * y) * -0.16666666666666666);
} else if (t_1 <= 0.2) {
tmp = t_0;
} else {
tmp = cosh(x);
}
return tmp;
}
public static double code(double x, double y) {
double t_0 = Math.sin(y) / y;
double t_1 = Math.cosh(x) * t_0;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = Math.cosh(x) * ((y * y) * -0.16666666666666666);
} else if (t_1 <= 0.2) {
tmp = t_0;
} else {
tmp = Math.cosh(x);
}
return tmp;
}
def code(x, y): t_0 = math.sin(y) / y t_1 = math.cosh(x) * t_0 tmp = 0 if t_1 <= -math.inf: tmp = math.cosh(x) * ((y * y) * -0.16666666666666666) elif t_1 <= 0.2: tmp = t_0 else: tmp = math.cosh(x) return tmp
function code(x, y) t_0 = Float64(sin(y) / y) t_1 = Float64(cosh(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(cosh(x) * Float64(Float64(y * y) * -0.16666666666666666)); elseif (t_1 <= 0.2) tmp = t_0; else tmp = cosh(x); end return tmp end
function tmp_2 = code(x, y) t_0 = sin(y) / y; t_1 = cosh(x) * t_0; tmp = 0.0; if (t_1 <= -Inf) tmp = cosh(x) * ((y * y) * -0.16666666666666666); elseif (t_1 <= 0.2) tmp = t_0; else tmp = cosh(x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cosh[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.2], t$95$0, N[Cosh[x], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
t_1 := \cosh x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\cosh x \cdot \left(\left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;t\_1 \leq 0.2:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 0.20000000000000001Initial program 99.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6499.5
Simplified99.5%
if 0.20000000000000001 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified100.0%
*-rgt-identityN/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(*
(fma
(* x x)
(fma
(* x x)
(fma (* x x) 0.001388888888888889 0.041666666666666664)
0.5)
1.0)
(fma y (* y -0.16666666666666666) 1.0))
(if (<= t_1 0.2) t_0 (cosh x)))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double t_1 = cosh(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma((x * x), fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0) * fma(y, (y * -0.16666666666666666), 1.0);
} else if (t_1 <= 0.2) {
tmp = t_0;
} else {
tmp = cosh(x);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) t_1 = Float64(cosh(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0) * fma(y, Float64(y * -0.16666666666666666), 1.0)); elseif (t_1 <= 0.2) tmp = t_0; else tmp = cosh(x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Cosh[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.2], t$95$0, N[Cosh[x], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
t_1 := \cosh x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right) \cdot \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right)\\
\mathbf{elif}\;t\_1 \leq 0.2:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/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-*.f6494.8
Simplified94.8%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 0.20000000000000001Initial program 99.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6499.5
Simplified99.5%
if 0.20000000000000001 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified100.0%
*-rgt-identityN/A
cosh-lowering-cosh.f64100.0
Applied egg-rr100.0%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -1e-137)
(*
(fma
(* x x)
(fma (* x x) (fma (* x x) 0.001388888888888889 0.041666666666666664) 0.5)
1.0)
(fma y (* y -0.16666666666666666) 1.0))
(cosh x)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = fma((x * x), fma((x * x), fma((x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0) * fma(y, (y * -0.16666666666666666), 1.0);
} else {
tmp = cosh(x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664), 0.5), 1.0) * fma(y, Float64(y * -0.16666666666666666), 1.0)); else tmp = cosh(x); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[Cosh[x], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right) \cdot \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/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-*.f6466.5
Simplified66.5%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4
Applied egg-rr74.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (fma (* x x) 0.001388888888888889 0.041666666666666664)))
(if (<= (* (cosh x) (/ (sin y) y)) -1e-137)
(*
(fma (* x x) (fma (* x x) t_0 0.5) 1.0)
(fma y (* y -0.16666666666666666) 1.0))
(fma (* x x) (fma x (* x t_0) 0.5) 1.0))))
double code(double x, double y) {
double t_0 = fma((x * x), 0.001388888888888889, 0.041666666666666664);
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = fma((x * x), fma((x * x), t_0, 0.5), 1.0) * fma(y, (y * -0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), fma(x, (x * t_0), 0.5), 1.0);
}
return tmp;
}
function code(x, y) t_0 = fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(fma(Float64(x * x), fma(Float64(x * x), t_0, 0.5), 1.0) * fma(y, Float64(y * -0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), fma(x, Float64(x * t_0), 0.5), 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]}, If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * t$95$0 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * t$95$0), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right)\\
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, t\_0, 0.5\right), 1\right) \cdot \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot t\_0, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/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-*.f6466.5
Simplified66.5%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4
Applied egg-rr74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.9
Simplified68.9%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -1e-137)
(*
(fma 0.5 (* x x) 1.0)
(fma
(* y y)
(fma
y
(* y (fma y (* y -0.0001984126984126984) 0.008333333333333333))
-0.16666666666666666)
1.0))
(fma
(* x x)
(fma x (* x (fma (* x x) 0.001388888888888889 0.041666666666666664)) 0.5)
1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = fma(0.5, (x * x), 1.0) * fma((y * y), fma(y, (y * fma(y, (y * -0.0001984126984126984), 0.008333333333333333)), -0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(fma(0.5, Float64(x * x), 1.0) * fma(Float64(y * y), fma(y, Float64(y * fma(y, Float64(y * -0.0001984126984126984), 0.008333333333333333)), -0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * -0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6463.8
Simplified63.8%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6466.0
Simplified66.0%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4
Applied egg-rr74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.9
Simplified68.9%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -1e-41)
(*
(* 0.5 (* x x))
(fma
(* y y)
(fma
(* y y)
(fma y (* y -0.0001984126984126984) 0.008333333333333333)
-0.16666666666666666)
1.0))
(fma
(* x x)
(fma x (* x (fma (* x x) 0.001388888888888889 0.041666666666666664)) 0.5)
1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-41) {
tmp = (0.5 * (x * x)) * fma((y * y), fma((y * y), fma(y, (y * -0.0001984126984126984), 0.008333333333333333), -0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-41) tmp = Float64(Float64(0.5 * Float64(x * x)) * fma(Float64(y * y), fma(Float64(y * y), fma(y, Float64(y * -0.0001984126984126984), 0.008333333333333333), -0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-41], N[(N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * -0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-41}:\\
\;\;\;\;\left(0.5 \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -1.00000000000000001e-41Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6451.7
Simplified51.7%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6487.7
Simplified87.7%
Taylor expanded in x around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6487.7
Simplified87.7%
if -1.00000000000000001e-41 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified70.1%
*-rgt-identityN/A
cosh-lowering-cosh.f6470.1
Applied egg-rr70.1%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6464.9
Simplified64.9%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -1e-137)
(*
(fma y (* y -0.16666666666666666) 1.0)
(fma (* x x) (fma (* x x) 0.041666666666666664 0.5) 1.0))
(fma
(* x x)
(fma x (* x (fma (* x x) 0.001388888888888889 0.041666666666666664)) 0.5)
1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = fma(y, (y * -0.16666666666666666), 1.0) * fma((x * x), fma((x * x), 0.041666666666666664, 0.5), 1.0);
} else {
tmp = fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(fma(y, Float64(y * -0.16666666666666666), 1.0) * fma(Float64(x * x), fma(Float64(x * x), 0.041666666666666664, 0.5), 1.0)); else tmp = fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(y * N[(y * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6462.7
Simplified62.7%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4
Applied egg-rr74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.9
Simplified68.9%
Final simplification67.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= t_0 -1e-307)
(* y (* y (fma (* x x) -0.08333333333333333 -0.16666666666666666)))
(if (<= t_0 5e-89)
(fma
y
(* y (fma y (* y 0.008333333333333333) -0.16666666666666666))
1.0)
(fma 0.5 (* x x) 1.0)))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if (t_0 <= -1e-307) {
tmp = y * (y * fma((x * x), -0.08333333333333333, -0.16666666666666666));
} else if (t_0 <= 5e-89) {
tmp = fma(y, (y * fma(y, (y * 0.008333333333333333), -0.16666666666666666)), 1.0);
} else {
tmp = fma(0.5, (x * x), 1.0);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (t_0 <= -1e-307) tmp = Float64(y * Float64(y * fma(Float64(x * x), -0.08333333333333333, -0.16666666666666666))); elseif (t_0 <= 5e-89) tmp = fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), -0.16666666666666666)), 1.0); else tmp = fma(0.5, Float64(x * x), 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-307], N[(y * N[(y * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-89], N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-307}:\\
\;\;\;\;y \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-89}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\end{array}
\end{array}
if (/.f64 (sin.f64 y) y) < -9.99999999999999909e-308Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6452.2
Simplified52.2%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6442.7
Simplified42.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6442.7
Simplified42.7%
if -9.99999999999999909e-308 < (/.f64 (sin.f64 y) y) < 4.99999999999999967e-89Initial program 99.7%
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
cosh-lowering-cosh.f64N/A
sin-lowering-sin.f6499.6
Applied egg-rr99.6%
Taylor expanded in x around 0
Simplified54.2%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6447.4
Simplified47.4%
if 4.99999999999999967e-89 < (/.f64 (sin.f64 y) y) Initial program 100.0%
Taylor expanded in y around 0
Simplified94.6%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.4
Simplified73.4%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -1e-137)
(* x (* (fma -0.16666666666666666 (* y y) 1.0) (* 0.5 x)))
(fma
(* x x)
(fma x (* x (fma (* x x) 0.001388888888888889 0.041666666666666664)) 0.5)
1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = x * (fma(-0.16666666666666666, (y * y), 1.0) * (0.5 * x));
} else {
tmp = fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(y * y), 1.0) * Float64(0.5 * x))); else tmp = fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(x * N[(N[(-0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.5 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \left(0.5 \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right), 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.1
Applied egg-rr57.1%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
*-rgt-identityN/A
cosh-lowering-cosh.f6474.4
Applied egg-rr74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6468.9
Simplified68.9%
Final simplification66.6%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -1e-137) (* x (* (fma -0.16666666666666666 (* y y) 1.0) (* 0.5 x))) (fma (* x x) (fma (* x x) 0.041666666666666664 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = x * (fma(-0.16666666666666666, (y * y), 1.0) * (0.5 * x));
} else {
tmp = fma((x * x), fma((x * x), 0.041666666666666664, 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(y * y), 1.0) * Float64(0.5 * x))); else tmp = fma(Float64(x * x), fma(Float64(x * x), 0.041666666666666664, 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(x * N[(N[(-0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.5 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right) \cdot \left(0.5 \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.1
Applied egg-rr57.1%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6467.0
Simplified67.0%
Final simplification65.0%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -1e-137) (* y (* y (fma (* x x) -0.08333333333333333 -0.16666666666666666))) (fma (* x x) (fma (* x x) 0.041666666666666664 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = y * (y * fma((x * x), -0.08333333333333333, -0.16666666666666666));
} else {
tmp = fma((x * x), fma((x * x), 0.041666666666666664, 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(y * Float64(y * fma(Float64(x * x), -0.08333333333333333, -0.16666666666666666))); else tmp = fma(Float64(x * x), fma(Float64(x * x), 0.041666666666666664, 0.5), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(y * N[(y * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;y \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6467.0
Simplified67.0%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -1e-137) (* y (* y (fma (* x x) -0.08333333333333333 -0.16666666666666666))) (fma 0.5 (* x x) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = y * (y * fma((x * x), -0.08333333333333333, -0.16666666666666666));
} else {
tmp = fma(0.5, (x * x), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(y * Float64(y * fma(Float64(x * x), -0.08333333333333333, -0.16666666666666666))); else tmp = fma(0.5, Float64(x * x), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(y * N[(y * N[(N[(x * x), $MachinePrecision] * -0.08333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;y \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.08333333333333333, -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.0
Simplified56.0%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -1e-137) (* (* x x) (* (* y y) -0.08333333333333333)) (fma 0.5 (* x x) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = (x * x) * ((y * y) * -0.08333333333333333);
} else {
tmp = fma(0.5, (x * x), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = Float64(Float64(x * x) * Float64(Float64(y * y) * -0.08333333333333333)); else tmp = fma(0.5, Float64(x * x), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(\left(y \cdot y\right) \cdot -0.08333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.1
Simplified57.1%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.0
Simplified56.0%
Final simplification56.3%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -1e-137) (fma (* y y) -0.16666666666666666 1.0) (fma 0.5 (* x x) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -1e-137) {
tmp = fma((y * y), -0.16666666666666666, 1.0);
} else {
tmp = fma(0.5, (x * x), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -1e-137) tmp = fma(Float64(y * y), -0.16666666666666666, 1.0); else tmp = fma(0.5, Float64(x * x), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -1e-137], N[(N[(y * y), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -1 \cdot 10^{-137}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, -0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -9.99999999999999978e-138Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6433.2
Simplified33.2%
if -9.99999999999999978e-138 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified74.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.0
Simplified56.0%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) 2.0) 1.0 (* 0.5 (* x x))))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= 2.0) {
tmp = 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((cosh(x) * (sin(y) / y)) <= 2.0d0) then
tmp = 1.0d0
else
tmp = 0.5d0 * (x * x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((Math.cosh(x) * (Math.sin(y) / y)) <= 2.0) {
tmp = 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y): tmp = 0 if (math.cosh(x) * (math.sin(y) / y)) <= 2.0: tmp = 1.0 else: tmp = 0.5 * (x * x) return tmp
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= 2.0) tmp = 1.0; else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((cosh(x) * (sin(y) / y)) <= 2.0) tmp = 1.0; else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 2.0], 1.0, N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq 2:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 2Initial program 99.8%
Taylor expanded in y around 0
Simplified36.3%
Taylor expanded in x around 0
Simplified36.4%
if 2 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified100.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6460.0
Simplified60.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.0
Simplified60.0%
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Initial program 99.9%
(FPCore (x y) :precision binary64 (fma 0.5 (* x x) 1.0))
double code(double x, double y) {
return fma(0.5, (x * x), 1.0);
}
function code(x, y) return fma(0.5, Float64(x * x), 1.0) end
code[x_, y_] := N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(0.5, x \cdot x, 1\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified59.7%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6445.0
Simplified45.0%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.9%
Taylor expanded in y around 0
Simplified59.7%
Taylor expanded in x around 0
Simplified24.2%
(FPCore (x y) :precision binary64 (/ (* (cosh x) (sin y)) y))
double code(double x, double y) {
return (cosh(x) * sin(y)) / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (cosh(x) * sin(y)) / y
end function
public static double code(double x, double y) {
return (Math.cosh(x) * Math.sin(y)) / y;
}
def code(x, y): return (math.cosh(x) * math.sin(y)) / y
function code(x, y) return Float64(Float64(cosh(x) * sin(y)) / y) end
function tmp = code(x, y) tmp = (cosh(x) * sin(y)) / y; end
code[x_, y_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \sin y}{y}
\end{array}
herbie shell --seed 2024195
(FPCore (x y)
:name "Linear.Quaternion:$csinh from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (/ (* (cosh x) (sin y)) y))
(* (cosh x) (/ (sin y) y)))