
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (/ (sin x) (/ y (sinh y))))
double code(double x, double y) {
return sin(x) / (y / sinh(y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) / (y / sinh(y))
end function
public static double code(double x, double y) {
return Math.sin(x) / (y / Math.sinh(y));
}
def code(x, y): return math.sin(x) / (y / math.sinh(y))
function code(x, y) return Float64(sin(x) / Float64(y / sinh(y))) end
function tmp = code(x, y) tmp = sin(x) / (y / sinh(y)); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] / N[(y / N[Sinh[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x}{\frac{y}{\sinh y}}
\end{array}
Initial program 100.0%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0
Applied egg-rr100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x) t_0)))
(if (<= t_1 (- INFINITY))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= t_1 1e+20)
(*
(sin x)
(fma
y
(*
y
(fma
(* y y)
(fma (* y 0.0001984126984126984) y 0.008333333333333333)
0.16666666666666666))
1.0))
(* x t_0)))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double t_1 = sin(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (t_1 <= 1e+20) {
tmp = sin(x) * fma(y, (y * fma((y * y), fma((y * 0.0001984126984126984), y, 0.008333333333333333), 0.16666666666666666)), 1.0);
} else {
tmp = x * t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(sin(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (t_1 <= 1e+20) tmp = Float64(sin(x) * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * 0.0001984126984126984), y, 0.008333333333333333), 0.16666666666666666)), 1.0)); else tmp = Float64(x * t_0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+20], N[(N[Sin[x], $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * 0.0001984126984126984), $MachinePrecision] * y + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := \sin x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+20}:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot 0.0001984126984126984, y, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.9
Simplified50.9%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6445.1
Simplified45.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6437.4
Simplified37.4%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e20Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified98.5%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6498.5
Applied egg-rr98.5%
if 1e20 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
Simplified76.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x) t_0)))
(if (<= t_1 (- INFINITY))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= t_1 1e+20)
(*
(sin x)
(fma
y
(* y (fma (* y y) 0.008333333333333333 0.16666666666666666))
1.0))
(* x t_0)))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double t_1 = sin(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (t_1 <= 1e+20) {
tmp = sin(x) * fma(y, (y * fma((y * y), 0.008333333333333333, 0.16666666666666666)), 1.0);
} else {
tmp = x * t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(sin(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (t_1 <= 1e+20) tmp = Float64(sin(x) * fma(y, Float64(y * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)); else tmp = Float64(x * t_0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+20], N[(N[Sin[x], $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := \sin x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+20}:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.9
Simplified50.9%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6445.1
Simplified45.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6437.4
Simplified37.4%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e20Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified98.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
distribute-rgt-outN/A
+-commutativeN/A
associate-+r+N/A
Simplified98.5%
if 1e20 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
Simplified76.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x) t_0)))
(if (<= t_1 (- INFINITY))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= t_1 1e+20)
(* (sin x) (fma 0.16666666666666666 (* y y) 1.0))
(* x t_0)))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double t_1 = sin(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (t_1 <= 1e+20) {
tmp = sin(x) * fma(0.16666666666666666, (y * y), 1.0);
} else {
tmp = x * t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(sin(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (t_1 <= 1e+20) tmp = Float64(sin(x) * fma(0.16666666666666666, Float64(y * y), 1.0)); else tmp = Float64(x * t_0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+20], N[(N[Sin[x], $MachinePrecision] * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := \sin x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+20}:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.9
Simplified50.9%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6445.1
Simplified45.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6437.4
Simplified37.4%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e20Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6498.1
Simplified98.1%
if 1e20 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
Simplified76.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* (sin x) t_0)))
(if (<= t_1 (- INFINITY))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= t_1 1e+20) (sin x) (* x t_0)))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double t_1 = sin(x) * t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (t_1 <= 1e+20) {
tmp = sin(x);
} else {
tmp = x * t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(sin(x) * t_0) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (t_1 <= 1e+20) tmp = sin(x); else tmp = Float64(x * t_0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+20], N[Sin[x], $MachinePrecision], N[(x * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := \sin x \cdot t\_0\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+20}:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_0\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.9
Simplified50.9%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6445.1
Simplified45.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6437.4
Simplified37.4%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e20Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6497.5
Simplified97.5%
if 1e20 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
Simplified76.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= t_0 1e+20)
(sin x)
(/
1.0
(/
y
(*
x
(fma
(fma
(* y y)
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y))))))))
double code(double x, double y) {
double t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (t_0 <= 1e+20) {
tmp = sin(x);
} else {
tmp = 1.0 / (y / (x * fma(fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y)));
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(x) * Float64(sinh(y) / y)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (t_0 <= 1e+20) tmp = sin(x); else tmp = Float64(1.0 / Float64(y / Float64(x * fma(fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y)))); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+20], N[Sin[x], $MachinePrecision], N[(1.0 / N[(y / N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 10^{+20}:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6450.9
Simplified50.9%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6445.1
Simplified45.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6437.4
Simplified37.4%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1e20Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6497.5
Simplified97.5%
if 1e20 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0
Simplified80.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified73.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified65.9%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.9
Applied egg-rr65.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 -0.005)
(* -0.16666666666666666 (* x (* x x)))
(if (<= t_0 0.2) x (* 0.16666666666666666 (* x (* y y)))))))
double code(double x, double y) {
double t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -0.005) {
tmp = -0.16666666666666666 * (x * (x * x));
} else if (t_0 <= 0.2) {
tmp = x;
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sin(x) * (sinh(y) / y)
if (t_0 <= (-0.005d0)) then
tmp = (-0.16666666666666666d0) * (x * (x * x))
else if (t_0 <= 0.2d0) then
tmp = x
else
tmp = 0.16666666666666666d0 * (x * (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(x) * (Math.sinh(y) / y);
double tmp;
if (t_0 <= -0.005) {
tmp = -0.16666666666666666 * (x * (x * x));
} else if (t_0 <= 0.2) {
tmp = x;
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
def code(x, y): t_0 = math.sin(x) * (math.sinh(y) / y) tmp = 0 if t_0 <= -0.005: tmp = -0.16666666666666666 * (x * (x * x)) elif t_0 <= 0.2: tmp = x else: tmp = 0.16666666666666666 * (x * (y * y)) return tmp
function code(x, y) t_0 = Float64(sin(x) * Float64(sinh(y) / y)) tmp = 0.0 if (t_0 <= -0.005) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * x))); elseif (t_0 <= 0.2) tmp = x; else tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) t_0 = sin(x) * (sinh(y) / y); tmp = 0.0; if (t_0 <= -0.005) tmp = -0.16666666666666666 * (x * (x * x)); elseif (t_0 <= 0.2) tmp = x; else tmp = 0.16666666666666666 * (x * (y * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.005], N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.2], x, N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -0.005:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0.2:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6434.2
Simplified34.2%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6425.0
Simplified25.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.2
Simplified14.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.3
Simplified13.3%
if -0.0050000000000000001 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.20000000000000001Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6498.9
Simplified98.9%
Taylor expanded in x around 0
Simplified90.3%
if 0.20000000000000001 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6461.0
Simplified61.0%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6427.6
Simplified27.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.4
Simplified32.4%
Final simplification38.2%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.01)
(*
(fma x (* x (* x -0.16666666666666666)) x)
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(/
(* x (fma (* y (* y (* (* y y) 0.0001984126984126984))) (* y (* y y)) y))
y)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.01) {
tmp = fma(x, (x * (x * -0.16666666666666666)), x) * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else {
tmp = (x * fma((y * (y * ((y * y) * 0.0001984126984126984))), (y * (y * y)), y)) / y;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.01) tmp = Float64(fma(x, Float64(x * Float64(x * -0.16666666666666666)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = Float64(Float64(x * fma(Float64(y * Float64(y * Float64(Float64(y * y) * 0.0001984126984126984))), Float64(y * Float64(y * y)), y)) / y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.01], N[(N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.01:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right), y \cdot \left(y \cdot y\right), y\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.0100000000000000002Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9
Simplified61.9%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified55.2%
if 0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.2
Simplified61.2%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified56.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified50.8%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.8
Simplified50.8%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.01)
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma x (* x (* x -0.16666666666666666)) x))
(*
x
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0))))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.01) {
tmp = fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * (x * -0.16666666666666666)), x);
} else {
tmp = x * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.01) tmp = Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * Float64(x * -0.16666666666666666)), x)); else tmp = Float64(x * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.01], N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.01:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6477.9
Simplified77.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.5
Simplified52.5%
if 0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified83.6%
Taylor expanded in x around 0
Simplified48.9%
Final simplification51.1%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(*
y
(*
y
(*
x
(fma
(* x x)
(fma
x
(* x (fma (* x x) -3.306878306878307e-5 0.001388888888888889))
-0.027777777777777776)
0.16666666666666666))))
(if (<= (sin x) 5e-8)
(*
x
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0))
(*
x
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma
x
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
1.0))))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = y * (y * (x * fma((x * x), fma(x, (x * fma((x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)));
} else if (sin(x) <= 5e-8) {
tmp = x * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
} else {
tmp = x * (fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), 1.0));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(x, Float64(x * fma(Float64(x * x), -3.306878306878307e-5, 0.001388888888888889)), -0.027777777777777776), 0.16666666666666666)))); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0)); else tmp = Float64(x * Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), 1.0))); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * -3.306878306878307e-5 + 0.001388888888888889), $MachinePrecision]), $MachinePrecision] + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x \cdot x, -3.306878306878307 \cdot 10^{-5}, 0.001388888888888889\right), -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6432.6
Simplified32.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6425.0
Simplified25.0%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified89.2%
Taylor expanded in x around 0
Simplified89.2%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
Simplified30.4%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(*
(fma x (* x (* x -0.16666666666666666)) x)
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(if (<= (sin x) 5e-8)
(*
x
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0))
(*
x
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma
x
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
1.0))))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = fma(x, (x * (x * -0.16666666666666666)), x) * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else if (sin(x) <= 5e-8) {
tmp = x * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
} else {
tmp = x * (fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), 1.0));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(fma(x, Float64(x * Float64(x * -0.16666666666666666)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0)); else tmp = Float64(x * Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), 1.0))); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.0
Simplified26.0%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified23.6%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified89.2%
Taylor expanded in x around 0
Simplified89.2%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
Simplified30.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (fma 0.16666666666666666 (* y y) 1.0)))
(if (<= (sin x) -0.005)
(* t_0 (fma x (* x (* x -0.16666666666666666)) x))
(if (<= (sin x) 5e-8)
(*
x
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0))
(*
x
(*
t_0
(fma
x
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
1.0)))))))
double code(double x, double y) {
double t_0 = fma(0.16666666666666666, (y * y), 1.0);
double tmp;
if (sin(x) <= -0.005) {
tmp = t_0 * fma(x, (x * (x * -0.16666666666666666)), x);
} else if (sin(x) <= 5e-8) {
tmp = x * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
} else {
tmp = x * (t_0 * fma(x, (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), 1.0));
}
return tmp;
}
function code(x, y) t_0 = fma(0.16666666666666666, Float64(y * y), 1.0) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(t_0 * fma(x, Float64(x * Float64(x * -0.16666666666666666)), x)); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0)); else tmp = Float64(x * Float64(t_0 * fma(x, Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), 1.0))); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(t$95$0 * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$0 * N[(x * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\\
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t\_0 \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6423.6
Simplified23.6%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-+r+N/A
*-lft-identityN/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
Simplified89.2%
Taylor expanded in x around 0
Simplified89.2%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
Simplified30.4%
Final simplification54.9%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma x (* x (* x -0.16666666666666666)) x))
(if (<= (sin x) 0.028)
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(*
y
(*
y
(*
x
(fma
(* x x)
(fma (* x x) 0.001388888888888889 -0.027777777777777776)
0.16666666666666666)))))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * (x * -0.16666666666666666)), x);
} else if (sin(x) <= 0.028) {
tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else {
tmp = y * (y * (x * fma((x * x), fma((x * x), 0.001388888888888889, -0.027777777777777776), 0.16666666666666666)));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * Float64(x * -0.16666666666666666)), x)); elseif (sin(x) <= 0.028) tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = Float64(y * Float64(y * Float64(x * fma(Float64(x * x), fma(Float64(x * x), 0.001388888888888889, -0.027777777777777776), 0.16666666666666666)))); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 0.028], N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * 0.001388888888888889 + -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right)\\
\mathbf{elif}\;\sin x \leq 0.028:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, 0.001388888888888889, -0.027777777777777776\right), 0.16666666666666666\right)\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6423.6
Simplified23.6%
if -0.0050000000000000001 < (sin.f64 x) < 0.0280000000000000006Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.9
Simplified98.9%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified82.0%
Taylor expanded in x around 0
Simplified81.2%
if 0.0280000000000000006 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.2
Simplified73.2%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6433.1
Simplified33.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-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-*.f6427.5
Simplified27.5%
Final simplification51.5%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma x (* x (* x -0.16666666666666666)) x))
(if (<= (sin x) 5e-8)
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(fma
(* x x)
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
x))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * (x * -0.16666666666666666)), x);
} else if (sin(x) <= 5e-8) {
tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * Float64(x * -0.16666666666666666)), x)); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6423.6
Simplified23.6%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified82.6%
Taylor expanded in x around 0
Simplified82.6%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6447.5
Simplified47.5%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6427.2
Simplified27.2%
Final simplification51.2%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(*
(* -0.16666666666666666 (* x (* x x)))
(fma y (* y 0.16666666666666666) 1.0))
(if (<= (sin x) 5e-8)
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(fma
(* x x)
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
x))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = (-0.16666666666666666 * (x * (x * x))) * fma(y, (y * 0.16666666666666666), 1.0);
} else if (sin(x) <= 5e-8) {
tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(Float64(-0.16666666666666666 * Float64(x * Float64(x * x))) * fma(y, Float64(y * 0.16666666666666666), 1.0)); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\right) \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.0
Simplified26.0%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified23.6%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6423.6
Simplified23.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.6
Simplified22.6%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified82.6%
Taylor expanded in x around 0
Simplified82.6%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6447.5
Simplified47.5%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6427.2
Simplified27.2%
Final simplification50.9%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(* y (* x (* y (fma (* x x) -0.027777777777777776 0.16666666666666666))))
(if (<= (sin x) 5e-8)
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(fma
(* x x)
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
x))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = y * (x * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else if (sin(x) <= 5e-8) {
tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else {
tmp = fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(y * Float64(x * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); elseif (sin(x) <= 5e-8) tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = fma(Float64(x * x), Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(y * N[(x * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;y \cdot \left(x \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6432.6
Simplified32.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6422.7
Simplified22.7%
if -0.0050000000000000001 < (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified82.6%
Taylor expanded in x around 0
Simplified82.6%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6447.5
Simplified47.5%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6427.2
Simplified27.2%
Final simplification50.9%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(* y (* x (* y (fma (* x x) -0.027777777777777776 0.16666666666666666))))
(if (<= (sin x) 0.13)
(fma x (* 0.16666666666666666 (* y y)) x)
(fma (* x x) (* 0.008333333333333333 (* x (* x x))) x))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = y * (x * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else if (sin(x) <= 0.13) {
tmp = fma(x, (0.16666666666666666 * (y * y)), x);
} else {
tmp = fma((x * x), (0.008333333333333333 * (x * (x * x))), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(y * Float64(x * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); elseif (sin(x) <= 0.13) tmp = fma(x, Float64(0.16666666666666666 * Float64(y * y)), x); else tmp = fma(Float64(x * x), Float64(0.008333333333333333 * Float64(x * Float64(x * x))), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(y * N[(x * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 0.13], N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(0.008333333333333333 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;y \cdot \left(x \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;\sin x \leq 0.13:\\
\;\;\;\;\mathsf{fma}\left(x, 0.16666666666666666 \cdot \left(y \cdot y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, 0.008333333333333333 \cdot \left(x \cdot \left(x \cdot x\right)\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6432.6
Simplified32.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6422.7
Simplified22.7%
if -0.0050000000000000001 < (sin.f64 x) < 0.13Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6470.6
Simplified70.6%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.3
Simplified67.3%
if 0.13 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6444.9
Simplified44.9%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6422.6
Simplified22.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.6
Simplified22.6%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) 0.01) (fma x (* (* x x) -0.16666666666666666) x) (* 0.16666666666666666 (* x (* y y)))))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.01) {
tmp = fma(x, ((x * x) * -0.16666666666666666), x);
} else {
tmp = 0.16666666666666666 * (x * (y * y));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.01) tmp = fma(x, Float64(Float64(x * x) * -0.16666666666666666), x); else tmp = Float64(0.16666666666666666 * Float64(x * Float64(y * y))); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.01], N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.01:\\
\;\;\;\;\mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6457.3
Simplified57.3%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6450.7
Simplified50.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.6
Simplified43.6%
if 0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6462.2
Simplified62.2%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6427.0
Simplified27.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.5
Simplified31.5%
Final simplification38.9%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) -0.005) (* -0.16666666666666666 (* x (* x x))) x))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= -0.005) {
tmp = -0.16666666666666666 * (x * (x * x));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((sin(x) * (sinh(y) / y)) <= (-0.005d0)) then
tmp = (-0.16666666666666666d0) * (x * (x * x))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((Math.sin(x) * (Math.sinh(y) / y)) <= -0.005) {
tmp = -0.16666666666666666 * (x * (x * x));
} else {
tmp = x;
}
return tmp;
}
def code(x, y): tmp = 0 if (math.sin(x) * (math.sinh(y) / y)) <= -0.005: tmp = -0.16666666666666666 * (x * (x * x)) else: tmp = x return tmp
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.005) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * x))); else tmp = x; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((sin(x) * (sinh(y) / y)) <= -0.005) tmp = -0.16666666666666666 * (x * (x * x)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -0.005], N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.005:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6434.2
Simplified34.2%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6425.0
Simplified25.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.2
Simplified14.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.3
Simplified13.3%
if -0.0050000000000000001 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6452.5
Simplified52.5%
Taylor expanded in x around 0
Simplified36.1%
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
(FPCore (x y)
:precision binary64
(if (<= (sin x) 5e-8)
(*
(fma -0.16666666666666666 (* x (* x x)) x)
(/
(fma
(fma
y
(* y (fma (* y 0.0001984126984126984) y 0.008333333333333333))
0.16666666666666666)
(* y (* y y))
y)
y))
(*
x
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma
x
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
1.0)))))
double code(double x, double y) {
double tmp;
if (sin(x) <= 5e-8) {
tmp = fma(-0.16666666666666666, (x * (x * x)), x) * (fma(fma(y, (y * fma((y * 0.0001984126984126984), y, 0.008333333333333333)), 0.16666666666666666), (y * (y * y)), y) / y);
} else {
tmp = x * (fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), 1.0));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= 5e-8) tmp = Float64(fma(-0.16666666666666666, Float64(x * Float64(x * x)), x) * Float64(fma(fma(y, Float64(y * fma(Float64(y * 0.0001984126984126984), y, 0.008333333333333333)), 0.16666666666666666), Float64(y * Float64(y * y)), y) / y)); else tmp = Float64(x * Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), 1.0))); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y * N[(y * N[(N[(y * 0.0001984126984126984), $MachinePrecision] * y + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot 0.0001984126984126984, y, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified64.1%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6464.1
Applied egg-rr64.1%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
Simplified30.4%
(FPCore (x y)
:precision binary64
(if (<= (sin x) 5e-8)
(*
(fma -0.16666666666666666 (* x (* x x)) x)
(fma
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
1.0))
(*
x
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma
x
(* x (fma x (* x 0.008333333333333333) -0.16666666666666666))
1.0)))))
double code(double x, double y) {
double tmp;
if (sin(x) <= 5e-8) {
tmp = fma(-0.16666666666666666, (x * (x * x)), x) * fma((y * y), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0);
} else {
tmp = x * (fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), 1.0));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= 5e-8) tmp = Float64(fma(-0.16666666666666666, Float64(x * Float64(x * x)), x) * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0)); else tmp = Float64(x * Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), 1.0))); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], 5e-8], N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $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[(x * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\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}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 4.9999999999999998e-8Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.0
Simplified70.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6462.6
Simplified62.6%
if 4.9999999999999998e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
Simplified30.4%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.005)
(* y (* x (* y (fma (* x x) -0.027777777777777776 0.16666666666666666))))
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = y * (x * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else {
tmp = x * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(y * Float64(x * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); else tmp = Float64(x * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(y * N[(x * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 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}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;y \cdot \left(x \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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 (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6432.6
Simplified32.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6422.7
Simplified22.7%
if -0.0050000000000000001 < (sin.f64 x) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6477.5
Simplified77.5%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified66.1%
Taylor expanded in x around 0
Simplified62.0%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.005) (* y (* x (* y (fma (* x x) -0.027777777777777776 0.16666666666666666)))) (fma x (* 0.16666666666666666 (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = y * (x * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else {
tmp = fma(x, (0.16666666666666666 * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(y * Float64(x * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); else tmp = fma(x, Float64(0.16666666666666666 * Float64(y * y)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(y * N[(x * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;y \cdot \left(x \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 0.16666666666666666 \cdot \left(y \cdot y\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6472.5
Simplified72.5%
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
*-lowering-*.f64N/A
sin-lowering-sin.f6432.6
Simplified32.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6422.7
Simplified22.7%
if -0.0050000000000000001 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.6
Simplified71.6%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.0
Simplified53.0%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.005) (* -0.16666666666666666 (* x (* x x))) (* x (fma y (* y 0.16666666666666666) 1.0))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.005) {
tmp = -0.16666666666666666 * (x * (x * x));
} else {
tmp = x * fma(y, (y * 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.005) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * x))); else tmp = Float64(x * fma(y, Float64(y * 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.005], N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.005:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0050000000000000001Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6443.2
Simplified43.2%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6431.3
Simplified31.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.6
Simplified17.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.6
Simplified16.6%
if -0.0050000000000000001 < (sin.f64 x) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6477.5
Simplified77.5%
Taylor expanded in y around 0
associate-+r+N/A
distribute-lft-inN/A
associate-+r+N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt1-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified66.1%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6457.8
Simplified57.8%
Taylor expanded in x around 0
Simplified53.0%
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
return x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
public static double code(double x, double y) {
return x;
}
def code(x, y): return x
function code(x, y) return x end
function tmp = code(x, y) tmp = x; end
code[x_, y_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6445.3
Simplified45.3%
Taylor expanded in x around 0
Simplified23.1%
herbie shell --seed 2024199
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))