
(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 23 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) (/ (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
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(if (<= t_0 2.0)
(*
(sin x)
(fma
(* y y)
(fma y (* y 0.008333333333333333) 0.16666666666666666)
1.0))
(/
(*
x
(fma
(* y (* y y))
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
y))
y)))))
double code(double x, double y) {
double t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = fma(x, (-0.16666666666666666 * (x * x)), x) * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else if (t_0 <= 2.0) {
tmp = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
} else {
tmp = (x * fma((y * (y * y)), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); elseif (t_0 <= 2.0) tmp = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0)); else tmp = Float64(Float64(x * fma(Float64(y * Float64(y * y)), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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[(N[(x * N[(-0.16666666666666666 * N[(x * x), $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[t$95$0, 2.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[(x * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\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}\;t\_0 \leq 2:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial 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-*.f6471.2
Simplified71.2%
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
Simplified56.2%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 2Initial 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
Simplified99.1%
if 2 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
clear-numN/A
clear-numN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified91.9%
Taylor expanded in x around 0
lower-/.f64N/A
Simplified62.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(if (<= t_0 2.0)
(* (sin x) (fma 0.16666666666666666 (* y y) 1.0))
(/
(*
x
(fma
(* y (* y y))
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
y))
y)))))
double code(double x, double y) {
double t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = fma(x, (-0.16666666666666666 * (x * x)), x) * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else if (t_0 <= 2.0) {
tmp = sin(x) * fma(0.16666666666666666, (y * y), 1.0);
} else {
tmp = (x * fma((y * (y * y)), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); elseif (t_0 <= 2.0) tmp = Float64(sin(x) * fma(0.16666666666666666, Float64(y * y), 1.0)); else tmp = Float64(Float64(x * fma(Float64(y * Float64(y * y)), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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[(N[(x * N[(-0.16666666666666666 * N[(x * x), $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[t$95$0, 2.0], N[(N[Sin[x], $MachinePrecision] * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\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}\;t\_0 \leq 2:\\
\;\;\;\;\sin x \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial 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-*.f6471.2
Simplified71.2%
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
Simplified56.2%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 2Initial 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.7
Simplified98.7%
if 2 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
clear-numN/A
clear-numN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified91.9%
Taylor expanded in x around 0
lower-/.f64N/A
Simplified62.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sin x) (/ (sinh y) y))))
(if (<= t_0 (- INFINITY))
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(fma (* y y) (fma (* y y) 0.008333333333333333 0.16666666666666666) 1.0))
(if (<= t_0 2.0)
(sin x)
(/
(*
x
(fma
(* y (* y y))
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
y))
y)))))
double code(double x, double y) {
double t_0 = sin(x) * (sinh(y) / y);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = fma(x, (-0.16666666666666666 * (x * x)), x) * fma((y * y), fma((y * y), 0.008333333333333333, 0.16666666666666666), 1.0);
} else if (t_0 <= 2.0) {
tmp = sin(x);
} else {
tmp = (x * fma((y * (y * y)), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); elseif (t_0 <= 2.0) tmp = sin(x); else tmp = Float64(Float64(x * fma(Float64(y * Float64(y * y)), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 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[(N[(x * N[(-0.16666666666666666 * N[(x * x), $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[t$95$0, 2.0], N[Sin[x], $MachinePrecision], N[(N[(x * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \frac{\sinh y}{y}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\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}\;t\_0 \leq 2:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -inf.0Initial 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-*.f6471.2
Simplified71.2%
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
Simplified56.2%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 2Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6498.4
Simplified98.4%
if 2 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
clear-numN/A
clear-numN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified91.9%
Taylor expanded in x around 0
lower-/.f64N/A
Simplified62.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)))
(if (<= (* (sin x) t_0) 2.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) <= 2.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) <= 2.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], 2.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 2:\\
\;\;\;\;\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)) < 2Initial 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.4%
if 2 < (*.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-*.f6467.6
Simplified67.6%
Final simplification87.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (fma (* y y) 0.0001984126984126984 0.008333333333333333)))
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
(fma y (* y (fma (* y y) t_0 0.16666666666666666)) 1.0)
(fma x (* -0.16666666666666666 (* x x)) x))
(/ (* x (fma (* y (* y y)) (fma y (* y t_0) 0.16666666666666666) y)) y))))
double code(double x, double y) {
double t_0 = fma((y * y), 0.0001984126984126984, 0.008333333333333333);
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.05) {
tmp = fma(y, (y * fma((y * y), t_0, 0.16666666666666666)), 1.0) * fma(x, (-0.16666666666666666 * (x * x)), x);
} else {
tmp = (x * fma((y * (y * y)), fma(y, (y * t_0), 0.16666666666666666), y)) / y;
}
return tmp;
}
function code(x, y) t_0 = fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.05) tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), t_0, 0.16666666666666666)), 1.0) * fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x)); else tmp = Float64(Float64(x * fma(Float64(y * Float64(y * y)), fma(y, Float64(y * t_0), 0.16666666666666666), y)) / 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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.05], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * t$95$0 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * t$95$0), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right)\\
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.05:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, t\_0, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot t\_0, 0.16666666666666666\right), y\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.050000000000000003Initial 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.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.2
Simplified63.2%
if 0.050000000000000003 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
clear-numN/A
clear-numN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified94.3%
Taylor expanded in x around 0
lower-/.f64N/A
Simplified44.3%
Final simplification55.7%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
(fma x (* -0.16666666666666666 (* x x)) 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))
x
x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.05) {
tmp = fma(x, (-0.16666666666666666 * (x * x)), 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)), x, x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.05) tmp = Float64(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), 1.0)); else tmp = fma(Float64(Float64(y * y) * fma(y, Float64(y * fma(Float64(y * 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.05], N[(N[(x * N[(-0.16666666666666666 * N[(x * x), $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[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $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.05:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\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}:\\
\;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 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)) < 0.050000000000000003Initial 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-*.f6467.7
Simplified67.7%
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
Simplified62.4%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
Applied egg-rr42.4%
Final simplification54.5%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
x
(*
(fma -0.16666666666666666 (* x x) 1.0)
(fma y (* y 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.05) {
tmp = x * (fma(-0.16666666666666666, (x * x), 1.0) * fma(y, (y * 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.05) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * fma(y, Float64(y * 0.16666666666666666), 1.0))); else tmp = fma(Float64(Float64(y * y) * fma(y, Float64(y * fma(Float64(y * 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.05], N[(x * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $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.05:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 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)) < 0.050000000000000003Initial 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-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified56.2%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
Applied egg-rr42.4%
Final simplification50.7%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
x
(*
(fma -0.16666666666666666 (* x x) 1.0)
(fma y (* y 0.16666666666666666) 1.0)))
(fma
(* x y)
(*
y
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666))
x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.05) {
tmp = x * (fma(-0.16666666666666666, (x * x), 1.0) * fma(y, (y * 0.16666666666666666), 1.0));
} else {
tmp = fma((x * y), (y * fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.05) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * fma(y, Float64(y * 0.16666666666666666), 1.0))); else tmp = fma(Float64(x * y), Float64(y * fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 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.05], N[(x * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] * N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.05:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot y, y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.050000000000000003Initial 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-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified56.2%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
Applied egg-rr41.5%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
x
(*
(fma -0.16666666666666666 (* x x) 1.0)
(fma y (* y 0.16666666666666666) 1.0)))
(fma (* y (* y (* (* y y) 0.0001984126984126984))) (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.05) {
tmp = x * (fma(-0.16666666666666666, (x * x), 1.0) * fma(y, (y * 0.16666666666666666), 1.0));
} else {
tmp = fma((y * (y * ((y * y) * 0.0001984126984126984))), (x * (y * y)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.05) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * fma(y, Float64(y * 0.16666666666666666), 1.0))); 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[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 0.05], N[(x * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $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 \cdot \frac{\sinh y}{y} \leq 0.05:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\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 (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.050000000000000003Initial 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-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified56.2%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
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-*.f6439.6
Simplified39.6%
(FPCore (x y)
:precision binary64
(if (<= (* (sin x) (/ (sinh y) y)) 0.05)
(*
x
(*
(fma -0.16666666666666666 (* x x) 1.0)
(fma y (* y 0.16666666666666666) 1.0)))
(fma
y
(* y (* x (fma (* y y) 0.008333333333333333 0.16666666666666666)))
x)))
double code(double x, double y) {
double tmp;
if ((sin(x) * (sinh(y) / y)) <= 0.05) {
tmp = x * (fma(-0.16666666666666666, (x * x), 1.0) * fma(y, (y * 0.16666666666666666), 1.0));
} else {
tmp = fma(y, (y * (x * fma((y * y), 0.008333333333333333, 0.16666666666666666))), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(sin(x) * Float64(sinh(y) / y)) <= 0.05) tmp = Float64(x * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * fma(y, Float64(y * 0.16666666666666666), 1.0))); else tmp = fma(y, Float64(y * Float64(x * fma(Float64(y * y), 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.05], N[(x * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(x * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \cdot \frac{\sinh y}{y} \leq 0.05:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \left(x \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right)\right), x\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 0.050000000000000003Initial 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-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified56.2%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6430.5
Simplified30.5%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.02)
(* x (* (* x x) (fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= (sin x) 0.19)
(fma 0.16666666666666666 (* x (* y y)) x)
(fma (* x x) (* x (* x (* x 0.008333333333333333))) x))))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.02) {
tmp = x * ((x * x) * fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (sin(x) <= 0.19) {
tmp = fma(0.16666666666666666, (x * (y * y)), x);
} else {
tmp = fma((x * x), (x * (x * (x * 0.008333333333333333))), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.02) tmp = Float64(x * Float64(Float64(x * x) * fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (sin(x) <= 0.19) tmp = fma(0.16666666666666666, Float64(x * Float64(y * y)), x); else tmp = fma(Float64(x * x), Float64(x * Float64(x * Float64(x * 0.008333333333333333))), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.02], N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[x], $MachinePrecision], 0.19], N[(0.16666666666666666 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * N[(x * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.02:\\
\;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;\sin x \leq 0.19:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, x \cdot \left(y \cdot y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot x, x \cdot \left(x \cdot \left(x \cdot 0.008333333333333333\right)\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0200000000000000004Initial 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-*.f6477.1
Simplified77.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified15.7%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/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-*.f6414.7
Simplified14.7%
if -0.0200000000000000004 < (sin.f64 x) < 0.19Initial 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
Simplified90.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified84.0%
Taylor expanded in y around 0
Simplified69.3%
if 0.19 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6444.7
Simplified44.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6423.9
Simplified23.9%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.9
Simplified23.9%
Final simplification44.6%
(FPCore (x y) :precision binary64 (if (<= (* (sin x) (/ (sinh y) y)) 0.05) (fma x (* -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.05) {
tmp = fma(x, (-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.05) tmp = fma(x, Float64(-0.16666666666666666 * Float64(x * 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.05], N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $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.05:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\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.050000000000000003Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6466.2
Simplified66.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.7
Simplified47.7%
if 0.050000000000000003 < (*.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
Simplified91.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified39.6%
Taylor expanded in y around 0
Simplified26.4%
(FPCore (x y)
:precision binary64
(if (<= (sin x) 0.05)
(*
(fma -0.16666666666666666 (* x (* x x)) x)
(/
(fma
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
(* y (* y y))
y)
y))
(fma (* y (* y (* (* y y) 0.0001984126984126984))) (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= 0.05) {
tmp = fma(-0.16666666666666666, (x * (x * x)), x) * (fma(fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), (y * (y * y)), y) / y);
} 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.05) tmp = Float64(fma(-0.16666666666666666, Float64(x * Float64(x * x)), x) * Float64(fma(fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), Float64(y * Float64(y * y)), y) / y)); 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.05], N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / y), $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.05:\\
\;\;\;\;\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 y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{y}\\
\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.050000000000000003Initial 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-*.f6473.3
Simplified73.3%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
*-lft-identityN/A
lower-fma.f64N/A
Simplified69.0%
if 0.050000000000000003 < (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
Simplified94.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified24.4%
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-*.f6424.4
Simplified24.4%
(FPCore (x y)
:precision binary64
(if (<= (sin x) 0.05)
(*
(fma
y
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
1.0)
(fma x (* -0.16666666666666666 (* x x)) x))
(fma (* y (* y (* (* y y) 0.0001984126984126984))) (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= 0.05) {
tmp = fma(y, (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(x, (-0.16666666666666666 * (x * x)), x);
} 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.05) tmp = Float64(fma(y, Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x)); 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.05], 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[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $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.05:\\
\;\;\;\;\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, -0.16666666666666666 \cdot \left(x \cdot x\right), x\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.050000000000000003Initial 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.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.9
Simplified66.9%
if 0.050000000000000003 < (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
Simplified94.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified24.4%
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-*.f6424.4
Simplified24.4%
Final simplification55.3%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(sin x)
(fma
(* y y)
(fma y (* y 0.008333333333333333) 0.16666666666666666)
1.0))))
(if (<= y 0.165)
t_0
(if (<= y 3.8e+77)
(/ (* (sinh y) (fma x (* -0.16666666666666666 (* x x)) x)) y)
t_0))))
double code(double x, double y) {
double t_0 = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
double tmp;
if (y <= 0.165) {
tmp = t_0;
} else if (y <= 3.8e+77) {
tmp = (sinh(y) * fma(x, (-0.16666666666666666 * (x * x)), x)) / y;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0)) tmp = 0.0 if (y <= 0.165) tmp = t_0; elseif (y <= 3.8e+77) tmp = Float64(Float64(sinh(y) * fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x)) / y); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$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]}, If[LessEqual[y, 0.165], t$95$0, If[LessEqual[y, 3.8e+77], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{if}\;y \leq 0.165:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.165000000000000008 or 3.8000000000000001e77 < 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
Simplified93.2%
if 0.165000000000000008 < y < 3.8000000000000001e77Initial program 99.8%
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-*.f6481.1
Simplified81.1%
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-sinh.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6481.3
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6481.3
Applied egg-rr81.3%
Final simplification92.4%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(sin x)
(fma
(* y y)
(fma y (* y 0.008333333333333333) 0.16666666666666666)
1.0))))
(if (<= y 0.165)
t_0
(if (<= y 3.8e+77)
(* (/ (sinh y) y) (fma -0.16666666666666666 (* x (* x x)) x))
t_0))))
double code(double x, double y) {
double t_0 = sin(x) * fma((y * y), fma(y, (y * 0.008333333333333333), 0.16666666666666666), 1.0);
double tmp;
if (y <= 0.165) {
tmp = t_0;
} else if (y <= 3.8e+77) {
tmp = (sinh(y) / y) * fma(-0.16666666666666666, (x * (x * x)), x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(sin(x) * fma(Float64(y * y), fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), 1.0)) tmp = 0.0 if (y <= 0.165) tmp = t_0; elseif (y <= 3.8e+77) tmp = Float64(Float64(sinh(y) / y) * fma(-0.16666666666666666, Float64(x * Float64(x * x)), x)); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$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]}, If[LessEqual[y, 0.165], t$95$0, If[LessEqual[y, 3.8e+77], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin x \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\mathbf{if}\;y \leq 0.165:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.165000000000000008 or 3.8000000000000001e77 < 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
Simplified93.2%
if 0.165000000000000008 < y < 3.8000000000000001e77Initial program 99.8%
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-*.f6481.1
Simplified81.1%
Final simplification92.4%
(FPCore (x y)
:precision binary64
(if (<= x 1e-33)
(* (/ (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 <= 1e-33) {
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 <= 1e-33) 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, 1e-33], 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 10^{-33}:\\
\;\;\;\;\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.0000000000000001e-33Initial 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-*.f6473.5
Simplified73.5%
if 1.0000000000000001e-33 < 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
Simplified95.9%
Final simplification79.5%
(FPCore (x y)
:precision binary64
(if (<= (sin x) -0.02)
(* x (* (* x x) (fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(fma
y
(* y (* x (fma (* y y) 0.008333333333333333 0.16666666666666666)))
x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.02) {
tmp = x * ((x * x) * fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else {
tmp = fma(y, (y * (x * fma((y * y), 0.008333333333333333, 0.16666666666666666))), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (sin(x) <= -0.02) tmp = Float64(x * Float64(Float64(x * x) * fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); else tmp = fma(y, Float64(y * Float64(x * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666))), x); end return tmp end
code[x_, y_] := If[LessEqual[N[Sin[x], $MachinePrecision], -0.02], N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(x * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin x \leq -0.02:\\
\;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \left(x \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right)\right), x\right)\\
\end{array}
\end{array}
if (sin.f64 x) < -0.0200000000000000004Initial 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-*.f6477.1
Simplified77.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified15.7%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/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-*.f6414.7
Simplified14.7%
if -0.0200000000000000004 < (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
Simplified92.0%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified63.7%
Taylor expanded in y around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6457.4
Simplified57.4%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.02) (* 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.02) {
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.02) tmp = Float64(x * Float64(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.02], N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -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 \leq -0.02:\\
\;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot \mathsf{fma}\left(y \cdot y, -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 (sin.f64 x) < -0.0200000000000000004Initial 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-*.f6477.1
Simplified77.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified15.7%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/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-*.f6414.7
Simplified14.7%
if -0.0200000000000000004 < (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
Simplified92.0%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified63.7%
Taylor expanded in y around 0
Simplified53.1%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.02) (* -0.16666666666666666 (* x (* x x))) (fma 0.16666666666666666 (* x (* y y)) x)))
double code(double x, double y) {
double tmp;
if (sin(x) <= -0.02) {
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 (sin(x) <= -0.02) 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[Sin[x], $MachinePrecision], -0.02], 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 \leq -0.02:\\
\;\;\;\;-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 (sin.f64 x) < -0.0200000000000000004Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6457.4
Simplified57.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.4
Simplified12.4%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6411.4
Simplified11.4%
if -0.0200000000000000004 < (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
Simplified92.0%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified63.7%
Taylor expanded in y around 0
Simplified53.1%
(FPCore (x y) :precision binary64 (if (<= (sin x) -0.02) (* -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.02) {
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.02) 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.02], 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.02:\\
\;\;\;\;-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.0200000000000000004Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6457.4
Simplified57.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.4
Simplified12.4%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6411.4
Simplified11.4%
if -0.0200000000000000004 < (sin.f64 x) Initial 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-*.f6471.5
Simplified71.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt1-inN/A
+-commutativeN/A
Simplified56.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6452.6
Simplified52.6%
(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.f6452.4
Simplified52.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.7
Simplified35.7%
Taylor expanded in x around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6410.9
Simplified10.9%
herbie shell --seed 2024207
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))