
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 (- INFINITY))
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))
(if (<= t_0 2e-14)
(*
y_m
(*
(/ (sin x) x)
(fma
(* y_m y_m)
(fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)
1.0)))
(/ (* (sinh y_m) x) x))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
} else if (t_0 <= 2e-14) {
tmp = y_m * ((sin(x) / x) * fma((y_m * y_m), fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666), 1.0));
} else {
tmp = (sinh(y_m) * x) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m)); elseif (t_0 <= 2e-14) tmp = Float64(y_m * Float64(Float64(sin(x) / x) * fma(Float64(y_m * y_m), fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666), 1.0))); else tmp = Float64(Float64(sinh(y_m) * x) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-14], N[(y$95$m * N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * x), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;y\_m \cdot \left(\frac{\sin x}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y\_m \cdot x}{x}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2
Simplified70.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9
Simplified61.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2e-14Initial program 75.6%
Taylor expanded in y around 0
Simplified98.1%
if 2e-14 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
Simplified67.7%
Final simplification83.6%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 (- INFINITY))
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))
(if (<= t_0 2e-14) (* y_m (/ (sin x) x)) (/ (* (sinh y_m) x) x))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
} else if (t_0 <= 2e-14) {
tmp = y_m * (sin(x) / x);
} else {
tmp = (sinh(y_m) * x) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m)); elseif (t_0 <= 2e-14) tmp = Float64(y_m * Float64(sin(x) / x)); else tmp = Float64(Float64(sinh(y_m) * x) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-14], N[(y$95$m * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * x), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;y\_m \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y\_m \cdot x}{x}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2
Simplified70.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9
Simplified61.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2e-14Initial program 75.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6497.5
Simplified97.5%
if 2e-14 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
Simplified67.7%
Final simplification83.2%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (* y_m (* y_m y_m))) (t_1 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_1 (- INFINITY))
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 t_0 y_m))
(if (<= t_1 1e-29)
(* y_m (/ (sin x) x))
(/
(*
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
x)
(fma
(fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)
t_0
y_m))
x))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = y_m * (y_m * y_m);
double t_1 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, t_0, y_m);
} else if (t_1 <= 1e-29) {
tmp = y_m * (sin(x) / x);
} else {
tmp = (fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), x) * fma(fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666), t_0, y_m)) / x;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(y_m * Float64(y_m * y_m)) t_1 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, t_0, y_m)); elseif (t_1 <= 1e-29) tmp = Float64(y_m * Float64(sin(x) / x)); else tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x) * fma(fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666), t_0, y_m)) / x); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * t$95$0 + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-29], N[(y$95$m * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$0 + y$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := y\_m \cdot \left(y\_m \cdot y\_m\right)\\
t_1 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, t\_0, y\_m\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-29}:\\
\;\;\;\;y\_m \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), t\_0, y\_m\right)}{x}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6470.2
Simplified70.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9
Simplified61.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.99999999999999943e-30Initial program 75.4%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6497.5
Simplified97.5%
if 9.99999999999999943e-30 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.4
Simplified83.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.3
Simplified59.3%
Final simplification81.0%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -5e-133)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))
(if (<= t_0 2e-113)
(/ 1.0 (* (fma 0.16666666666666666 (* x x) 1.0) (/ 1.0 y_m)))
(*
y_m
(*
(fma
(* y_m y_m)
(fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)
1.0)
(fma
(* x x)
(fma x (* x 0.008333333333333333) -0.16666666666666666)
1.0))))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-133) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
} else if (t_0 <= 2e-113) {
tmp = 1.0 / (fma(0.16666666666666666, (x * x), 1.0) * (1.0 / y_m));
} else {
tmp = y_m * (fma((y_m * y_m), fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666), 1.0) * fma((x * x), fma(x, (x * 0.008333333333333333), -0.16666666666666666), 1.0));
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -5e-133) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m)); elseif (t_0 <= 2e-113) tmp = Float64(1.0 / Float64(fma(0.16666666666666666, Float64(x * x), 1.0) * Float64(1.0 / y_m))); else tmp = Float64(y_m * Float64(fma(Float64(y_m * y_m), fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666), 1.0) * fma(Float64(x * x), fma(x, Float64(x * 0.008333333333333333), -0.16666666666666666), 1.0))); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -5e-133], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-113], N[(1.0 / N[(N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(1.0 / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(x * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-133}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-113}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right) \cdot \frac{1}{y\_m}}\\
\mathbf{else}:\\
\;\;\;\;y\_m \cdot \left(\mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x, x \cdot 0.008333333333333333, -0.16666666666666666\right), 1\right)\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999999e-133Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.1
Simplified76.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.7
Simplified67.7%
if -4.9999999999999999e-133 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.99999999999999996e-113Initial program 69.2%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8
Simplified99.8%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6465.9
Applied egg-rr65.9%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6472.3
Simplified72.3%
if 1.99999999999999996e-113 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
Simplified80.3%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6462.5
Simplified62.5%
Final simplification68.3%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -5e-133)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))
(if (<= t_0 2e-14)
(/ 1.0 (* (fma 0.16666666666666666 (* x x) 1.0) (/ 1.0 y_m)))
(fma
(*
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)))
y_m
y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-133) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
} else if (t_0 <= 2e-14) {
tmp = 1.0 / (fma(0.16666666666666666, (x * x), 1.0) * (1.0 / y_m));
} else {
tmp = fma((y_m * (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -5e-133) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m)); elseif (t_0 <= 2e-14) tmp = Float64(1.0 / Float64(fma(0.16666666666666666, Float64(x * x), 1.0) * Float64(1.0 / y_m))); else tmp = fma(Float64(y_m * Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -5e-133], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-14], N[(1.0 / N[(N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(1.0 / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$95$m + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-133}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right) \cdot \frac{1}{y\_m}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right)\right), y\_m, y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999999e-133Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.1
Simplified76.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.7
Simplified67.7%
if -4.9999999999999999e-133 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2e-14Initial program 71.4%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.2
Simplified99.2%
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6467.7
Applied egg-rr67.7%
Taylor expanded in x around 0
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6473.5
Simplified73.5%
if 2e-14 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.1
Simplified83.1%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.6
Simplified55.6%
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6455.6
Applied egg-rr55.6%
Final simplification67.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -1e-254)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))
(if (<= t_0 0.0)
(* x (/ y_m x))
(fma
(*
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)))
y_m
y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -1e-254) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
} else if (t_0 <= 0.0) {
tmp = x * (y_m / x);
} else {
tmp = fma((y_m * (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -1e-254) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m)); elseif (t_0 <= 0.0) tmp = Float64(x * Float64(y_m / x)); else tmp = fma(Float64(y_m * Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-254], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$95$m + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right)\right), y\_m, y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6478.8
Simplified78.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.2
Simplified62.2%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 54.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified89.8%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.6
Simplified88.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.2
Simplified48.2%
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6448.2
Applied egg-rr48.2%
Final simplification64.9%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -1e-254)
(fma (* y_m x) (* x -0.16666666666666666) y_m)
(if (<= t_0 0.0)
(* x (/ y_m x))
(fma
(*
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)))
y_m
y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -1e-254) {
tmp = fma((y_m * x), (x * -0.16666666666666666), y_m);
} else if (t_0 <= 0.0) {
tmp = x * (y_m / x);
} else {
tmp = fma((y_m * (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -1e-254) tmp = fma(Float64(y_m * x), Float64(x * -0.16666666666666666), y_m); elseif (t_0 <= 0.0) tmp = Float64(x * Float64(y_m / x)); else tmp = fma(Float64(y_m * Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666))), y_m, y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-254], N[(N[(y$95$m * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$95$m + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot x, x \cdot -0.16666666666666666, y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right)\right), y\_m, y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
distribute-lft-inN/A
associate-*r*N/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.6
Applied egg-rr39.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 54.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified89.8%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.6
Simplified88.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.2
Simplified48.2%
associate-*r*N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6448.2
Applied egg-rr48.2%
Final simplification57.6%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -1e-254)
(fma (* y_m x) (* x -0.16666666666666666) y_m)
(if (<= t_0 0.0)
(* x (/ y_m x))
(fma (* y_m (* y_m 0.008333333333333333)) (* y_m (* y_m y_m)) y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -1e-254) {
tmp = fma((y_m * x), (x * -0.16666666666666666), y_m);
} else if (t_0 <= 0.0) {
tmp = x * (y_m / x);
} else {
tmp = fma((y_m * (y_m * 0.008333333333333333)), (y_m * (y_m * y_m)), y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -1e-254) tmp = fma(Float64(y_m * x), Float64(x * -0.16666666666666666), y_m); elseif (t_0 <= 0.0) tmp = Float64(x * Float64(y_m / x)); else tmp = fma(Float64(y_m * Float64(y_m * 0.008333333333333333)), Float64(y_m * Float64(y_m * y_m)), y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-254], N[(N[(y$95$m * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision]), $MachinePrecision] * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot x, x \cdot -0.16666666666666666, y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot \left(y\_m \cdot 0.008333333333333333\right), y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
distribute-lft-inN/A
associate-*r*N/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.6
Applied egg-rr39.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 54.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified89.8%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.6
Simplified88.6%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.2
Simplified48.2%
Taylor expanded in y around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6448.2
Simplified48.2%
Final simplification57.6%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -1e-254)
(fma (* y_m x) (* x -0.16666666666666666) y_m)
(if (<= t_0 0.0)
(* x (/ y_m x))
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -1e-254) {
tmp = fma((y_m * x), (x * -0.16666666666666666), y_m);
} else if (t_0 <= 0.0) {
tmp = x * (y_m / x);
} else {
tmp = fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -1e-254) tmp = fma(Float64(y_m * x), Float64(x * -0.16666666666666666), y_m); elseif (t_0 <= 0.0) tmp = Float64(x * Float64(y_m / x)); else tmp = fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-254], N[(N[(y$95$m * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot x, x \cdot -0.16666666666666666, y\_m\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
distribute-lft-inN/A
associate-*r*N/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.6
Applied egg-rr39.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 54.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified89.8%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.5
Simplified41.5%
Final simplification55.0%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sinh y_m) (sin x)) x)))
(*
y_s
(if (<= t_0 -1e-254)
(* -0.16666666666666666 (* y_m (* x x)))
(if (<= t_0 0.0)
(* x (/ y_m x))
(fma 0.16666666666666666 (* y_m (* y_m y_m)) y_m))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = (sinh(y_m) * sin(x)) / x;
double tmp;
if (t_0 <= -1e-254) {
tmp = -0.16666666666666666 * (y_m * (x * x));
} else if (t_0 <= 0.0) {
tmp = x * (y_m / x);
} else {
tmp = fma(0.16666666666666666, (y_m * (y_m * y_m)), y_m);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = Float64(Float64(sinh(y_m) * sin(x)) / x) tmp = 0.0 if (t_0 <= -1e-254) tmp = Float64(-0.16666666666666666 * Float64(y_m * Float64(x * x))); elseif (t_0 <= 0.0) tmp = Float64(x * Float64(y_m / x)); else tmp = fma(0.16666666666666666, Float64(y_m * Float64(y_m * y_m)), y_m); end return Float64(y_s * tmp) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := Block[{t$95$0 = N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-254], N[(-0.16666666666666666 * N[(y$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-254}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(y\_m \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.6
Simplified16.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 54.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified89.8%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6475.0
Simplified75.0%
Taylor expanded in x around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6441.5
Simplified41.5%
Final simplification47.7%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(*
y_s
(if (<= (/ (* (sinh y_m) (sin x)) x) -1e-254)
(* -0.16666666666666666 (* y_m (* x x)))
(* x (/ y_m x)))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (((sinh(y_m) * sin(x)) / x) <= -1e-254) {
tmp = -0.16666666666666666 * (y_m * (x * x));
} else {
tmp = x * (y_m / x);
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8) :: tmp
if (((sinh(y_m) * sin(x)) / x) <= (-1d-254)) then
tmp = (-0.16666666666666666d0) * (y_m * (x * x))
else
tmp = x * (y_m / x)
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
double tmp;
if (((Math.sinh(y_m) * Math.sin(x)) / x) <= -1e-254) {
tmp = -0.16666666666666666 * (y_m * (x * x));
} else {
tmp = x * (y_m / x);
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): tmp = 0 if ((math.sinh(y_m) * math.sin(x)) / x) <= -1e-254: tmp = -0.16666666666666666 * (y_m * (x * x)) else: tmp = x * (y_m / x) return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) tmp = 0.0 if (Float64(Float64(sinh(y_m) * sin(x)) / x) <= -1e-254) tmp = Float64(-0.16666666666666666 * Float64(y_m * Float64(x * x))); else tmp = Float64(x * Float64(y_m / x)); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m) tmp = 0.0; if (((sinh(y_m) * sin(x)) / x) <= -1e-254) tmp = -0.16666666666666666 * (y_m * (x * x)); else tmp = x * (y_m / x); end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-254], N[(-0.16666666666666666 * N[(y$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y\_m \cdot \sin x}{x} \leq -1 \cdot 10^{-254}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(y\_m \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y\_m}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.6
Simplified16.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 80.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around 0
/-lowering-/.f6472.3
Simplified72.3%
Taylor expanded in x around 0
Simplified54.6%
Final simplification42.4%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(*
y_s
(if (<= (/ (* (sinh y_m) (sin x)) x) -1e-254)
(* -0.16666666666666666 (* y_m (* x x)))
y_m)))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (((sinh(y_m) * sin(x)) / x) <= -1e-254) {
tmp = -0.16666666666666666 * (y_m * (x * x));
} else {
tmp = y_m;
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8) :: tmp
if (((sinh(y_m) * sin(x)) / x) <= (-1d-254)) then
tmp = (-0.16666666666666666d0) * (y_m * (x * x))
else
tmp = y_m
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
double tmp;
if (((Math.sinh(y_m) * Math.sin(x)) / x) <= -1e-254) {
tmp = -0.16666666666666666 * (y_m * (x * x));
} else {
tmp = y_m;
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): tmp = 0 if ((math.sinh(y_m) * math.sin(x)) / x) <= -1e-254: tmp = -0.16666666666666666 * (y_m * (x * x)) else: tmp = y_m return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) tmp = 0.0 if (Float64(Float64(sinh(y_m) * sin(x)) / x) <= -1e-254) tmp = Float64(-0.16666666666666666 * Float64(y_m * Float64(x * x))); else tmp = y_m; end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m) tmp = 0.0; if (((sinh(y_m) * sin(x)) / x) <= -1e-254) tmp = -0.16666666666666666 * (y_m * (x * x)); else tmp = y_m; end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-254], N[(-0.16666666666666666 * N[(y$95$m * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$95$m]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y\_m \cdot \sin x}{x} \leq -1 \cdot 10^{-254}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(y\_m \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y\_m\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999991e-255Initial program 99.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6437.4
Simplified37.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.6
Simplified39.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.6
Simplified16.6%
if -9.9999999999999991e-255 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 80.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6465.8
Simplified65.8%
Taylor expanded in x around 0
Simplified32.2%
Final simplification27.2%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m) :precision binary64 (* y_s (* (/ (sinh y_m) x) (sin x))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
return y_s * ((sinh(y_m) / x) * sin(x));
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
code = y_s * ((sinh(y_m) / x) * sin(x))
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
return y_s * ((Math.sinh(y_m) / x) * Math.sin(x));
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): return y_s * ((math.sinh(y_m) / x) * math.sin(x))
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * Float64(Float64(sinh(y_m) / x) * sin(x))) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp = code(y_s, x, y_m) tmp = y_s * ((sinh(y_m) / x) * sin(x)); end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(N[(N[Sinh[y$95$m], $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \left(\frac{\sinh y\_m}{x} \cdot \sin x\right)
\end{array}
Initial program 86.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.5
Applied egg-rr99.5%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m) :precision binary64 (* y_s (* y_m (fma x (* x -0.16666666666666666) 1.0))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
return y_s * (y_m * fma(x, (x * -0.16666666666666666), 1.0));
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * Float64(y_m * fma(x, Float64(x * -0.16666666666666666), 1.0))) end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(y$95$m * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \left(y\_m \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right)
\end{array}
Initial program 86.3%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6456.7
Simplified56.7%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6439.5
Simplified39.5%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m) :precision binary64 (* y_s y_m))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
return y_s * y_m;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
code = y_s * y_m
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
return y_s * y_m;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): return y_s * y_m
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * y_m) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp = code(y_s, x, y_m) tmp = y_s * y_m; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * y$95$m), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot y\_m
\end{array}
Initial program 86.3%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6456.7
Simplified56.7%
Taylor expanded in x around 0
Simplified29.9%
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
double code(double x, double y) {
return sin(x) * (sinh(y) / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / x)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / x);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / x)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / x)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / x); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
herbie shell --seed 2024198
(FPCore (x y)
:name "Linear.Quaternion:$ccosh from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (* (sin x) (/ (sinh y) x)))
(/ (* (sin x) (sinh y)) x))