
(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 24 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 (* (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
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(if (<= t_1 1e-8)
(* t_0 (fma (* x x) (fma (* x x) 0.041666666666666664 0.5) 1.0))
(*
(cosh x)
(fma
(* y y)
(fma (* y y) 0.008333333333333333 -0.16666666666666666)
1.0))))))
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 = ((x * x) * 0.5) * fma((y * y), fma(y, (y * fma((y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0);
} else if (t_1 <= 1e-8) {
tmp = t_0 * fma((x * x), fma((x * x), 0.041666666666666664, 0.5), 1.0);
} else {
tmp = cosh(x) * fma((y * y), fma((y * y), 0.008333333333333333, -0.16666666666666666), 1.0);
}
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(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); elseif (t_1 <= 1e-8) tmp = Float64(t_0 * fma(Float64(x * x), fma(Float64(x * x), 0.041666666666666664, 0.5), 1.0)); else tmp = Float64(cosh(x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, -0.16666666666666666), 1.0)); 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] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.041666666666666664 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $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:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-8}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.041666666666666664, 0.5\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
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.f6459.6
Simplified59.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 1e-8Initial program 99.6%
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-*.f6496.7
Simplified96.7%
if 1e-8 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6499.6
Simplified99.6%
Final simplification98.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(if (<= t_1 1e-8)
(* t_0 (fma 0.5 (* x x) 1.0))
(*
(cosh x)
(fma
(* y y)
(fma (* y y) 0.008333333333333333 -0.16666666666666666)
1.0))))))
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 = ((x * x) * 0.5) * fma((y * y), fma(y, (y * fma((y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0);
} else if (t_1 <= 1e-8) {
tmp = t_0 * fma(0.5, (x * x), 1.0);
} else {
tmp = cosh(x) * fma((y * y), fma((y * y), 0.008333333333333333, -0.16666666666666666), 1.0);
}
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(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); elseif (t_1 <= 1e-8) tmp = Float64(t_0 * fma(0.5, Float64(x * x), 1.0)); else tmp = Float64(cosh(x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, -0.16666666666666666), 1.0)); 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] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], N[(t$95$0 * N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $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:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-8}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(0.5, x \cdot x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
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.f6459.6
Simplified59.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 1e-8Initial program 99.6%
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.f6496.2
Simplified96.2%
if 1e-8 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6499.6
Simplified99.6%
Final simplification98.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (cosh x) (/ (sin y) y))))
(if (<= t_0 (- INFINITY))
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(if (<= t_0 1e-8)
(* (sin y) (/ (fma x (* x 0.5) 1.0) y))
(*
(cosh x)
(fma
(* y y)
(fma (* y y) 0.008333333333333333 -0.16666666666666666)
1.0))))))
double code(double x, double y) {
double t_0 = cosh(x) * (sin(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((x * x) * 0.5) * fma((y * y), fma(y, (y * fma((y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0);
} else if (t_0 <= 1e-8) {
tmp = sin(y) * (fma(x, (x * 0.5), 1.0) / y);
} else {
tmp = cosh(x) * fma((y * y), fma((y * y), 0.008333333333333333, -0.16666666666666666), 1.0);
}
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(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); elseif (t_0 <= 1e-8) tmp = Float64(sin(y) * Float64(fma(x, Float64(x * 0.5), 1.0) / y)); else tmp = Float64(cosh(x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, -0.16666666666666666), 1.0)); end return 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[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-8], N[(N[Sin[y], $MachinePrecision] * N[(N[(x * N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cosh x \cdot \frac{\sin y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_0 \leq 10^{-8}:\\
\;\;\;\;\sin y \cdot \frac{\mathsf{fma}\left(x, x \cdot 0.5, 1\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
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.f6459.6
Simplified59.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 1e-8Initial program 99.6%
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.f6496.2
Simplified96.2%
clear-numN/A
associate-/r/N/A
associate-*r*N/A
un-div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6496.0
Applied egg-rr96.0%
if 1e-8 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6499.6
Simplified99.6%
Final simplification98.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(if (<= t_1 1e-8)
t_0
(*
(cosh x)
(fma
(* y y)
(fma (* y y) 0.008333333333333333 -0.16666666666666666)
1.0))))))
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 = ((x * x) * 0.5) * fma((y * y), fma(y, (y * fma((y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0);
} else if (t_1 <= 1e-8) {
tmp = t_0;
} else {
tmp = cosh(x) * fma((y * y), fma((y * y), 0.008333333333333333, -0.16666666666666666), 1.0);
}
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(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); elseif (t_1 <= 1e-8) tmp = t_0; else tmp = Float64(cosh(x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, -0.16666666666666666), 1.0)); 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] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-8], t$95$0, N[(N[Cosh[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $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:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -inf.0Initial program 100.0%
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.f6459.6
Simplified59.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 1e-8Initial program 99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6495.0
Simplified95.0%
if 1e-8 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6499.6
Simplified99.6%
Final simplification98.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)) (t_1 (* (cosh x) t_0)))
(if (<= t_1 (- INFINITY))
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(if (<= t_1 0.9999999999999777) 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 = ((x * x) * 0.5) * fma((y * y), fma(y, (y * fma((y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0);
} else if (t_1 <= 0.9999999999999777) {
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(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); elseif (t_1 <= 0.9999999999999777) 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] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.9999999999999777], 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:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_1 \leq 0.9999999999999777:\\
\;\;\;\;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 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.f6459.6
Simplified59.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.6
Simplified59.6%
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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
if -inf.0 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 0.999999999999977685Initial program 99.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6495.1
Simplified95.1%
if 0.999999999999977685 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
Simplified99.5%
*-rgt-identityN/A
cosh-lowering-cosh.f6499.5
Applied egg-rr99.5%
Final simplification98.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= (* (cosh x) t_0) 2.0)
(*
t_0
(fma
(*
x
(fma
(* x x)
(fma x (* x 0.001388888888888889) 0.041666666666666664)
0.5))
x
1.0))
(cosh x))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if ((cosh(x) * t_0) <= 2.0) {
tmp = t_0 * fma((x * fma((x * x), fma(x, (x * 0.001388888888888889), 0.041666666666666664), 0.5)), x, 1.0);
} else {
tmp = cosh(x);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (Float64(cosh(x) * t_0) <= 2.0) tmp = Float64(t_0 * fma(Float64(x * fma(Float64(x * x), fma(x, Float64(x * 0.001388888888888889), 0.041666666666666664), 0.5)), 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]}, If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * t$95$0), $MachinePrecision], 2.0], N[(t$95$0 * N[(N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] * x + 1.0), $MachinePrecision]), $MachinePrecision], N[Cosh[x], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;\cosh x \cdot t\_0 \leq 2:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.001388888888888889, 0.041666666666666664\right), 0.5\right), x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 2Initial program 99.8%
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-*.f6495.9
Simplified95.9%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6495.9
Applied egg-rr95.9%
if 2 < (*.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 simplification97.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= (* (cosh x) t_0) 2.0)
(*
t_0
(fma
(* x x)
(fma
x
(* x (fma (* x x) 0.001388888888888889 0.041666666666666664))
0.5)
1.0))
(cosh x))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if ((cosh(x) * t_0) <= 2.0) {
tmp = t_0 * fma((x * x), fma(x, (x * fma((x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0);
} else {
tmp = cosh(x);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (Float64(cosh(x) * t_0) <= 2.0) tmp = Float64(t_0 * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0)); else tmp = cosh(x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * t$95$0), $MachinePrecision], 2.0], N[(t$95$0 * 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]), $MachinePrecision], N[Cosh[x], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;\cosh x \cdot t\_0 \leq 2:\\
\;\;\;\;t\_0 \cdot \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)\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 2Initial program 99.8%
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-*.f6495.9
Simplified95.9%
if 2 < (*.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 simplification97.5%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -5e-142)
(*
(fma 0.5 (* x x) 1.0)
(fma
y
(*
y
(fma
y
(* y (fma y (* y -0.0001984126984126984) 0.008333333333333333))
-0.16666666666666666))
1.0))
(cosh x)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
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 = cosh(x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(fma(0.5, Float64(x * x), 1.0) * fma(y, Float64(y * fma(y, Float64(y * fma(y, Float64(y * -0.0001984126984126984), 0.008333333333333333)), -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], -5e-142], N[(N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * N[(y * N[(y * -0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $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 -5 \cdot 10^{-142}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\cosh x\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified53.9%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
*-rgt-identityN/A
cosh-lowering-cosh.f6480.3
Applied egg-rr80.3%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -5e-142)
(*
(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) (* (* x x) 0.001388888888888889) 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
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), ((x * x) * 0.001388888888888889), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(fma(0.5, Float64(x * x), 1.0) * fma(y, Float64(y * fma(y, Float64(y * fma(y, Float64(y * -0.0001984126984126984), 0.008333333333333333)), -0.16666666666666666)), 1.0)); else tmp = fma(Float64(x * x), fma(Float64(x * x), Float64(Float64(x * x) * 0.001388888888888889), 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], -5e-142], N[(N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * N[(y * N[(y * -0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \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 \cdot x, \left(x \cdot x\right) \cdot 0.001388888888888889, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified53.9%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1
Simplified70.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.1
Simplified70.1%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -2e-51)
(*
(* (* x x) 0.5)
(fma
(* y y)
(fma
y
(* y (fma (* y y) -0.0001984126984126984 0.008333333333333333))
-0.16666666666666666)
1.0))
(fma (* x x) (fma (* x x) (* (* x x) 0.001388888888888889) 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -2e-51) {
tmp = ((x * x) * 0.5) * 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), ((x * x) * 0.001388888888888889), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -2e-51) tmp = Float64(Float64(Float64(x * x) * 0.5) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), -0.0001984126984126984, 0.008333333333333333)), -0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), fma(Float64(x * x), Float64(Float64(x * x) * 0.001388888888888889), 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], -2e-51], N[(N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -2 \cdot 10^{-51}:\\
\;\;\;\;\left(\left(x \cdot x\right) \cdot 0.5\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.001388888888888889, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -2e-51Initial 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.f6467.8
Simplified67.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.8
Simplified44.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
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.9
Simplified73.9%
if -2e-51 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified75.7%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6466.1
Simplified66.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.1
Simplified66.1%
Final simplification67.1%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* (fma 0.5 (* x x) 1.0) (/ (* y (fma -0.16666666666666666 (* y y) 1.0)) y)) (fma (* x x) (fma (* x x) (* (* x x) 0.001388888888888889) 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = fma(0.5, (x * x), 1.0) * ((y * fma(-0.16666666666666666, (y * y), 1.0)) / y);
} else {
tmp = fma((x * x), fma((x * x), ((x * x) * 0.001388888888888889), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(fma(0.5, Float64(x * x), 1.0) * Float64(Float64(y * fma(-0.16666666666666666, Float64(y * y), 1.0)) / y)); else tmp = fma(Float64(x * x), fma(Float64(x * x), Float64(Float64(x * x) * 0.001388888888888889), 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], -5e-142], N[(N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(y * N[(-0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right) \cdot \frac{y \cdot \mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.001388888888888889, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1
Simplified70.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.1
Simplified70.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) y)))
(if (<= t_0 -2e-305)
(* (* x x) (fma (* y y) -0.08333333333333333 0.5))
(if (<= t_0 5e-113)
(fma
y
(* y (fma y (* y 0.008333333333333333) -0.16666666666666666))
1.0)
(fma x (* x (fma x (* x 0.041666666666666664) 0.5)) 1.0)))))
double code(double x, double y) {
double t_0 = sin(y) / y;
double tmp;
if (t_0 <= -2e-305) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} else if (t_0 <= 5e-113) {
tmp = fma(y, (y * fma(y, (y * 0.008333333333333333), -0.16666666666666666)), 1.0);
} else {
tmp = fma(x, (x * fma(x, (x * 0.041666666666666664), 0.5)), 1.0);
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(y) / y) tmp = 0.0 if (t_0 <= -2e-305) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); elseif (t_0 <= 5e-113) tmp = fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), -0.16666666666666666)), 1.0); else tmp = fma(x, Float64(x * fma(x, Float64(x * 0.041666666666666664), 0.5)), 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, -2e-305], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-113], N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(x * N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-305}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-113}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (sin.f64 y) y) < -1.99999999999999999e-305Initial 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.f6479.0
Simplified79.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6447.5
Simplified47.5%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6445.8
Simplified45.8%
if -1.99999999999999999e-305 < (/.f64 (sin.f64 y) y) < 4.9999999999999997e-113Initial program 99.8%
*-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
Simplified47.1%
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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6450.9
Simplified50.9%
if 4.9999999999999997e-113 < (/.f64 (sin.f64 y) y) Initial program 100.0%
Taylor expanded in y around 0
Simplified90.4%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6475.8
Simplified75.8%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* (* x x) (fma (* y y) -0.08333333333333333 0.5)) (fma (* x x) (fma (* x x) (* (* x x) 0.001388888888888889) 0.5) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} else {
tmp = fma((x * x), fma((x * x), ((x * x) * 0.001388888888888889), 0.5), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); else tmp = fma(Float64(x * x), fma(Float64(x * x), Float64(Float64(x * x) * 0.001388888888888889), 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], -5e-142], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \left(x \cdot x\right) \cdot 0.001388888888888889, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6450.6
Simplified50.6%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1
Simplified70.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.1
Simplified70.1%
(FPCore (x y)
:precision binary64
(if (<= (* (cosh x) (/ (sin y) y)) -5e-142)
(* (* x x) (fma (* y y) -0.08333333333333333 0.5))
(fma
(* x x)
(* x (* x (fma (* x x) 0.001388888888888889 0.041666666666666664)))
1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} else {
tmp = fma((x * x), (x * (x * fma((x * x), 0.001388888888888889, 0.041666666666666664))), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); else tmp = fma(Float64(x * x), Float64(x * Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664))), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -5e-142], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, 0.001388888888888889, 0.041666666666666664\right)\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6450.6
Simplified50.6%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1
Simplified70.1%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
unpow2N/A
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
lft-mult-inverseN/A
metadata-evalN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6470.1
Simplified70.1%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* (* x x) (fma (* y y) -0.08333333333333333 0.5)) (fma (* x x) (* x (* x (* (* x x) 0.001388888888888889))) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} else {
tmp = fma((x * x), (x * (x * ((x * x) * 0.001388888888888889))), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= -5e-142) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); else tmp = fma(Float64(x * x), Float64(x * Float64(x * Float64(Float64(x * x) * 0.001388888888888889))), 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -5e-142], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \left(x \cdot \left(\left(x \cdot x\right) \cdot 0.001388888888888889\right)\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6450.6
Simplified50.6%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1
Simplified70.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-*.f6470.1
Simplified70.1%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* (* x x) (fma (* y y) -0.08333333333333333 0.5)) (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)) <= -5e-142) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} 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)) <= -5e-142) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); else tmp = fma(x, Float64(x * fma(x, Float64(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], -5e-142], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(x * N[(x * 0.041666666666666664), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq -5 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.041666666666666664, 0.5\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6450.6
Simplified50.6%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6466.8
Simplified66.8%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* (* x x) (fma (* y y) -0.08333333333333333 0.5)) (fma 0.5 (* x x) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = (x * x) * fma((y * y), -0.08333333333333333, 0.5);
} 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)) <= -5e-142) tmp = Float64(Float64(x * x) * fma(Float64(y * y), -0.08333333333333333, 0.5)); 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], -5e-142], N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.08333333333333333 + 0.5), $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 -5 \cdot 10^{-142}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.08333333333333333, 0.5\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)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6450.6
Simplified50.6%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6458.7
Simplified58.7%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (* 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)) <= -5e-142) {
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)) <= -5e-142) 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], -5e-142], 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 -5 \cdot 10^{-142}:\\
\;\;\;\;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)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
metadata-evalN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.4
Simplified50.4%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6458.7
Simplified58.7%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) -5e-142) (fma -0.16666666666666666 (* y y) 1.0) (fma 0.5 (* x x) 1.0)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= -5e-142) {
tmp = fma(-0.16666666666666666, (y * y), 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)) <= -5e-142) tmp = fma(-0.16666666666666666, Float64(y * y), 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], -5e-142], N[(-0.16666666666666666 * N[(y * y), $MachinePrecision] + 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 -5 \cdot 10^{-142}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 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)) < -5.0000000000000002e-142Initial 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.f6476.8
Simplified76.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6452.4
Simplified52.4%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6435.8
Simplified35.8%
if -5.0000000000000002e-142 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 99.9%
Taylor expanded in y around 0
Simplified80.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6458.7
Simplified58.7%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) 2.0) (fma -0.16666666666666666 (* y y) 1.0) (* (* x x) 0.5)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= 2.0) {
tmp = fma(-0.16666666666666666, (y * y), 1.0);
} else {
tmp = (x * x) * 0.5;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(cosh(x) * Float64(sin(y) / y)) <= 2.0) tmp = fma(-0.16666666666666666, Float64(y * y), 1.0); else tmp = Float64(Float64(x * x) * 0.5); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 2.0], N[(-0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq 2:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 2Initial 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.f6491.8
Simplified91.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6459.3
Simplified59.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6454.4
Simplified54.4%
if 2 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
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.f6453.3
Simplified53.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.3
Simplified53.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.8
Simplified53.8%
Final simplification54.1%
(FPCore (x y) :precision binary64 (if (<= (* (cosh x) (/ (sin y) y)) 2.0) 1.0 (* (* x x) 0.5)))
double code(double x, double y) {
double tmp;
if ((cosh(x) * (sin(y) / y)) <= 2.0) {
tmp = 1.0;
} else {
tmp = (x * x) * 0.5;
}
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 = (x * x) * 0.5d0
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 = (x * x) * 0.5;
}
return tmp;
}
def code(x, y): tmp = 0 if (math.cosh(x) * (math.sin(y) / y)) <= 2.0: tmp = 1.0 else: tmp = (x * x) * 0.5 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(Float64(x * x) * 0.5); 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 = (x * x) * 0.5; 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[(N[(x * x), $MachinePrecision] * 0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\cosh x \cdot \frac{\sin y}{y} \leq 2:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot 0.5\\
\end{array}
\end{array}
if (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) < 2Initial program 99.8%
Taylor expanded in y around 0
Simplified44.9%
Taylor expanded in x around 0
Simplified45.0%
if 2 < (*.f64 (cosh.f64 x) (/.f64 (sin.f64 y) y)) Initial program 100.0%
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.f6453.3
Simplified53.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.3
Simplified53.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.8
Simplified53.8%
Final simplification48.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (sin y) y) -2e-305)
(*
(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)
(fma
y
(* y (fma (* y y) 0.008333333333333333 -0.16666666666666666))
1.0))))
double code(double x, double y) {
double tmp;
if ((sin(y) / y) <= -2e-305) {
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) * fma(y, (y * fma((y * y), 0.008333333333333333, -0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(y) / y) <= -2e-305) tmp = Float64(fma(0.5, Float64(x * x), 1.0) * fma(y, Float64(y * fma(y, Float64(y * fma(y, Float64(y * -0.0001984126984126984), 0.008333333333333333)), -0.16666666666666666)), 1.0)); else tmp = Float64(fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), 0.001388888888888889, 0.041666666666666664)), 0.5), 1.0) * fma(y, Float64(y * fma(Float64(y * y), 0.008333333333333333, -0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], -2e-305], N[(N[(0.5 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * N[(y * N[(y * -0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(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] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin y}{y} \leq -2 \cdot 10^{-305}:\\
\;\;\;\;\mathsf{fma}\left(0.5, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \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) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (sin.f64 y) y) < -1.99999999999999999e-305Initial 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.f6479.0
Simplified79.0%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified48.8%
if -1.99999999999999999e-305 < (/.f64 (sin.f64 y) y) Initial program 99.9%
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-*.f6488.7
Simplified88.7%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.9
Simplified73.9%
(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
Simplified66.0%
Taylor expanded in x around 0
Simplified29.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(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 2024196
(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)))