
(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 24 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%
lift-sin.f64N/A
lift-sinh.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f64100.0
Applied egg-rr100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(if (<= t_0 1.0)
(* (sin x) (fma 0.16666666666666666 (* y y) 1.0))
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 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 t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} else if (t_0 <= 1.0) {
tmp = sin(x) * fma(0.16666666666666666, (y * y), 1.0);
} else {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
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(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); elseif (t_0 <= 1.0) tmp = Float64(sin(x) * fma(0.16666666666666666, Float64(y * y), 1.0)); else tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(Float64(x * x), Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), x)); 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[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[Sin[x], $MachinePrecision] * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified81.4%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified60.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval60.2
Simplified60.2%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6498.9
Simplified98.9%
if 1 < (*.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
Simplified85.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6463.1
Simplified63.1%
Final simplification79.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(if (<= t_0 1.0)
(sin x)
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 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 t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} else if (t_0 <= 1.0) {
tmp = sin(x);
} else {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
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(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); elseif (t_0 <= 1.0) tmp = sin(x); else tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(Float64(x * x), Float64(x * fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666)), x)); 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[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[Sin[x], $MachinePrecision], N[(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] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified81.4%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified60.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval60.2
Simplified60.2%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6497.9
Simplified97.9%
if 1 < (*.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
Simplified85.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6463.1
Simplified63.1%
Final simplification78.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)))
(if (<= (* (sin x) t_0) 1.0)
(*
(sin x)
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0))
(*
t_0
(fma
(fma x (* x 0.008333333333333333) -0.16666666666666666)
(* x (* x x))
x)))))
double code(double x, double y) {
double t_0 = sinh(y) / y;
double tmp;
if ((sin(x) * t_0) <= 1.0) {
tmp = sin(x) * fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0);
} else {
tmp = t_0 * fma(fma(x, (x * 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x);
}
return tmp;
}
function code(x, y) t_0 = Float64(sinh(y) / y) tmp = 0.0 if (Float64(sin(x) * t_0) <= 1.0) tmp = Float64(sin(x) * fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0)); else tmp = Float64(t_0 * fma(fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(N[Sin[x], $MachinePrecision] * t$95$0), $MachinePrecision], 1.0], N[(N[Sin[x], $MachinePrecision] * 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[(t$95$0 * N[(N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
\mathbf{if}\;\sin x \cdot t\_0 \leq 1:\\
\;\;\;\;\sin 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}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial 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
Simplified95.1%
if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.0
Simplified70.0%
Final simplification88.2%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 1.0)
(*
(sin x)
(fma (* y y) (fma y (* y 0.008333333333333333) 0.16666666666666666) 1.0))
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 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) * (sinh(y) / y)) <= 1.0) {
tmp = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
} else {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 1.0) tmp = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0)); else tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * 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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 1.0], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 1:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified92.8%
if 1 < (*.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
Simplified85.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6463.1
Simplified63.1%
Final simplification84.7%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) -0.01)
(*
(fma (* x x) (* x -0.16666666666666666) x)
(/
(fma
y
(*
y
(*
y
(fma (* y y) (* (* y y) 0.0001984126984126984) 0.16666666666666666)))
y)
y))
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 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) * (sinh(y) / y)) <= -0.01) {
tmp = fma((x * x), (x * -0.16666666666666666), x) * (fma(y, (y * (y * fma((y * y), ((y * y) * 0.0001984126984126984), 0.16666666666666666))), y) / y);
} else {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma((x * x), (x * fma(x, (x * 0.008333333333333333), -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.01) tmp = Float64(fma(Float64(x * x), Float64(x * -0.16666666666666666), x) * Float64(fma(y, Float64(y * Float64(y * fma(Float64(y * y), Float64(Float64(y * y) * 0.0001984126984126984), 0.16666666666666666))), y) / y)); else tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * 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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -0.01], N[(N[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \left(y \cdot y\right) \cdot 0.0001984126984126984, 0.16666666666666666\right)\right), y\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Simplified91.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6444.5
Simplified44.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6444.5
Simplified44.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
Simplified93.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6466.1
Simplified66.1%
Final simplification57.8%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.002)
(*
x
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0)))
(fma
(*
(* y y)
(fma
(* y y)
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
0.16666666666666666))
x
x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.002) {
tmp = x * (fma(x, (x * -0.16666666666666666), 1.0) * fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0));
} else {
tmp = fma(((y * y) * fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.002) tmp = Float64(x * Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0))); else tmp = fma(Float64(Float64(y * y) * fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.002], N[(x * N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * x + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.002:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x, x\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 2e-3Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified91.8%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified63.3%
if 2e-3 < (*.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
Simplified89.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified42.5%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr43.3%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.002)
(*
x
(*
(fma 0.16666666666666666 (* y y) 1.0)
(fma x (* x -0.16666666666666666) 1.0)))
(*
x
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.002) {
tmp = x * (fma(0.16666666666666666, (y * y), 1.0) * fma(x, (x * -0.16666666666666666), 1.0));
} 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 (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.002) tmp = Float64(x * Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * fma(x, Float64(x * -0.16666666666666666), 1.0))); 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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.002], N[(x * N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $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 \cdot \frac{\sinh y}{y} \leq 0.002:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 2e-3Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified91.8%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified63.3%
Taylor expanded in y around 0
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6458.9
Simplified58.9%
if 2e-3 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified85.0%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6485.0
Applied egg-rr85.0%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
distribute-rgt-inN/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6442.1
Simplified42.1%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) -0.01)
(* (* x (* x x)) (fma (* y y) -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) * (sinh(y) / y)) <= -0.01) {
tmp = (x * (x * x)) * fma((y * y), -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 (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.01) tmp = Float64(Float64(x * Float64(x * x)) * fma(Float64(y * y), -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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], -0.01], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $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 \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified87.0%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified41.6%
Taylor expanded in y around 0
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6434.8
Simplified34.8%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6418.2
Simplified18.2%
if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified90.7%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6490.7
Applied egg-rr90.7%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
distribute-rgt-inN/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6463.6
Simplified63.6%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) -0.01) (* x (* (* y y) (fma x (* x -0.027777777777777776) 0.16666666666666666))) (fma 0.16666666666666666 (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= -0.01) {
tmp = x * ((y * y) * fma(x, (x * -0.027777777777777776), 0.16666666666666666));
} else {
tmp = fma(0.16666666666666666, (x * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.01) tmp = Float64(x * Float64(Float64(y * y) * fma(x, Float64(x * -0.027777777777777776), 0.16666666666666666))); else tmp = fma(0.16666666666666666, Float64(x * Float64(y * y)), x); 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[(y * y), $MachinePrecision] * N[(x * N[(x * -0.027777777777777776), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;x \cdot \left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.027777777777777776, 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\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
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified87.0%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified41.6%
Taylor expanded in y around 0
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6434.8
Simplified34.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
metadata-evalN/A
associate-*r*N/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6434.7
Simplified34.7%
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
Simplified93.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified63.8%
Taylor expanded in y around 0
Simplified58.5%
Final simplification49.3%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) -0.01) (* -0.16666666666666666 (* x (* x x))) (fma 0.16666666666666666 (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= -0.01) {
tmp = -0.16666666666666666 * (x * (x * x));
} else {
tmp = fma(0.16666666666666666, (x * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.01) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * x))); else tmp = fma(0.16666666666666666, Float64(x * Float64(y * y)), x); 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[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\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
lower-sin.f6433.4
Simplified33.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6415.9
Simplified15.9%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.6
Simplified15.6%
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
Simplified93.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified63.8%
Taylor expanded in y around 0
Simplified58.5%
Final simplification41.9%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) -0.01) (* -0.16666666666666666 (* x (* x x))) (* x (fma 0.16666666666666666 (* y y) 1.0))))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= -0.01) {
tmp = -0.16666666666666666 * (x * (x * x));
} else {
tmp = x * fma(0.16666666666666666, (y * y), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= -0.01) tmp = Float64(-0.16666666666666666 * Float64(x * Float64(x * x))); else tmp = Float64(x * fma(0.16666666666666666, Float64(y * y), 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[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq -0.01:\\
\;\;\;\;-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 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
lower-sin.f6433.4
Simplified33.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6415.9
Simplified15.9%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.6
Simplified15.6%
if -0.0100000000000000002 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified90.7%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified65.9%
Taylor expanded in y around 0
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6460.4
Simplified60.4%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6458.5
Simplified58.5%
(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) -0.01)
(*
x
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0)))
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 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.01) {
tmp = x * (fma(x, (x * -0.16666666666666666), 1.0) * fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0));
} else {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * 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.01) tmp = Float64(x * Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0))); else tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * 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.01], N[(x * N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.01:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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) \cdot \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.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
if -0.0100000000000000002 < (sin.f64 x) 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
Simplified91.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6468.8
Simplified68.8%
Final simplification57.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (fma (* y y) 0.0001984126984126984 0.008333333333333333)))
(if (<= (sin x) 0.002)
(*
(fma y (* y (fma (* y y) t_0 0.16666666666666666)) 1.0)
(fma (* x x) (* x -0.16666666666666666) x))
(* (fma (* y (* y y)) (fma y (* y t_0) 0.16666666666666666) y) (/ x y)))))
double code(double x, double y) {
double t_0 = fma((y * y), 0.0001984126984126984, 0.008333333333333333);
double tmp;
if (sin(x) <= 0.002) {
tmp = fma(y, (y * fma((y * y), t_0, 0.16666666666666666)), 1.0) * fma((x * x), (x * -0.16666666666666666), x);
} else {
tmp = fma((y * (y * y)), fma(y, (y * t_0), 0.16666666666666666), y) * (x / y);
}
return tmp;
}
function code(x, y) t_0 = fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) tmp = 0.0 if (sin(x) <= 0.002) tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), t_0, 0.16666666666666666)), 1.0) * fma(Float64(x * x), Float64(x * -0.16666666666666666), x)); else tmp = Float64(fma(Float64(y * Float64(y * y)), fma(y, Float64(y * t_0), 0.16666666666666666), y) * Float64(x / y)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]}, If[LessEqual[N[Sin[x], $MachinePrecision], 0.002], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * t$95$0 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * t$95$0), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right)\\
\mathbf{if}\;\sin x \leq 0.002:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, t\_0, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot t\_0, 0.16666666666666666\right), y\right) \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (sin.f64 x) < 2e-3Initial 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
Simplified92.6%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6467.9
Simplified67.9%
if 2e-3 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Simplified92.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6431.1
Simplified31.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified27.7%
Final simplification57.1%
(FPCore (x y)
:precision binary64
(if (<= x 1.8e-11)
(* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
(*
(sin 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 (x <= 1.8e-11) {
tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
} else {
tmp = sin(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 (x <= 1.8e-11) tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x)); else tmp = Float64(sin(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[x, 1.8e-11], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * 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}\;x \leq 1.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\sin 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 x < 1.79999999999999992e-11Initial 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
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.5
Simplified77.5%
if 1.79999999999999992e-11 < x 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
Simplified94.6%
Final simplification82.5%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.01)
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(fma
(*
(* y y)
(fma
(* y y)
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
0.16666666666666666))
x
x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.01) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} else {
tmp = fma(((y * y) * fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.01) tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); else tmp = fma(Float64(Float64(y * y) * fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), x, x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * x + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.01:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x, x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval26.3
Simplified26.3%
if -0.0100000000000000002 < (sin.f64 x) 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
Simplified91.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified65.8%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr67.3%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.01)
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(fma
(*
y
(fma
(* y y)
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
0.16666666666666666))
(* x y)
x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.01) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} else {
tmp = fma((y * fma((y * y), fma(y, (y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), (x * y), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.01) tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); else tmp = fma(Float64(y * fma(Float64(y * y), fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), 0.16666666666666666)), Float64(x * y), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.01:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x \cdot y, x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval26.3
Simplified26.3%
if -0.0100000000000000002 < (sin.f64 x) 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
Simplified91.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified65.8%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr66.8%
Final simplification56.2%
(FPCore (x y)
:precision binary64
(if (<= x 5e-7)
(* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
(*
(sin x)
(fma
(* y (* y (* y 0.008333333333333333)))
y
(fma y (* y 0.16666666666666666) 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 5e-7) {
tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
} else {
tmp = sin(x) * fma((y * (y * (y * 0.008333333333333333))), y, fma(y, (y * 0.16666666666666666), 1.0));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 5e-7) tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x)); else tmp = Float64(sin(x) * fma(Float64(y * Float64(y * Float64(y * 0.008333333333333333))), y, fma(y, Float64(y * 0.16666666666666666), 1.0))); end return tmp end
code[x_, y_] := If[LessEqual[x, 5e-7], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right), y, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
\end{array}
\end{array}
if x < 4.99999999999999977e-7Initial 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
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.6
Simplified77.6%
if 4.99999999999999977e-7 < x Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified91.8%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6491.8
Applied egg-rr91.8%
Final simplification81.7%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.01)
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(fma (* y (* y (* (* y y) 0.0001984126984126984))) (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.01) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} else {
tmp = fma((y * (y * ((y * y) * 0.0001984126984126984))), (x * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.01) tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); else tmp = fma(Float64(y * Float64(y * Float64(Float64(y * y) * 0.0001984126984126984))), Float64(x * Float64(y * y)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.01:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right), x \cdot \left(y \cdot y\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval26.3
Simplified26.3%
if -0.0100000000000000002 < (sin.f64 x) 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
Simplified91.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified65.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
lower-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.3
Simplified65.3%
Final simplification55.1%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.01)
(*
x
(*
(* (* y y) (* y y))
(fma (* x x) -0.001388888888888889 0.008333333333333333)))
(*
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.01) {
tmp = x * (((y * y) * (y * y)) * fma((x * x), -0.001388888888888889, 0.008333333333333333));
} 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.01) tmp = Float64(x * Float64(Float64(Float64(y * y) * Float64(y * y)) * fma(Float64(x * x), -0.001388888888888889, 0.008333333333333333))); 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.01], N[(x * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.001388888888888889 + 0.008333333333333333), $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.01:\\
\;\;\;\;x \cdot \left(\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.001388888888888889, 0.008333333333333333\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.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
metadata-eval26.3
Simplified26.3%
if -0.0100000000000000002 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified87.7%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
distribute-rgt-inN/A
associate-+l+N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6487.7
Applied egg-rr87.7%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
distribute-rgt-inN/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6465.2
Simplified65.2%
(FPCore (x y)
:precision binary64
(if (<= x 5e-7)
(* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
(*
(sin x)
(fma (* y y) (fma y (* y 0.008333333333333333) 0.16666666666666666) 1.0))))
double code(double x, double y) {
double tmp;
if (x <= 5e-7) {
tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
} else {
tmp = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 5e-7) tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x)); else tmp = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[x, 5e-7], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if x < 4.99999999999999977e-7Initial 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
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6477.6
Simplified77.6%
if 4.99999999999999977e-7 < x Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified91.8%
Final simplification81.7%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.01) (* (* x (* x x)) (fma (* y y) -0.027777777777777776 -0.16666666666666666)) (fma 0.16666666666666666 (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.01) {
tmp = (x * (x * x)) * fma((y * y), -0.027777777777777776, -0.16666666666666666);
} else {
tmp = fma(0.16666666666666666, (x * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.01) tmp = Float64(Float64(x * Float64(x * x)) * fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666)); else tmp = fma(0.16666666666666666, Float64(x * Float64(y * y)), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.01], N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.01:\\
\;\;\;\;\left(x \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0100000000000000002Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-rgt-identityN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
Simplified93.6%
Taylor expanded in x around 0
lower-*.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Simplified26.6%
Taylor expanded in y around 0
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6426.6
Simplified26.6%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6426.6
Simplified26.6%
if -0.0100000000000000002 < (sin.f64 x) 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
Simplified91.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified65.8%
Taylor expanded in y around 0
Simplified57.4%
Final simplification49.3%
(FPCore (x y) :precision binary64 (* -0.16666666666666666 (* x (* x x))))
double code(double x, double y) {
return -0.16666666666666666 * (x * (x * x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (-0.16666666666666666d0) * (x * (x * x))
end function
public static double code(double x, double y) {
return -0.16666666666666666 * (x * (x * x));
}
def code(x, y): return -0.16666666666666666 * (x * (x * x))
function code(x, y) return Float64(-0.16666666666666666 * Float64(x * Float64(x * x))) end
function tmp = code(x, y) tmp = -0.16666666666666666 * (x * (x * x)); end
code[x_, y_] := N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.16666666666666666 \cdot \left(x \cdot \left(x \cdot x\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6447.0
Simplified47.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6434.1
Simplified34.1%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.4
Simplified12.4%
herbie shell --seed 2024208
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))