
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 4e-11)
(*
(*
(fma
(fma
(fma (* y_m y_m) 0.0003968253968253968 0.016666666666666666)
(* y_m y_m)
0.3333333333333333)
(* y_m y_m)
2.0)
y_m)
(/ (* -0.5 (sin x)) (- x)))
(sinh 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 4e-11) {
tmp = (fma(fma(fma((y_m * y_m), 0.0003968253968253968, 0.016666666666666666), (y_m * y_m), 0.3333333333333333), (y_m * y_m), 2.0) * y_m) * ((-0.5 * sin(x)) / -x);
} else {
tmp = sinh(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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 4e-11) tmp = Float64(Float64(fma(fma(fma(Float64(y_m * y_m), 0.0003968253968253968, 0.016666666666666666), Float64(y_m * y_m), 0.3333333333333333), Float64(y_m * y_m), 2.0) * y_m) * Float64(Float64(-0.5 * sin(x)) / Float64(-x))); else tmp = sinh(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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 4e-11], N[(N[(N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.0003968253968253968 + 0.016666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * y$95$m), $MachinePrecision] * N[(N[(-0.5 * N[Sin[x], $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision]), $MachinePrecision], N[Sinh[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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y\_m \cdot y\_m, 0.0003968253968253968, 0.016666666666666666\right), y\_m \cdot y\_m, 0.3333333333333333\right), y\_m \cdot y\_m, 2\right) \cdot y\_m\right) \cdot \frac{-0.5 \cdot \sin x}{-x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\_m\\
\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
lower-*.f64N/A
Applied rewrites89.8%
Taylor expanded in x around 0
Applied rewrites63.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 79.8%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lift-sinh.f64N/A
sinh-defN/A
div-invN/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites99.6%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6499.1
Applied rewrites99.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6499.3
Applied rewrites99.3%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6478.8
Applied rewrites78.8%
Applied rewrites78.8%
Final simplification84.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
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0))
(t_1 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_1 (- INFINITY))
(* (* t_0 (fma (* x x) -0.16666666666666666 1.0)) y_m)
(if (<= t_1 4e-11) (* (* (/ (sin x) x) t_0) y_m) (sinh 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 = fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0);
double t_1 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (t_0 * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_1 <= 4e-11) {
tmp = ((sin(x) / x) * t_0) * y_m;
} else {
tmp = sinh(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 = fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) t_1 = Float64(Float64(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(t_0 * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_1 <= 4e-11) tmp = Float64(Float64(Float64(sin(x) / x) * t_0) * y_m); else tmp = sinh(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[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$1, 4e-11], N[(N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * t$95$0), $MachinePrecision] * y$95$m), $MachinePrecision], N[Sinh[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 := \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right)\\
t_1 := \frac{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;\left(\frac{\sin x}{x} \cdot t\_0\right) \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\sinh y\_m\\
\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
lower-*.f64N/A
Applied rewrites89.8%
Taylor expanded in x around 0
Applied rewrites63.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 79.8%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.3%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6478.8
Applied rewrites78.8%
Applied rewrites78.8%
Final simplification84.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 4e-11)
(* (* (fma (* y_m y_m) 0.16666666666666666 1.0) (/ (sin x) x)) y_m)
(sinh 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 4e-11) {
tmp = (fma((y_m * y_m), 0.16666666666666666, 1.0) * (sin(x) / x)) * y_m;
} else {
tmp = sinh(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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 4e-11) tmp = Float64(Float64(fma(Float64(y_m * y_m), 0.16666666666666666, 1.0) * Float64(sin(x) / x)) * y_m); else tmp = sinh(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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 4e-11], N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], N[Sinh[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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;\left(\mathsf{fma}\left(y\_m \cdot y\_m, 0.16666666666666666, 1\right) \cdot \frac{\sin x}{x}\right) \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\sinh y\_m\\
\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
lower-*.f64N/A
Applied rewrites89.8%
Taylor expanded in x around 0
Applied rewrites63.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 79.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6498.4
Applied rewrites98.4%
Taylor expanded in y around 0
*-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites98.9%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6478.8
Applied rewrites78.8%
Applied rewrites78.8%
Final simplification84.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(*
(*
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 1e-167)
(*
(pow
(fma
(fma 0.019444444444444445 (* x x) 0.16666666666666666)
(* x x)
1.0)
-1.0)
y_m)
(sinh 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = (fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 1e-167) {
tmp = pow(fma(fma(0.019444444444444445, (x * x), 0.16666666666666666), (x * x), 1.0), -1.0) * y_m;
} else {
tmp = sinh(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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 1e-167) tmp = Float64((fma(fma(0.019444444444444445, Float64(x * x), 0.16666666666666666), Float64(x * x), 1.0) ^ -1.0) * y_m); else tmp = sinh(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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 1e-167], N[(N[Power[N[(N[(0.019444444444444445 * N[(x * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[Sinh[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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 10^{-167}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.019444444444444445, x \cdot x, 0.16666666666666666\right), x \cdot x, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\sinh y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.3%
Taylor expanded in x around 0
Applied rewrites65.7%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e-167Initial program 72.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites83.8%
if 1e-167 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6464.2
Applied rewrites64.2%
Applied rewrites77.2%
Final simplification75.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(*
(*
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 1e-167)
(*
(pow
(fma
(fma 0.019444444444444445 (* x x) 0.16666666666666666)
(* x x)
1.0)
-1.0)
y_m)
(*
0.5
(*
(fma
(fma
(fma 0.0003968253968253968 (* y_m y_m) 0.016666666666666666)
(* y_m y_m)
0.3333333333333333)
(* y_m y_m)
2.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = (fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 1e-167) {
tmp = pow(fma(fma(0.019444444444444445, (x * x), 0.16666666666666666), (x * x), 1.0), -1.0) * y_m;
} else {
tmp = 0.5 * (fma(fma(fma(0.0003968253968253968, (y_m * y_m), 0.016666666666666666), (y_m * y_m), 0.3333333333333333), (y_m * y_m), 2.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 1e-167) tmp = Float64((fma(fma(0.019444444444444445, Float64(x * x), 0.16666666666666666), Float64(x * x), 1.0) ^ -1.0) * y_m); else tmp = Float64(0.5 * Float64(fma(fma(fma(0.0003968253968253968, Float64(y_m * y_m), 0.016666666666666666), Float64(y_m * y_m), 0.3333333333333333), Float64(y_m * y_m), 2.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 1e-167], N[(N[Power[N[(N[(0.019444444444444445 * N[(x * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[(0.5 * N[(N[(N[(N[(0.0003968253968253968 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.016666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * y$95$m), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 10^{-167}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.019444444444444445, x \cdot x, 0.16666666666666666\right), x \cdot x, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0003968253968253968, y\_m \cdot y\_m, 0.016666666666666666\right), y\_m \cdot y\_m, 0.3333333333333333\right), y\_m \cdot y\_m, 2\right) \cdot y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.3%
Taylor expanded in x around 0
Applied rewrites65.7%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e-167Initial program 72.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites83.8%
if 1e-167 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6464.2
Applied rewrites64.2%
Taylor expanded in y around 0
Applied rewrites69.2%
Final simplification73.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(*
(*
(fma 0.16666666666666666 (* y_m y_m) 1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 1e-167)
(*
(pow
(fma
(fma 0.019444444444444445 (* x x) 0.16666666666666666)
(* x x)
1.0)
-1.0)
y_m)
(*
0.5
(*
(fma
(fma
(fma 0.0003968253968253968 (* y_m y_m) 0.016666666666666666)
(* y_m y_m)
0.3333333333333333)
(* y_m y_m)
2.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = (fma(0.16666666666666666, (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 1e-167) {
tmp = pow(fma(fma(0.019444444444444445, (x * x), 0.16666666666666666), (x * x), 1.0), -1.0) * y_m;
} else {
tmp = 0.5 * (fma(fma(fma(0.0003968253968253968, (y_m * y_m), 0.016666666666666666), (y_m * y_m), 0.3333333333333333), (y_m * y_m), 2.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 1e-167) tmp = Float64((fma(fma(0.019444444444444445, Float64(x * x), 0.16666666666666666), Float64(x * x), 1.0) ^ -1.0) * y_m); else tmp = Float64(0.5 * Float64(fma(fma(fma(0.0003968253968253968, Float64(y_m * y_m), 0.016666666666666666), Float64(y_m * y_m), 0.3333333333333333), Float64(y_m * y_m), 2.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 1e-167], N[(N[Power[N[(N[(0.019444444444444445 * N[(x * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[(0.5 * N[(N[(N[(N[(0.0003968253968253968 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.016666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * y$95$m), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\left(\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 10^{-167}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.019444444444444445, x \cdot x, 0.16666666666666666\right), x \cdot x, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0003968253968253968, y\_m \cdot y\_m, 0.016666666666666666\right), y\_m \cdot y\_m, 0.3333333333333333\right), y\_m \cdot y\_m, 2\right) \cdot y\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.3%
Taylor expanded in x around 0
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites62.4%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e-167Initial program 72.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites83.8%
if 1e-167 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6464.2
Applied rewrites64.2%
Taylor expanded in y around 0
Applied rewrites69.2%
Final simplification71.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(*
(*
(fma 0.16666666666666666 (* y_m y_m) 1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 1e-167)
(*
(pow
(fma
(fma 0.019444444444444445 (* x x) 0.16666666666666666)
(* x x)
1.0)
-1.0)
y_m)
(*
(fma
(* (fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666) y_m)
y_m
1.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = (fma(0.16666666666666666, (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 1e-167) {
tmp = pow(fma(fma(0.019444444444444445, (x * x), 0.16666666666666666), (x * x), 1.0), -1.0) * y_m;
} else {
tmp = fma((fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 1e-167) tmp = Float64((fma(fma(0.019444444444444445, Float64(x * x), 0.16666666666666666), Float64(x * x), 1.0) ^ -1.0) * y_m); else tmp = Float64(fma(Float64(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 1e-167], N[(N[Power[N[(N[(0.019444444444444445 * N[(x * x), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision] * y$95$m + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\left(\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 10^{-167}:\\
\;\;\;\;{\left(\mathsf{fma}\left(\mathsf{fma}\left(0.019444444444444445, x \cdot x, 0.16666666666666666\right), x \cdot x, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right) \cdot y\_m, y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.3%
Taylor expanded in x around 0
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites62.4%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e-167Initial program 72.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites83.8%
if 1e-167 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites83.6%
Taylor expanded in x around 0
Applied rewrites67.9%
Applied rewrites67.9%
Final simplification71.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(*
(*
(fma 0.16666666666666666 (* y_m y_m) 1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 4e-11)
(* (pow (fma (* x x) 0.16666666666666666 1.0) -1.0) y_m)
(*
(fma
(* (fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666) y_m)
y_m
1.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = (fma(0.16666666666666666, (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 4e-11) {
tmp = pow(fma((x * x), 0.16666666666666666, 1.0), -1.0) * y_m;
} else {
tmp = fma((fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 4e-11) tmp = Float64((fma(Float64(x * x), 0.16666666666666666, 1.0) ^ -1.0) * y_m); else tmp = Float64(fma(Float64(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 4e-11], N[(N[Power[N[(N[(x * x), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision] * y$95$m + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\left(\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;{\left(\mathsf{fma}\left(x \cdot x, 0.16666666666666666, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right) \cdot y\_m, y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.3%
Taylor expanded in x around 0
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites62.4%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 76.6%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.3
Applied rewrites99.3%
Applied rewrites99.3%
Taylor expanded in x around 0
Applied rewrites81.8%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.7%
Taylor expanded in x around 0
Applied rewrites67.3%
Applied rewrites67.3%
Final simplification71.5%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -1e-147)
(* (fma (* -0.16666666666666666 x) x 1.0) y_m)
(if (<= t_0 4e-11)
(* (pow (fma (* x x) 0.16666666666666666 1.0) -1.0) y_m)
(*
(fma
(* (fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666) y_m)
y_m
1.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -1e-147) {
tmp = fma((-0.16666666666666666 * x), x, 1.0) * y_m;
} else if (t_0 <= 4e-11) {
tmp = pow(fma((x * x), 0.16666666666666666, 1.0), -1.0) * y_m;
} else {
tmp = fma((fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -1e-147) tmp = Float64(fma(Float64(-0.16666666666666666 * x), x, 1.0) * y_m); elseif (t_0 <= 4e-11) tmp = Float64((fma(Float64(x * x), 0.16666666666666666, 1.0) ^ -1.0) * y_m); else tmp = Float64(fma(Float64(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -1e-147], N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 4e-11], N[(N[Power[N[(N[(x * x), $MachinePrecision] * 0.16666666666666666 + 1.0), $MachinePrecision], -1.0], $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision] * y$95$m + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-147}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666 \cdot x, x, 1\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;{\left(\mathsf{fma}\left(x \cdot x, 0.16666666666666666, 1\right)\right)}^{-1} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right) \cdot y\_m, y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.9999999999999997e-148Initial program 99.2%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6425.4
Applied rewrites25.4%
Taylor expanded in x around 0
Applied rewrites32.0%
Applied rewrites32.0%
if -9.9999999999999997e-148 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 76.6%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.3
Applied rewrites99.3%
Applied rewrites99.3%
Taylor expanded in x around 0
Applied rewrites81.8%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.7%
Taylor expanded in x around 0
Applied rewrites67.3%
Applied rewrites67.3%
Final simplification61.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666)
(* y_m y_m)
1.0)
(fma (* x x) -0.16666666666666666 1.0))
y_m)
(if (<= t_0 4e-11) (* (/ (sin x) x) y_m) (sinh 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666), (y_m * y_m), 1.0) * fma((x * x), -0.16666666666666666, 1.0)) * y_m;
} else if (t_0 <= 4e-11) {
tmp = (sin(x) / x) * y_m;
} else {
tmp = sinh(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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666), Float64(y_m * y_m), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0)) * y_m); elseif (t_0 <= 4e-11) tmp = Float64(Float64(sin(x) / x) * y_m); else tmp = sinh(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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 4e-11], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y$95$m), $MachinePrecision], N[Sinh[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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right), y\_m \cdot y\_m, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-11}:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\sinh y\_m\\
\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
lower-*.f64N/A
Applied rewrites89.8%
Taylor expanded in x around 0
Applied rewrites63.9%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 3.99999999999999976e-11Initial program 79.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6498.4
Applied rewrites98.4%
if 3.99999999999999976e-11 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-exp.f64N/A
rec-expN/A
lower-exp.f64N/A
lower-neg.f6478.8
Applied rewrites78.8%
Applied rewrites78.8%
Final simplification84.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -2e-213)
(* (fma (* -0.16666666666666666 x) x 1.0) y_m)
(if (<= t_0 5e-318)
(* (* (/ -1.0 x) y_m) (- x))
(*
(fma
(* (fma 0.008333333333333333 (* y_m y_m) 0.16666666666666666) y_m)
y_m
1.0)
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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -2e-213) {
tmp = fma((-0.16666666666666666 * x), x, 1.0) * y_m;
} else if (t_0 <= 5e-318) {
tmp = ((-1.0 / x) * y_m) * -x;
} else {
tmp = fma((fma(0.008333333333333333, (y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -2e-213) tmp = Float64(fma(Float64(-0.16666666666666666 * x), x, 1.0) * y_m); elseif (t_0 <= 5e-318) tmp = Float64(Float64(Float64(-1.0 / x) * y_m) * Float64(-x)); else tmp = Float64(fma(Float64(fma(0.008333333333333333, Float64(y_m * y_m), 0.16666666666666666) * y_m), y_m, 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 5e-318], N[(N[(N[(-1.0 / x), $MachinePrecision] * y$95$m), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(N[(N[(0.008333333333333333 * N[(y$95$m * y$95$m), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * y$95$m), $MachinePrecision] * y$95$m + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666 \cdot x, x, 1\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-318}:\\
\;\;\;\;\left(\frac{-1}{x} \cdot y\_m\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, y\_m \cdot y\_m, 0.16666666666666666\right) \cdot y\_m, y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Applied rewrites35.7%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999987e-318Initial program 63.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites88.0%
if 4.9999987e-318 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.7%
Taylor expanded in x around 0
Applied rewrites65.9%
Applied rewrites65.9%
Final simplification60.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -2e-213)
(* (fma (* -0.16666666666666666 x) x 1.0) y_m)
(if (<= t_0 5e-318)
(* (* (/ -1.0 x) y_m) (- x))
(* (fma (* (* y_m y_m) 0.008333333333333333) (* y_m y_m) 1.0) 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -2e-213) {
tmp = fma((-0.16666666666666666 * x), x, 1.0) * y_m;
} else if (t_0 <= 5e-318) {
tmp = ((-1.0 / x) * y_m) * -x;
} else {
tmp = fma(((y_m * y_m) * 0.008333333333333333), (y_m * y_m), 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -2e-213) tmp = Float64(fma(Float64(-0.16666666666666666 * x), x, 1.0) * y_m); elseif (t_0 <= 5e-318) tmp = Float64(Float64(Float64(-1.0 / x) * y_m) * Float64(-x)); else tmp = Float64(fma(Float64(Float64(y_m * y_m) * 0.008333333333333333), Float64(y_m * y_m), 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 5e-318], N[(N[(N[(-1.0 / x), $MachinePrecision] * y$95$m), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(N[(N[(y$95$m * y$95$m), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666 \cdot x, x, 1\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-318}:\\
\;\;\;\;\left(\frac{-1}{x} \cdot y\_m\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(y\_m \cdot y\_m\right) \cdot 0.008333333333333333, y\_m \cdot y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Applied rewrites35.7%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999987e-318Initial program 63.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites88.0%
if 4.9999987e-318 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.7%
Taylor expanded in x around 0
Applied rewrites65.9%
Taylor expanded in y around inf
Applied rewrites65.9%
Final simplification60.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 (/ (* (sin x) (sinh y_m)) x)))
(*
y_s
(if (<= t_0 -2e-213)
(* (fma (* -0.16666666666666666 x) x 1.0) y_m)
(if (<= t_0 5e-318)
(* (* (/ -1.0 x) y_m) (- x))
(* (fma 0.16666666666666666 (* y_m y_m) 1.0) 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 = (sin(x) * sinh(y_m)) / x;
double tmp;
if (t_0 <= -2e-213) {
tmp = fma((-0.16666666666666666 * x), x, 1.0) * y_m;
} else if (t_0 <= 5e-318) {
tmp = ((-1.0 / x) * y_m) * -x;
} else {
tmp = fma(0.16666666666666666, (y_m * y_m), 1.0) * 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(sin(x) * sinh(y_m)) / x) tmp = 0.0 if (t_0 <= -2e-213) tmp = Float64(fma(Float64(-0.16666666666666666 * x), x, 1.0) * y_m); elseif (t_0 <= 5e-318) tmp = Float64(Float64(Float64(-1.0 / x) * y_m) * Float64(-x)); else tmp = Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * 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[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(y$95$s * If[LessEqual[t$95$0, -2e-213], N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$0, 5e-318], N[(N[(N[(-1.0 / x), $MachinePrecision] * y$95$m), $MachinePrecision] * (-x)), $MachinePrecision], N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $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{\sin x \cdot \sinh y\_m}{x}\\
y\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666 \cdot x, x, 1\right) \cdot y\_m\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-318}:\\
\;\;\;\;\left(\frac{-1}{x} \cdot y\_m\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Applied rewrites35.7%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999987e-318Initial program 63.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
Applied rewrites98.9%
Taylor expanded in x around 0
Applied rewrites88.0%
if 4.9999987e-318 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.7%
Taylor expanded in x around 0
Applied rewrites65.9%
Taylor expanded in y around 0
Applied rewrites60.9%
Final simplification58.2%
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
(FPCore (y_s x y_m)
:precision binary64
(*
y_s
(if (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
(* (fma (* -0.16666666666666666 x) x 1.0) y_m)
(* (fma 0.16666666666666666 (* y_m y_m) 1.0) y_m))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
tmp = fma((-0.16666666666666666 * x), x, 1.0) * y_m;
} else {
tmp = fma(0.16666666666666666, (y_m * y_m), 1.0) * y_m;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213) tmp = Float64(fma(Float64(-0.16666666666666666 * x), x, 1.0) * y_m); else tmp = Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(N[(-0.16666666666666666 * x), $MachinePrecision] * x + 1.0), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * y$95$m), $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{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666 \cdot x, x, 1\right) \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Applied rewrites35.7%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.5%
Taylor expanded in x around 0
Applied rewrites58.0%
Taylor expanded in y around 0
Applied rewrites55.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 (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
(* (* -0.16666666666666666 (* x x)) y_m)
(* (fma 0.16666666666666666 (* y_m y_m) 1.0) y_m))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
tmp = (-0.16666666666666666 * (x * x)) * y_m;
} else {
tmp = fma(0.16666666666666666, (y_m * y_m), 1.0) * y_m;
}
return y_s * tmp;
}
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213) tmp = Float64(Float64(-0.16666666666666666 * Float64(x * x)) * y_m); else tmp = Float64(fma(0.16666666666666666, Float64(y_m * y_m), 1.0) * 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_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(0.16666666666666666 * N[(y$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * y$95$m), $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{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y\_m \cdot y\_m, 1\right) \cdot y\_m\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Taylor expanded in x around inf
Applied rewrites12.9%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.5%
Taylor expanded in x around 0
Applied rewrites58.0%
Taylor expanded in y around 0
Applied rewrites55.1%
Final simplification39.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 (<= (/ (* (sin x) (sinh y_m)) x) -2e-213)
(* (* -0.16666666666666666 (* x x)) y_m)
(* 1.0 y_m))))y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
double tmp;
if (((sin(x) * sinh(y_m)) / x) <= -2e-213) {
tmp = (-0.16666666666666666 * (x * x)) * y_m;
} else {
tmp = 1.0 * y_m;
}
return y_s * tmp;
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8) :: tmp
if (((sin(x) * sinh(y_m)) / x) <= (-2d-213)) then
tmp = ((-0.16666666666666666d0) * (x * x)) * y_m
else
tmp = 1.0d0 * y_m
end if
code = y_s * tmp
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
double tmp;
if (((Math.sin(x) * Math.sinh(y_m)) / x) <= -2e-213) {
tmp = (-0.16666666666666666 * (x * x)) * y_m;
} else {
tmp = 1.0 * y_m;
}
return y_s * tmp;
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): tmp = 0 if ((math.sin(x) * math.sinh(y_m)) / x) <= -2e-213: tmp = (-0.16666666666666666 * (x * x)) * y_m else: tmp = 1.0 * y_m return y_s * tmp
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y_m)) / x) <= -2e-213) tmp = Float64(Float64(-0.16666666666666666 * Float64(x * x)) * y_m); else tmp = Float64(1.0 * y_m); end return Float64(y_s * tmp) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp_2 = code(y_s, x, y_m) tmp = 0.0; if (((sin(x) * sinh(y_m)) / x) <= -2e-213) tmp = (-0.16666666666666666 * (x * x)) * y_m; else tmp = 1.0 * y_m; end tmp_2 = y_s * tmp; end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y$95$m], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-213], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], N[(1.0 * y$95$m), $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{\sin x \cdot \sinh y\_m}{x} \leq -2 \cdot 10^{-213}:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot y\_m\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\_m\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-213Initial program 98.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6433.9
Applied rewrites33.9%
Taylor expanded in x around 0
Applied rewrites35.7%
Taylor expanded in x around inf
Applied rewrites12.9%
if -1.9999999999999999e-213 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6460.0
Applied rewrites60.0%
Taylor expanded in x around 0
Applied rewrites32.0%
Final simplification24.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 (* (sin x) (/ (sinh y_m) x))))
y\_m = fabs(y);
y\_s = copysign(1.0, y);
double code(double y_s, double x, double y_m) {
return y_s * (sin(x) * (sinh(y_m) / x));
}
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
real(8) function code(y_s, x, y_m)
real(8), intent (in) :: y_s
real(8), intent (in) :: x
real(8), intent (in) :: y_m
code = y_s * (sin(x) * (sinh(y_m) / x))
end function
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
public static double code(double y_s, double x, double y_m) {
return y_s * (Math.sin(x) * (Math.sinh(y_m) / x));
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): return y_s * (math.sin(x) * (math.sinh(y_m) / x))
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * Float64(sin(x) * Float64(sinh(y_m) / x))) end
y\_m = abs(y); y\_s = sign(y) * abs(1.0); function tmp = code(y_s, x, y_m) tmp = y_s * (sin(x) * (sinh(y_m) / x)); end
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[y$95$s_, x_, y$95$m_] := N[(y$95$s * N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y$95$m], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \left(\sin x \cdot \frac{\sinh y\_m}{x}\right)
\end{array}
Initial program 90.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Final simplification99.9%
y\_m = (fabs.f64 y) y\_s = (copysign.f64 #s(literal 1 binary64) y) (FPCore (y_s x y_m) :precision binary64 (* y_s (* 1.0 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 * (1.0 * 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 * (1.0d0 * 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 * (1.0 * y_m);
}
y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) def code(y_s, x, y_m): return y_s * (1.0 * y_m)
y\_m = abs(y) y\_s = copysign(1.0, y) function code(y_s, x, y_m) return Float64(y_s * Float64(1.0 * 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 * (1.0 * 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 * N[(1.0 * y$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
y\_s \cdot \left(1 \cdot y\_m\right)
\end{array}
Initial program 90.2%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6450.1
Applied rewrites50.1%
Taylor expanded in x around 0
Applied rewrites29.7%
(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 2024271
(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))