
(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 24 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
(*
y_s
(if (<= (sinh y_m) 2e-27)
(* y_m (/ (sin x) x))
(/ (* (sinh y_m) (sin x)) 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) <= 2e-27) {
tmp = y_m * (sin(x) / x);
} else {
tmp = (sinh(y_m) * sin(x)) / 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) <= 2d-27) then
tmp = y_m * (sin(x) / x)
else
tmp = (sinh(y_m) * sin(x)) / 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) <= 2e-27) {
tmp = y_m * (Math.sin(x) / x);
} else {
tmp = (Math.sinh(y_m) * Math.sin(x)) / 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) <= 2e-27: tmp = y_m * (math.sin(x) / x) else: tmp = (math.sinh(y_m) * math.sin(x)) / 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 (sinh(y_m) <= 2e-27) tmp = Float64(y_m * Float64(sin(x) / x)); else tmp = Float64(Float64(sinh(y_m) * sin(x)) / 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) <= 2e-27) tmp = y_m * (sin(x) / x); else tmp = (sinh(y_m) * sin(x)) / 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[Sinh[y$95$m], $MachinePrecision], 2e-27], N[(y$95$m * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $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}\;\sinh y\_m \leq 2 \cdot 10^{-27}:\\
\;\;\;\;y\_m \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y\_m \cdot \sin x}{x}\\
\end{array}
\end{array}
if (sinh.f64 y) < 2.0000000000000001e-27Initial program 86.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6467.8
Simplified67.8%
if 2.0000000000000001e-27 < (sinh.f64 y) Initial program 100.0%
Final simplification75.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 -1e-117)
(* y_m (* (* x x) -0.16666666666666666))
(if (<= t_0 5e-276)
(* 0.5 (+ 1.0 -1.0))
(if (<= t_0 1000.0) y_m (* y_m (fma y_m 0.25 0.5))))))))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-117) {
tmp = y_m * ((x * x) * -0.16666666666666666);
} else if (t_0 <= 5e-276) {
tmp = 0.5 * (1.0 + -1.0);
} else if (t_0 <= 1000.0) {
tmp = y_m;
} else {
tmp = y_m * fma(y_m, 0.25, 0.5);
}
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-117) tmp = Float64(y_m * Float64(Float64(x * x) * -0.16666666666666666)); elseif (t_0 <= 5e-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); elseif (t_0 <= 1000.0) tmp = y_m; else tmp = Float64(y_m * fma(y_m, 0.25, 0.5)); 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-117], N[(y$95$m * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], y$95$m, N[(y$95$m * N[(y$95$m * 0.25 + 0.5), $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 -1 \cdot 10^{-117}:\\
\;\;\;\;y\_m \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;y\_m\\
\mathbf{else}:\\
\;\;\;\;y\_m \cdot \mathsf{fma}\left(y\_m, 0.25, 0.5\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6422.0
Simplified22.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6428.2
Simplified28.2%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.6
Simplified15.6%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 71.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6443.9
Simplified43.9%
Taylor expanded in y around 0
Simplified43.9%
Taylor expanded in y around 0
Simplified43.9%
if 4.99999999999999967e-276 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 99.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified62.7%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around 0
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6451.8
Simplified51.8%
Final simplification39.4%
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))
(/ (* (sinh y_m) (fma x (* (* x x) -0.16666666666666666) x)) x)
(if (<= t_0 1000.0)
(*
(*
(sin x)
(fma
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666))
1.0))
(/ y_m x))
(* 0.5 (- (exp y_m) (exp (- 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 <= -((double) INFINITY)) {
tmp = (sinh(y_m) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else if (t_0 <= 1000.0) {
tmp = (sin(x) * fma(y_m, (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * (y_m / x);
} else {
tmp = 0.5 * (exp(y_m) - exp(-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 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y_m) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); elseif (t_0 <= 1000.0) tmp = Float64(Float64(sin(x) * fma(y_m, Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * Float64(y_m / x)); else tmp = Float64(0.5 * Float64(exp(y_m) - exp(Float64(-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, (-Infinity)], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], N[(N[(N[Sin[x], $MachinePrecision] * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[Exp[y$95$m], $MachinePrecision] - N[Exp[(-y$95$m)], $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 -\infty:\\
\;\;\;\;\frac{\sinh y\_m \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;\left(\sin x \cdot \mathsf{fma}\left(y\_m, y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right) \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(e^{y\_m} - e^{-y\_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6472.1
Simplified72.1%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 80.4%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified79.7%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified99.1%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Final simplification86.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 (- INFINITY))
(/ (* (sinh y_m) (fma x (* (* x x) -0.16666666666666666) x)) x)
(if (<= t_0 1000.0)
(*
(*
(sin x)
(fma
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666))
1.0))
(/ y_m x))
(/
(*
(sinh y_m)
(fma
(fma (* x x) 0.008333333333333333 -0.16666666666666666)
(* x (* x x))
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 = (sinh(y_m) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else if (t_0 <= 1000.0) {
tmp = (sin(x) * fma(y_m, (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * (y_m / x);
} else {
tmp = (sinh(y_m) * fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), 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(Float64(sinh(y_m) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); elseif (t_0 <= 1000.0) tmp = Float64(Float64(sin(x) * fma(y_m, Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * Float64(y_m / x)); else tmp = Float64(Float64(sinh(y_m) * fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), 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[(N[Sinh[y$95$m], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], N[(N[(N[Sin[x], $MachinePrecision] * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $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 := \frac{\sinh y\_m \cdot \sin x}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\sinh y\_m \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;\left(\sin x \cdot \mathsf{fma}\left(y\_m, y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right) \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y\_m \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\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 x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6472.1
Simplified72.1%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 80.4%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified79.7%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified99.1%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6473.0
Simplified73.0%
Final simplification86.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 (- INFINITY))
(/ (* (sinh y_m) (fma x (* (* x x) -0.16666666666666666) x)) x)
(if (<= t_0 1000.0)
(*
(*
(sin x)
(fma
y_m
(* y_m (fma y_m (* y_m 0.008333333333333333) 0.16666666666666666))
1.0))
(/ y_m x))
(* 0.5 (expm1 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 <= -((double) INFINITY)) {
tmp = (sinh(y_m) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else if (t_0 <= 1000.0) {
tmp = (sin(x) * fma(y_m, (y_m * fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * (y_m / x);
} else {
tmp = 0.5 * expm1(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 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y_m) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); elseif (t_0 <= 1000.0) tmp = Float64(Float64(sin(x) * fma(y_m, Float64(y_m * fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666)), 1.0)) * Float64(y_m / x)); else tmp = Float64(0.5 * expm1(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, (-Infinity)], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], N[(N[(N[Sin[x], $MachinePrecision] * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y$95$m / x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(Exp[y$95$m] - 1), $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 -\infty:\\
\;\;\;\;\frac{\sinh y\_m \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;\left(\sin x \cdot \mathsf{fma}\left(y\_m, y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\right) \cdot \frac{y\_m}{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{expm1}\left(y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6472.1
Simplified72.1%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 80.4%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified79.7%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified99.1%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around inf
lower-expm1.f6472.3
Simplified72.3%
Final simplification86.1%
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))
(/ (* (sinh y_m) (fma x (* (* x x) -0.16666666666666666) x)) x)
(if (<= t_0 0.0001) (* y_m (/ (sin x) x)) (* 0.5 (expm1 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 <= -((double) INFINITY)) {
tmp = (sinh(y_m) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else if (t_0 <= 0.0001) {
tmp = y_m * (sin(x) / x);
} else {
tmp = 0.5 * expm1(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 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y_m) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); elseif (t_0 <= 0.0001) tmp = Float64(y_m * Float64(sin(x) / x)); else tmp = Float64(0.5 * expm1(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, (-Infinity)], N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0001], N[(y$95$m * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(Exp[y$95$m] - 1), $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 -\infty:\\
\;\;\;\;\frac{\sinh y\_m \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 0.0001:\\
\;\;\;\;y\_m \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{expm1}\left(y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6472.1
Simplified72.1%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.00000000000000005e-4Initial program 80.4%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6498.5
Simplified98.5%
if 1.00000000000000005e-4 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around inf
lower-expm1.f6472.3
Simplified72.3%
Final simplification85.8%
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)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(fma
(* y_m y_m)
(fma (* y_m y_m) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y_m (* y_m y_m))
y_m))
x)
(if (<= t_0 0.0001) (* y_m (/ (sin x) x)) (* 0.5 (expm1 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 <= -((double) INFINITY)) {
tmp = (fma((x * x), (x * fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma((y_m * y_m), fma((y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y_m * (y_m * y_m)), y_m)) / x;
} else if (t_0 <= 0.0001) {
tmp = y_m * (sin(x) / x);
} else {
tmp = 0.5 * expm1(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 <= Float64(-Inf)) tmp = Float64(Float64(fma(Float64(x * x), Float64(x * fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma(Float64(y_m * y_m), fma(Float64(y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y_m * Float64(y_m * y_m)), y_m)) / x); elseif (t_0 <= 0.0001) tmp = Float64(y_m * Float64(sin(x) / x)); else tmp = Float64(0.5 * expm1(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, (-Infinity)], N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0001], N[(y$95$m * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(Exp[y$95$m] - 1), $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 -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m \cdot y\_m, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 0.0001:\\
\;\;\;\;y\_m \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{expm1}\left(y\_m\right)\\
\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-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6487.4
Simplified87.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
Simplified64.3%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.00000000000000005e-4Initial program 80.4%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6498.5
Simplified98.5%
if 1.00000000000000005e-4 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around inf
lower-expm1.f6472.3
Simplified72.3%
Final simplification83.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-117)
(/
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(fma
(* y_m y_m)
(fma (* y_m y_m) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y_m (* y_m y_m))
y_m))
x)
(if (<= t_0 1000.0)
(*
(/ y_m x)
(fma
(* y_m y_m)
(* x (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
x))
(* 0.5 (expm1 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-117) {
tmp = (fma((x * x), (x * fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma((y_m * y_m), fma((y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y_m * (y_m * y_m)), y_m)) / x;
} else if (t_0 <= 1000.0) {
tmp = (y_m / x) * fma((y_m * y_m), (x * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), x);
} else {
tmp = 0.5 * expm1(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-117) tmp = Float64(Float64(fma(Float64(x * x), Float64(x * fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma(Float64(y_m * y_m), fma(Float64(y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y_m * Float64(y_m * y_m)), y_m)) / x); elseif (t_0 <= 1000.0) tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), x)); else tmp = Float64(0.5 * expm1(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-117], N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(Exp[y$95$m] - 1), $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 -1 \cdot 10^{-117}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m \cdot y\_m, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \mathsf{expm1}\left(y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6488.3
Simplified88.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
Simplified62.3%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 78.1%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.1%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified99.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.5
Simplified71.5%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around inf
lower-expm1.f6472.3
Simplified72.3%
Final simplification68.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 -2e-107)
(*
y_m
(fma
(* x x)
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666)
1.0))
(if (<= t_0 5e-276)
(* 0.5 (+ 1.0 -1.0))
(fma
y_m
(*
(* y_m y_m)
(fma
y_m
(* y_m (fma y_m (* y_m 0.0001984126984126984) 0.008333333333333333))
0.16666666666666666))
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 <= -2e-107) {
tmp = y_m * fma((x * x), fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0);
} else if (t_0 <= 5e-276) {
tmp = 0.5 * (1.0 + -1.0);
} else {
tmp = fma(y_m, ((y_m * y_m) * fma(y_m, (y_m * fma(y_m, (y_m * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666)), 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 <= -2e-107) tmp = Float64(y_m * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0)); elseif (t_0 <= 5e-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); else tmp = fma(y_m, Float64(Float64(y_m * y_m) * fma(y_m, Float64(y_m * fma(y_m, Float64(y_m * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666)), 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, -2e-107], N[(y$95$m * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $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 -2 \cdot 10^{-107}:\\
\;\;\;\;y\_m \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), 1\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m, \left(y\_m \cdot y\_m\right) \cdot \mathsf{fma}\left(y\_m, y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-107Initial program 99.4%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6418.9
Simplified18.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6432.9
Simplified32.9%
if -2e-107 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 72.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6442.6
Simplified42.6%
Taylor expanded in y around 0
Simplified42.6%
Taylor expanded in y around 0
Simplified42.6%
if 4.99999999999999967e-276 < (/.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
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6490.6
Simplified90.6%
Taylor expanded in x around 0
+-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
Simplified65.9%
Final simplification48.1%
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-165)
(*
y_m
(* (* y_m y_m) (fma (* x x) -0.027777777777777776 0.16666666666666666)))
(if (<= t_0 5e-276)
(* 0.5 (+ 1.0 -1.0))
(fma
(* y_m y_m)
(* y_m (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
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-165) {
tmp = y_m * ((y_m * y_m) * fma((x * x), -0.027777777777777776, 0.16666666666666666));
} else if (t_0 <= 5e-276) {
tmp = 0.5 * (1.0 + -1.0);
} else {
tmp = fma((y_m * y_m), (y_m * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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-165) tmp = Float64(y_m * Float64(Float64(y_m * y_m) * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666))); elseif (t_0 <= 5e-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); else tmp = fma(Float64(y_m * y_m), Float64(y_m * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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-165], N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $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^{-165}:\\
\;\;\;\;y\_m \cdot \left(\left(y\_m \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, y\_m \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1e-165Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6481.6
Simplified81.6%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.7
Simplified57.7%
Taylor expanded in y around inf
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
distribute-lft-neg-inN/A
distribute-lft-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
Simplified45.1%
if -1e-165 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 69.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6445.7
Simplified45.7%
Taylor expanded in y around 0
Simplified45.7%
Taylor expanded in y around 0
Simplified45.7%
if 4.99999999999999967e-276 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified86.3%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified84.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6465.8
Simplified65.8%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6463.8
Simplified63.8%
Final simplification51.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-165)
(*
y_m
(* (* y_m y_m) (fma (* x x) -0.027777777777777776 0.16666666666666666)))
(if (<= t_0 5e-276)
(* 0.5 (+ 1.0 -1.0))
(fma y_m (* 0.16666666666666666 (* 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-165) {
tmp = y_m * ((y_m * y_m) * fma((x * x), -0.027777777777777776, 0.16666666666666666));
} else if (t_0 <= 5e-276) {
tmp = 0.5 * (1.0 + -1.0);
} else {
tmp = fma(y_m, (0.16666666666666666 * (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-165) tmp = Float64(y_m * Float64(Float64(y_m * y_m) * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666))); elseif (t_0 <= 5e-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); else tmp = fma(y_m, Float64(0.16666666666666666 * 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-165], N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(0.16666666666666666 * 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^{-165}:\\
\;\;\;\;y\_m \cdot \left(\left(y\_m \cdot y\_m\right) \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m, 0.16666666666666666 \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) < -1e-165Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6481.6
Simplified81.6%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.7
Simplified57.7%
Taylor expanded in y around inf
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*l*N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
distribute-lft-neg-inN/A
distribute-lft-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
Simplified45.1%
if -1e-165 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 69.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6445.7
Simplified45.7%
Taylor expanded in y around 0
Simplified45.7%
Taylor expanded in y around 0
Simplified45.7%
if 4.99999999999999967e-276 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.8
Simplified77.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Simplified58.5%
Final simplification50.1%
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-117)
(* y_m (* (* x x) -0.16666666666666666))
(if (<= t_0 5e-276)
(* 0.5 (+ 1.0 -1.0))
(fma y_m (* 0.16666666666666666 (* 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-117) {
tmp = y_m * ((x * x) * -0.16666666666666666);
} else if (t_0 <= 5e-276) {
tmp = 0.5 * (1.0 + -1.0);
} else {
tmp = fma(y_m, (0.16666666666666666 * (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-117) tmp = Float64(y_m * Float64(Float64(x * x) * -0.16666666666666666)); elseif (t_0 <= 5e-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); else tmp = fma(y_m, Float64(0.16666666666666666 * 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-117], N[(y$95$m * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(0.16666666666666666 * 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^{-117}:\\
\;\;\;\;y\_m \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y\_m, 0.16666666666666666 \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) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6422.0
Simplified22.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6428.2
Simplified28.2%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.6
Simplified15.6%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 71.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6443.9
Simplified43.9%
Taylor expanded in y around 0
Simplified43.9%
Taylor expanded in y around 0
Simplified43.9%
if 4.99999999999999967e-276 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.8
Simplified77.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Simplified58.5%
Final simplification40.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 5e-276)
(* 0.5 (+ 1.0 -1.0))
(if (<= t_0 1000.0) y_m (* y_m (fma y_m 0.25 0.5)))))))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-276) {
tmp = 0.5 * (1.0 + -1.0);
} else if (t_0 <= 1000.0) {
tmp = y_m;
} else {
tmp = y_m * fma(y_m, 0.25, 0.5);
}
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-276) tmp = Float64(0.5 * Float64(1.0 + -1.0)); elseif (t_0 <= 1000.0) tmp = y_m; else tmp = Float64(y_m * fma(y_m, 0.25, 0.5)); 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-276], N[(0.5 * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1000.0], y$95$m, N[(y$95$m * N[(y$95$m * 0.25 + 0.5), $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^{-276}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\mathbf{elif}\;t\_0 \leq 1000:\\
\;\;\;\;y\_m\\
\mathbf{else}:\\
\;\;\;\;y\_m \cdot \mathsf{fma}\left(y\_m, 0.25, 0.5\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999967e-276Initial program 84.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6453.1
Simplified53.1%
Taylor expanded in y around 0
Simplified24.9%
Taylor expanded in y around 0
Simplified24.3%
if 4.99999999999999967e-276 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e3Initial program 99.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.9
Simplified99.9%
Taylor expanded in x around 0
Simplified62.7%
if 1e3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6473.0
Simplified73.0%
Taylor expanded in y around 0
Simplified72.3%
Taylor expanded in y around 0
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6451.8
Simplified51.8%
Final simplification35.3%
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-117)
(/
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(fma
(* y_m y_m)
(fma (* y_m y_m) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y_m (* y_m y_m))
y_m))
x)
(*
(/ y_m x)
(fma
(* y_m y_m)
(* x (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
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-117) {
tmp = (fma((x * x), (x * fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma((y_m * y_m), fma((y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y_m * (y_m * y_m)), y_m)) / x;
} else {
tmp = (y_m / x) * fma((y_m * y_m), (x * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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-117) tmp = Float64(Float64(fma(Float64(x * x), Float64(x * fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(fma(Float64(y_m * y_m), fma(Float64(y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y_m * Float64(y_m * y_m)), y_m)) / x); else tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-117], N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 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^{-117}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m \cdot y\_m, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m \cdot \left(y\_m \cdot y\_m\right), y\_m\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6488.3
Simplified88.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
Simplified62.3%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.8%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified91.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6470.0
Simplified70.0%
Final simplification67.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-117)
(/
(*
y_m
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(* y_m y_m)
(fma y_m (* y_m 0.008333333333333333) 0.16666666666666666)
1.0)))
x)
(*
(/ y_m x)
(fma
(* y_m y_m)
(* x (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
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-117) {
tmp = (y_m * (fma((x * x), (x * fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma((y_m * y_m), fma(y_m, (y_m * 0.008333333333333333), 0.16666666666666666), 1.0))) / x;
} else {
tmp = (y_m / x) * fma((y_m * y_m), (x * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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-117) tmp = Float64(Float64(y_m * Float64(fma(Float64(x * x), Float64(x * fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(Float64(y_m * y_m), fma(y_m, Float64(y_m * 0.008333333333333333), 0.16666666666666666), 1.0))) / x); else tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-117], N[(N[(y$95$m * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $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] / x), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 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^{-117}:\\
\;\;\;\;\frac{y\_m \cdot \left(\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x\right) \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)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified85.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
Simplified61.0%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.8%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified91.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6470.0
Simplified70.0%
Final simplification67.3%
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-117)
(/
(*
y_m
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma y_m (* y_m 0.16666666666666666) 1.0)))
x)
(*
(/ y_m x)
(fma
(* y_m y_m)
(* x (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
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-117) {
tmp = (y_m * (fma((x * x), (x * fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(y_m, (y_m * 0.16666666666666666), 1.0))) / x;
} else {
tmp = (y_m / x) * fma((y_m * y_m), (x * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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-117) tmp = Float64(Float64(y_m * Float64(fma(Float64(x * x), Float64(x * fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666)), x) * fma(y_m, Float64(y_m * 0.16666666666666666), 1.0))) / x); else tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-117], N[(N[(y$95$m * N[(N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(y$95$m * N[(y$95$m * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 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^{-117}:\\
\;\;\;\;\frac{y\_m \cdot \left(\mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x\right) \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.16666666666666666, 1\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.00000000000000003e-117Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6480.7
Simplified80.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
lower-fma.f64N/A
Simplified58.7%
if -1.00000000000000003e-117 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.8%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.9%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified91.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6470.0
Simplified70.0%
Final simplification66.6%
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) -5e-215)
(*
(fma
(* y_m y_m)
(*
y_m
(fma
(* y_m y_m)
(fma (* y_m y_m) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
y_m)
(* (* x x) -0.16666666666666666))
(*
(/ y_m x)
(fma
(* y_m y_m)
(* x (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
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) <= -5e-215) {
tmp = fma((y_m * y_m), (y_m * fma((y_m * y_m), fma((y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y_m) * ((x * x) * -0.16666666666666666);
} else {
tmp = (y_m / x) * fma((y_m * y_m), (x * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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) <= -5e-215) tmp = Float64(fma(Float64(y_m * y_m), Float64(y_m * fma(Float64(y_m * y_m), fma(Float64(y_m * y_m), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y_m) * Float64(Float64(x * x) * -0.16666666666666666)); else tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-215], N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 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 -5 \cdot 10^{-215}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, y\_m \cdot \mathsf{fma}\left(y\_m \cdot y\_m, \mathsf{fma}\left(y\_m \cdot y\_m, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m\right) \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.99999999999999956e-215Initial program 99.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6489.5
Simplified89.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.5
Simplified59.5%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Simplified16.1%
if -4.99999999999999956e-215 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.1%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified77.8%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified91.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.2
Simplified71.2%
Final simplification52.7%
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 (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666)))
(*
y_s
(if (<= (/ (* (sinh y_m) (sin x)) x) -5e-215)
(*
y_m
(* (fma -0.16666666666666666 (* x x) 1.0) (fma (* y_m y_m) t_0 1.0)))
(* (/ y_m x) (fma (* y_m y_m) (* x t_0) x))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double t_0 = fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666);
double tmp;
if (((sinh(y_m) * sin(x)) / x) <= -5e-215) {
tmp = y_m * (fma(-0.16666666666666666, (x * x), 1.0) * fma((y_m * y_m), t_0, 1.0));
} else {
tmp = (y_m / x) * fma((y_m * y_m), (x * t_0), x);
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) t_0 = fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666) tmp = 0.0 if (Float64(Float64(sinh(y_m) * sin(x)) / x) <= -5e-215) tmp = Float64(y_m * Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * fma(Float64(y_m * y_m), t_0, 1.0))); else tmp = Float64(Float64(y_m / x) * fma(Float64(y_m * y_m), Float64(x * t_0), 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[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]}, N[(y$95$s * If[LessEqual[N[(N[(N[Sinh[y$95$m], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-215], N[(y$95$m * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(x * t$95$0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right)\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\sinh y\_m \cdot \sin x}{x} \leq -5 \cdot 10^{-215}:\\
\;\;\;\;y\_m \cdot \left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot \mathsf{fma}\left(y\_m \cdot y\_m, t\_0, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \mathsf{fma}\left(y\_m \cdot y\_m, x \cdot t\_0, x\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.99999999999999956e-215Initial program 99.5%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified87.2%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified86.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
Simplified58.9%
if -4.99999999999999956e-215 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.1%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified77.8%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified91.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.2
Simplified71.2%
Final simplification67.0%
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 (<= x 2.25e+57)
(fma
y_m
(*
(* y_m y_m)
(fma
y_m
(* y_m (fma y_m (* y_m 0.0001984126984126984) 0.008333333333333333))
0.16666666666666666))
y_m)
(* (/ y_m x) (* (* y_m y_m) (* 0.008333333333333333 (* y_m (* 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 (x <= 2.25e+57) {
tmp = fma(y_m, ((y_m * y_m) * fma(y_m, (y_m * fma(y_m, (y_m * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666)), y_m);
} else {
tmp = (y_m / x) * ((y_m * y_m) * (0.008333333333333333 * (y_m * (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 (x <= 2.25e+57) tmp = fma(y_m, Float64(Float64(y_m * y_m) * fma(y_m, Float64(y_m * fma(y_m, Float64(y_m * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666)), y_m); else tmp = Float64(Float64(y_m / x) * Float64(Float64(y_m * y_m) * Float64(0.008333333333333333 * Float64(y_m * Float64(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_] := N[(y$95$s * If[LessEqual[x, 2.25e+57], N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(y$95$m * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision], N[(N[(y$95$m / x), $MachinePrecision] * N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(0.008333333333333333 * N[(y$95$m * N[(y$95$m * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;x \leq 2.25 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(y\_m, \left(y\_m \cdot y\_m\right) \cdot \mathsf{fma}\left(y\_m, y\_m \cdot \mathsf{fma}\left(y\_m, y\_m \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{x} \cdot \left(\left(y\_m \cdot y\_m\right) \cdot \left(0.008333333333333333 \cdot \left(y\_m \cdot \left(y\_m \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 2.24999999999999998e57Initial program 87.2%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.6
Simplified80.6%
Taylor expanded in x around 0
+-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
Simplified62.4%
if 2.24999999999999998e57 < x Initial program 99.9%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified89.4%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified85.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6466.3
Simplified66.3%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.4
Simplified70.4%
Final simplification64.1%
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 (<= x 4.1e+52)
(fma
(* y_m y_m)
(* y_m (fma (* y_m y_m) 0.008333333333333333 0.16666666666666666))
y_m)
(* 0.5 (* y_m (* y_m (* y_m (* (* y_m y_m) 0.016666666666666666))))))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (x <= 4.1e+52) {
tmp = fma((y_m * y_m), (y_m * fma((y_m * y_m), 0.008333333333333333, 0.16666666666666666)), y_m);
} else {
tmp = 0.5 * (y_m * (y_m * (y_m * ((y_m * y_m) * 0.016666666666666666))));
}
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 (x <= 4.1e+52) tmp = fma(Float64(y_m * y_m), Float64(y_m * fma(Float64(y_m * y_m), 0.008333333333333333, 0.16666666666666666)), y_m); else tmp = Float64(0.5 * Float64(y_m * Float64(y_m * Float64(y_m * Float64(Float64(y_m * y_m) * 0.016666666666666666))))); 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_] := N[(y$95$s * If[LessEqual[x, 4.1e+52], N[(N[(y$95$m * y$95$m), $MachinePrecision] * N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y$95$m), $MachinePrecision], N[(0.5 * N[(y$95$m * N[(y$95$m * N[(y$95$m * N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;x \leq 4.1 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(y\_m \cdot y\_m, y\_m \cdot \mathsf{fma}\left(y\_m \cdot y\_m, 0.008333333333333333, 0.16666666666666666\right), y\_m\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y\_m \cdot \left(y\_m \cdot \left(y\_m \cdot \left(\left(y\_m \cdot y\_m\right) \cdot 0.016666666666666666\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 4.1e52Initial program 87.0%
Taylor expanded in y around 0
lower-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.3%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Simplified90.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6469.9
Simplified69.9%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6461.8
Simplified61.8%
if 4.1e52 < x Initial program 99.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6468.5
Simplified68.5%
Taylor expanded in y around 0
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6432.5
Simplified32.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.1
Simplified62.1%
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 (<= x 4.1e+52) y_m (* 0.5 (+ (+ y_m 1.0) -1.0)))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (x <= 4.1e+52) {
tmp = y_m;
} else {
tmp = 0.5 * ((y_m + 1.0) + -1.0);
}
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 (x <= 4.1d+52) then
tmp = y_m
else
tmp = 0.5d0 * ((y_m + 1.0d0) + (-1.0d0))
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 (x <= 4.1e+52) {
tmp = y_m;
} else {
tmp = 0.5 * ((y_m + 1.0) + -1.0);
}
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 x <= 4.1e+52: tmp = y_m else: tmp = 0.5 * ((y_m + 1.0) + -1.0) 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 (x <= 4.1e+52) tmp = y_m; else tmp = Float64(0.5 * Float64(Float64(y_m + 1.0) + -1.0)); 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 (x <= 4.1e+52) tmp = y_m; else tmp = 0.5 * ((y_m + 1.0) + -1.0); 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[x, 4.1e+52], y$95$m, N[(0.5 * N[(N[(y$95$m + 1.0), $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 \begin{array}{l}
\mathbf{if}\;x \leq 4.1 \cdot 10^{+52}:\\
\;\;\;\;y\_m\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\left(y\_m + 1\right) + -1\right)\\
\end{array}
\end{array}
if x < 4.1e52Initial program 87.0%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.4
Simplified53.4%
Taylor expanded in x around 0
Simplified32.2%
if 4.1e52 < x Initial program 99.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6468.5
Simplified68.5%
Taylor expanded in y around 0
Simplified50.2%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6435.9
Simplified35.9%
Final simplification33.1%
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 (<= x 1.06e+64) y_m (* 0.5 (+ 1.0 -1.0)))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (x <= 1.06e+64) {
tmp = y_m;
} else {
tmp = 0.5 * (1.0 + -1.0);
}
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 (x <= 1.06d+64) then
tmp = y_m
else
tmp = 0.5d0 * (1.0d0 + (-1.0d0))
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 (x <= 1.06e+64) {
tmp = y_m;
} else {
tmp = 0.5 * (1.0 + -1.0);
}
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 x <= 1.06e+64: tmp = y_m else: tmp = 0.5 * (1.0 + -1.0) 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 (x <= 1.06e+64) tmp = y_m; else tmp = Float64(0.5 * Float64(1.0 + -1.0)); 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 (x <= 1.06e+64) tmp = y_m; else tmp = 0.5 * (1.0 + -1.0); 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[x, 1.06e+64], y$95$m, N[(0.5 * N[(1.0 + -1.0), $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}\;x \leq 1.06 \cdot 10^{+64}:\\
\;\;\;\;y\_m\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(1 + -1\right)\\
\end{array}
\end{array}
if x < 1.06e64Initial program 87.2%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6452.9
Simplified52.9%
Taylor expanded in x around 0
Simplified31.7%
if 1.06e64 < x Initial program 99.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6471.6
Simplified71.6%
Taylor expanded in y around 0
Simplified53.7%
Taylor expanded in y around 0
Simplified37.2%
Final simplification32.8%
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 0.5)))
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 * 0.5);
}
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 * 0.5d0)
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 * 0.5);
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): return y_s * (y_m * 0.5)
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * Float64(y_m * 0.5)) 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 * 0.5); 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 * 0.5), $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 0.5\right)
\end{array}
Initial program 89.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6452.7
Simplified52.7%
Taylor expanded in y around 0
Simplified34.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f648.0
Simplified8.0%
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 89.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.0
Simplified53.0%
Taylor expanded in x around 0
Simplified26.0%
Final simplification26.0%
(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 2024215
(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))