
(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 20 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}
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* t_0 (sin x_m))))
(*
x_s
(if (<= t_1 (- INFINITY))
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(if (<= t_1 1.0)
(*
(fma
(fma 0.008333333333333333 (* y y) 0.16666666666666666)
(* y y)
1.0)
(sin x_m))
(* (* 1.0 x_m) t_0))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double t_0 = sinh(y) / y;
double t_1 = t_0 * sin(x_m);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else if (t_1 <= 1.0) {
tmp = fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0) * sin(x_m);
} else {
tmp = (1.0 * x_m) * t_0;
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(t_0 * sin(x_m)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); elseif (t_1 <= 1.0) tmp = Float64(fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * sin(x_m)); else tmp = Float64(Float64(1.0 * x_m) * t_0); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.0], N[(N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := t\_0 \cdot \sin x\_m\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{elif}\;t\_1 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \sin x\_m\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot t\_0\\
\end{array}
\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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in y around inf
Applied rewrites56.7%
Taylor expanded in x around inf
Applied rewrites16.0%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6474.6
Applied rewrites74.6%
Taylor expanded in x around 0
Applied rewrites74.6%
Final simplification75.1%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(let* ((t_0 (/ (sinh y) y)) (t_1 (* t_0 (sin x_m))))
(*
x_s
(if (<= t_1 (- INFINITY))
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(if (<= t_1 1.0)
(* (fma (* y y) 0.16666666666666666 1.0) (sin x_m))
(* (* 1.0 x_m) t_0))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double t_0 = sinh(y) / y;
double t_1 = t_0 * sin(x_m);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else if (t_1 <= 1.0) {
tmp = fma((y * y), 0.16666666666666666, 1.0) * sin(x_m);
} else {
tmp = (1.0 * x_m) * t_0;
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) t_0 = Float64(sinh(y) / y) t_1 = Float64(t_0 * sin(x_m)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); elseif (t_1 <= 1.0) tmp = Float64(fma(Float64(y * y), 0.16666666666666666, 1.0) * sin(x_m)); else tmp = Float64(Float64(1.0 * x_m) * t_0); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.0], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y}\\
t_1 := t\_0 \cdot \sin x\_m\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{elif}\;t\_1 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \sin x\_m\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot t\_0\\
\end{array}
\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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in y around inf
Applied rewrites56.7%
Taylor expanded in x around inf
Applied rewrites16.0%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6474.6
Applied rewrites74.6%
Taylor expanded in x around 0
Applied rewrites74.6%
Final simplification75.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(let* ((t_0 (* (/ (sinh y) y) (sin x_m))))
(*
x_s
(if (<= t_0 (- INFINITY))
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(if (<= t_0 1.0)
(* (fma (* y y) 0.16666666666666666 1.0) (sin x_m))
(*
(/
(*
(fma
(fma (* 0.0001984126984126984 (* y y)) (* y y) 0.16666666666666666)
(* y y)
1.0)
y)
y)
(* 1.0 x_m)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double t_0 = (sinh(y) / y) * sin(x_m);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else if (t_0 <= 1.0) {
tmp = fma((y * y), 0.16666666666666666, 1.0) * sin(x_m);
} else {
tmp = ((fma(fma((0.0001984126984126984 * (y * y)), (y * y), 0.16666666666666666), (y * y), 1.0) * y) / y) * (1.0 * x_m);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) t_0 = Float64(Float64(sinh(y) / y) * sin(x_m)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); elseif (t_0 <= 1.0) tmp = Float64(fma(Float64(y * y), 0.16666666666666666, 1.0) * sin(x_m)); else tmp = Float64(Float64(Float64(fma(fma(Float64(0.0001984126984126984 * Float64(y * y)), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y) / y) * Float64(1.0 * x_m)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y} \cdot \sin x\_m\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right) \cdot \sin x\_m\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984 \cdot \left(y \cdot y\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{y} \cdot \left(1 \cdot x\_m\right)\\
\end{array}
\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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in y around inf
Applied rewrites56.7%
Taylor expanded in x around inf
Applied rewrites16.0%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6474.6
Applied rewrites74.6%
Taylor expanded in x around 0
Applied rewrites74.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around inf
Applied rewrites67.0%
Final simplification73.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(let* ((t_0 (* (/ (sinh y) y) (sin x_m))))
(*
x_s
(if (<= t_0 (- INFINITY))
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(if (<= t_0 1.0)
(sin x_m)
(*
(/
(*
(fma
(fma (* 0.0001984126984126984 (* y y)) (* y y) 0.16666666666666666)
(* y y)
1.0)
y)
y)
(* 1.0 x_m)))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double t_0 = (sinh(y) / y) * sin(x_m);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else if (t_0 <= 1.0) {
tmp = sin(x_m);
} else {
tmp = ((fma(fma((0.0001984126984126984 * (y * y)), (y * y), 0.16666666666666666), (y * y), 1.0) * y) / y) * (1.0 * x_m);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) t_0 = Float64(Float64(sinh(y) / y) * sin(x_m)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); elseif (t_0 <= 1.0) tmp = sin(x_m); else tmp = Float64(Float64(Float64(fma(fma(Float64(0.0001984126984126984 * Float64(y * y)), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y) / y) * Float64(1.0 * x_m)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[Sin[x$95$m], $MachinePrecision], N[(N[(N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y}{y} \cdot \sin x\_m\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin x\_m\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984 \cdot \left(y \cdot y\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{y} \cdot \left(1 \cdot x\_m\right)\\
\end{array}
\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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in y around inf
Applied rewrites56.7%
Taylor expanded in x around inf
Applied rewrites16.0%
if -inf.0 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 1Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6499.2
Applied rewrites99.2%
if 1 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6474.6
Applied rewrites74.6%
Taylor expanded in x around 0
Applied rewrites74.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around inf
Applied rewrites67.0%
Final simplification72.8%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) 1e-7)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (* y y) 0.16666666666666666 1.0))
(*
(/
(*
(fma
(fma (* 0.0001984126984126984 (* y y)) (* y y) 0.16666666666666666)
(* y y)
1.0)
y)
y)
(* 1.0 x_m)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= 1e-7) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
} else {
tmp = ((fma(fma((0.0001984126984126984 * (y * y)), (y * y), 0.16666666666666666), (y * y), 1.0) * y) / y) * (1.0 * x_m);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= 1e-7) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); else tmp = Float64(Float64(Float64(fma(fma(Float64(0.0001984126984126984 * Float64(y * y)), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y) / y) * Float64(1.0 * x_m)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq 10^{-7}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984 \cdot \left(y \cdot y\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{y} \cdot \left(1 \cdot x\_m\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6488.9
Applied rewrites88.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6467.4
Applied rewrites67.4%
if 9.9999999999999995e-8 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.6
Applied rewrites56.6%
Taylor expanded in x around 0
Applied rewrites56.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.0
Applied rewrites51.0%
Taylor expanded in y around inf
Applied rewrites51.0%
Final simplification62.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) 1e-7)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (* y y) 0.16666666666666666 1.0))
(/
(*
(*
(fma (fma 0.008333333333333333 (* y y) 0.16666666666666666) (* y y) 1.0)
y)
(* 1.0 x_m))
y))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= 1e-7) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
} else {
tmp = ((fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0) * y) * (1.0 * x_m)) / y;
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= 1e-7) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); else tmp = Float64(Float64(Float64(fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y) * Float64(1.0 * x_m)) / y); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq 10^{-7}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\right) \cdot \left(1 \cdot x\_m\right)}{y}\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6488.9
Applied rewrites88.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6467.4
Applied rewrites67.4%
if 9.9999999999999995e-8 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.6
Applied rewrites56.6%
Taylor expanded in x around 0
Applied rewrites56.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.0
Applied rewrites51.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6451.0
Applied rewrites51.0%
Final simplification62.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) 1e-7)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (* y y) 0.16666666666666666 1.0))
(*
(/ (* (fma (* 0.008333333333333333 (* y y)) (* y y) 1.0) y) y)
(* 1.0 x_m)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= 1e-7) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
} else {
tmp = ((fma((0.008333333333333333 * (y * y)), (y * y), 1.0) * y) / y) * (1.0 * x_m);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= 1e-7) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); else tmp = Float64(Float64(Float64(fma(Float64(0.008333333333333333 * Float64(y * y)), Float64(y * y), 1.0) * y) / y) * Float64(1.0 * x_m)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq 10^{-7}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(0.008333333333333333 \cdot \left(y \cdot y\right), y \cdot y, 1\right) \cdot y}{y} \cdot \left(1 \cdot x\_m\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6488.9
Applied rewrites88.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6467.4
Applied rewrites67.4%
if 9.9999999999999995e-8 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6456.6
Applied rewrites56.6%
Taylor expanded in x around 0
Applied rewrites56.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.0
Applied rewrites51.0%
Taylor expanded in y around inf
Applied rewrites51.0%
Final simplification62.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) 1e-7)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (* y y) 0.16666666666666666 1.0))
(*
(* 1.0 x_m)
(fma
(fma 0.008333333333333333 (* y y) 0.16666666666666666)
(* y y)
1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= 1e-7) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
} else {
tmp = (1.0 * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= 1e-7) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); else tmp = Float64(Float64(1.0 * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq 10^{-7}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6488.9
Applied rewrites88.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6467.4
Applied rewrites67.4%
if 9.9999999999999995e-8 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.1
Applied rewrites85.1%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6450.7
Applied rewrites50.7%
Taylor expanded in x around 0
Applied rewrites48.7%
Final simplification61.3%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) -0.2)
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(*
(* 1.0 x_m)
(fma
(fma 0.008333333333333333 (* y y) 0.16666666666666666)
(* y y)
1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= -0.2) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else {
tmp = (1.0 * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= -0.2) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); else tmp = Float64(Float64(1.0 * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], -0.2], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq -0.2:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.20000000000000001Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6438.7
Applied rewrites38.7%
Taylor expanded in y around inf
Applied rewrites38.6%
Taylor expanded in x around inf
Applied rewrites11.4%
if -0.20000000000000001 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6492.7
Applied rewrites92.7%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6473.5
Applied rewrites73.5%
Taylor expanded in x around 0
Applied rewrites72.5%
Final simplification52.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) -0.2)
(*
(* (* y y) 0.16666666666666666)
(* (* (* x_m x_m) -0.16666666666666666) x_m))
(* (* 1.0 x_m) (fma (* y y) 0.16666666666666666 1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= -0.2) {
tmp = ((y * y) * 0.16666666666666666) * (((x_m * x_m) * -0.16666666666666666) * x_m);
} else {
tmp = (1.0 * x_m) * fma((y * y), 0.16666666666666666, 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= -0.2) tmp = Float64(Float64(Float64(y * y) * 0.16666666666666666) * Float64(Float64(Float64(x_m * x_m) * -0.16666666666666666) * x_m)); else tmp = Float64(Float64(1.0 * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], -0.2], N[(N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] * N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq -0.2:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot 0.16666666666666666\right) \cdot \left(\left(\left(x\_m \cdot x\_m\right) \cdot -0.16666666666666666\right) \cdot x\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < -0.20000000000000001Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6477.6
Applied rewrites77.6%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6438.7
Applied rewrites38.7%
Taylor expanded in y around inf
Applied rewrites38.6%
Taylor expanded in x around inf
Applied rewrites11.4%
if -0.20000000000000001 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6482.6
Applied rewrites82.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.8
Applied rewrites66.8%
Taylor expanded in x around 0
Applied rewrites64.8%
Final simplification47.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) -0.05)
(* (* (* x_m x_m) x_m) -0.16666666666666666)
(* (* 1.0 x_m) (fma (* y y) 0.16666666666666666 1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= -0.05) {
tmp = ((x_m * x_m) * x_m) * -0.16666666666666666;
} else {
tmp = (1.0 * x_m) * fma((y * y), 0.16666666666666666, 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= -0.05) tmp = Float64(Float64(Float64(x_m * x_m) * x_m) * -0.16666666666666666); else tmp = Float64(Float64(1.0 * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], -0.05], N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq -0.05:\\
\;\;\;\;\left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\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.f6436.9
Applied rewrites36.9%
Taylor expanded in x around 0
Applied rewrites9.5%
Taylor expanded in x around inf
Applied rewrites9.2%
if -0.050000000000000003 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6482.2
Applied rewrites82.2%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6468.3
Applied rewrites68.3%
Taylor expanded in x around 0
Applied rewrites66.2%
Final simplification46.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) 1e-7)
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(* (* 1.0 x_m) (* (* y y) 0.16666666666666666)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= 1e-7) {
tmp = fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m;
} else {
tmp = (1.0 * x_m) * ((y * y) * 0.16666666666666666);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= 1e-7) tmp = Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m); else tmp = Float64(Float64(1.0 * x_m) * Float64(Float64(y * y) * 0.16666666666666666)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], 1e-7], N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(1.0 * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\\
\mathbf{else}:\\
\;\;\;\;\left(1 \cdot x\_m\right) \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6467.1
Applied rewrites67.1%
Taylor expanded in x around 0
Applied rewrites52.9%
if 9.9999999999999995e-8 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6464.6
Applied rewrites64.6%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6438.2
Applied rewrites38.2%
Taylor expanded in y around inf
Applied rewrites38.1%
Taylor expanded in x around 0
Applied rewrites32.9%
Final simplification46.4%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (* (/ (sinh y) y) (sin x_m)) -0.05)
(* (* (* x_m x_m) x_m) -0.16666666666666666)
(* 1.0 x_m))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (((sinh(y) / y) * sin(x_m)) <= -0.05) {
tmp = ((x_m * x_m) * x_m) * -0.16666666666666666;
} else {
tmp = 1.0 * x_m;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8) :: tmp
if (((sinh(y) / y) * sin(x_m)) <= (-0.05d0)) then
tmp = ((x_m * x_m) * x_m) * (-0.16666666666666666d0)
else
tmp = 1.0d0 * x_m
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y) {
double tmp;
if (((Math.sinh(y) / y) * Math.sin(x_m)) <= -0.05) {
tmp = ((x_m * x_m) * x_m) * -0.16666666666666666;
} else {
tmp = 1.0 * x_m;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y): tmp = 0 if ((math.sinh(y) / y) * math.sin(x_m)) <= -0.05: tmp = ((x_m * x_m) * x_m) * -0.16666666666666666 else: tmp = 1.0 * x_m return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (Float64(Float64(sinh(y) / y) * sin(x_m)) <= -0.05) tmp = Float64(Float64(Float64(x_m * x_m) * x_m) * -0.16666666666666666); else tmp = Float64(1.0 * x_m); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y) tmp = 0.0; if (((sinh(y) / y) * sin(x_m)) <= -0.05) tmp = ((x_m * x_m) * x_m) * -0.16666666666666666; else tmp = 1.0 * x_m; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision], -0.05], N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], N[(1.0 * x$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y}{y} \cdot \sin x\_m \leq -0.05:\\
\;\;\;\;\left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\_m\\
\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.f6436.9
Applied rewrites36.9%
Taylor expanded in x around 0
Applied rewrites9.5%
Taylor expanded in x around inf
Applied rewrites9.2%
if -0.050000000000000003 < (*.f64 (sin.f64 x) (/.f64 (sinh.f64 y) y)) Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6463.0
Applied rewrites63.0%
Taylor expanded in x around 0
Applied rewrites59.2%
Taylor expanded in x around 0
Applied rewrites50.7%
Final simplification36.3%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y) :precision binary64 (* x_s (* (/ (sinh y) y) (sin x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
return x_s * ((sinh(y) / y) * sin(x_m));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
code = x_s * ((sinh(y) / y) * sin(x_m))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y) {
return x_s * ((Math.sinh(y) / y) * Math.sin(x_m));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y): return x_s * ((math.sinh(y) / y) * math.sin(x_m))
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) return Float64(x_s * Float64(Float64(sinh(y) / y) * sin(x_m))) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y) tmp = x_s * ((sinh(y) / y) * sin(x_m)); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[Sin[x$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(\frac{\sinh y}{y} \cdot \sin x\_m\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (sin x_m) 1e-7)
(*
(/
(*
(fma
(fma
(fma 0.0001984126984126984 (* y y) 0.008333333333333333)
(* y y)
0.16666666666666666)
(* y y)
1.0)
y)
y)
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m))
(*
(* (* (* (* (* x_m x_m) x_m) x_m) 0.008333333333333333) x_m)
(fma
(fma 0.008333333333333333 (* y y) 0.16666666666666666)
(* y y)
1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (sin(x_m) <= 1e-7) {
tmp = ((fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0) * y) / y) * (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m);
} else {
tmp = (((((x_m * x_m) * x_m) * x_m) * 0.008333333333333333) * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (sin(x_m) <= 1e-7) tmp = Float64(Float64(Float64(fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * y) / y) * Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m)); else tmp = Float64(Float64(Float64(Float64(Float64(Float64(x_m * x_m) * x_m) * x_m) * 0.008333333333333333) * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 1e-7], N[(N[(N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision] * N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\sin x\_m \leq 10^{-7}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y}{y} \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\right) \cdot 0.008333333333333333\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6477.1
Applied rewrites77.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6474.8
Applied rewrites74.8%
if 9.9999999999999995e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.6
Applied rewrites85.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6431.0
Applied rewrites31.0%
Taylor expanded in x around inf
Applied rewrites31.0%
Final simplification65.7%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (sin x_m) 1e-7)
(*
(fma
(fma
(fma 0.0001984126984126984 (* y y) 0.008333333333333333)
(* y y)
0.16666666666666666)
(* y y)
1.0)
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m))
(*
(* (* (* (* (* x_m x_m) x_m) x_m) 0.008333333333333333) x_m)
(fma
(fma 0.008333333333333333 (* y y) 0.16666666666666666)
(* y y)
1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (sin(x_m) <= 1e-7) {
tmp = fma(fma(fma(0.0001984126984126984, (y * y), 0.008333333333333333), (y * y), 0.16666666666666666), (y * y), 1.0) * (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m);
} else {
tmp = (((((x_m * x_m) * x_m) * x_m) * 0.008333333333333333) * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (sin(x_m) <= 1e-7) tmp = Float64(fma(fma(fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333), Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0) * Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m)); else tmp = Float64(Float64(Float64(Float64(Float64(Float64(x_m * x_m) * x_m) * x_m) * 0.008333333333333333) * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 1e-7], N[(N[(N[(N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\sin x\_m \leq 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right) \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\right) \cdot 0.008333333333333333\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6496.7
Applied rewrites96.7%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6473.8
Applied rewrites73.8%
if 9.9999999999999995e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.6
Applied rewrites85.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6431.0
Applied rewrites31.0%
Taylor expanded in x around inf
Applied rewrites31.0%
Final simplification65.0%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (sin x_m) 4e-11)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (fma 0.008333333333333333 (* y y) 0.16666666666666666) (* y y) 1.0))
(*
(*
(fma
(fma (* x_m x_m) 0.008333333333333333 -0.16666666666666666)
(* x_m x_m)
1.0)
x_m)
(fma (* y y) 0.16666666666666666 1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (sin(x_m) <= 4e-11) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
} else {
tmp = (fma(fma((x_m * x_m), 0.008333333333333333, -0.16666666666666666), (x_m * x_m), 1.0) * x_m) * fma((y * y), 0.16666666666666666, 1.0);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (sin(x_m) <= 4e-11) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); else tmp = Float64(Float64(fma(fma(Float64(x_m * x_m), 0.008333333333333333, -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m) * fma(Float64(y * y), 0.16666666666666666, 1.0)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 4e-11], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\sin x\_m \leq 4 \cdot 10^{-11}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(y \cdot y, 0.16666666666666666, 1\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 3.99999999999999976e-11Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6492.9
Applied rewrites92.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.8
Applied rewrites71.8%
if 3.99999999999999976e-11 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6473.5
Applied rewrites73.5%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6430.5
Applied rewrites30.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y)
:precision binary64
(*
x_s
(if (<= (sin x_m) 1e-7)
(*
(* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)
(fma (fma 0.008333333333333333 (* y y) 0.16666666666666666) (* y y) 1.0))
(*
(*
(fma
(fma (* x_m x_m) 0.008333333333333333 -0.16666666666666666)
(* x_m x_m)
1.0)
x_m)
(* (* y y) 0.16666666666666666)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
double tmp;
if (sin(x_m) <= 1e-7) {
tmp = (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m) * fma(fma(0.008333333333333333, (y * y), 0.16666666666666666), (y * y), 1.0);
} else {
tmp = (fma(fma((x_m * x_m), 0.008333333333333333, -0.16666666666666666), (x_m * x_m), 1.0) * x_m) * ((y * y) * 0.16666666666666666);
}
return x_s * tmp;
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) tmp = 0.0 if (sin(x_m) <= 1e-7) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m) * fma(fma(0.008333333333333333, Float64(y * y), 0.16666666666666666), Float64(y * y), 1.0)); else tmp = Float64(Float64(fma(fma(Float64(x_m * x_m), 0.008333333333333333, -0.16666666666666666), Float64(x_m * x_m), 1.0) * x_m) * Float64(Float64(y * y) * 0.16666666666666666)); end return Float64(x_s * tmp) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * If[LessEqual[N[Sin[x$95$m], $MachinePrecision], 1e-7], N[(N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\sin x\_m \leq 10^{-7}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y \cdot y, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(x\_m \cdot x\_m, 0.008333333333333333, -0.16666666666666666\right), x\_m \cdot x\_m, 1\right) \cdot x\_m\right) \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if (sin.f64 x) < 9.9999999999999995e-8Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6492.9
Applied rewrites92.9%
Taylor expanded in x around 0
*-commutativeN/A
lft-mult-inverseN/A
distribute-rgt-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.9
Applied rewrites71.9%
if 9.9999999999999995e-8 < (sin.f64 x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6473.0
Applied rewrites73.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6429.2
Applied rewrites29.2%
Taylor expanded in y around inf
Applied rewrites29.0%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y) :precision binary64 (* x_s (* (fma -0.16666666666666666 (* x_m x_m) 1.0) x_m)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
return x_s * (fma(-0.16666666666666666, (x_m * x_m), 1.0) * x_m);
}
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) return Float64(x_s * Float64(fma(-0.16666666666666666, Float64(x_m * x_m), 1.0) * x_m)) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * N[(N[(-0.16666666666666666 * N[(x$95$m * x$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x\_m \cdot x\_m, 1\right) \cdot x\_m\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6453.9
Applied rewrites53.9%
Taylor expanded in x around 0
Applied rewrites41.9%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y) :precision binary64 (* x_s (* 1.0 x_m)))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y) {
return x_s * (1.0 * x_m);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
code = x_s * (1.0d0 * x_m)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y) {
return x_s * (1.0 * x_m);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y): return x_s * (1.0 * x_m)
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y) return Float64(x_s * Float64(1.0 * x_m)) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y) tmp = x_s * (1.0 * x_m); end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_] := N[(x$95$s * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(1 \cdot x\_m\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
lower-sin.f6453.9
Applied rewrites53.9%
Taylor expanded in x around 0
Applied rewrites41.9%
Taylor expanded in x around 0
Applied rewrites34.2%
herbie shell --seed 2024235
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))