
(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 21 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}
(FPCore (x y) :precision binary64 (/ (sinh y) (/ x (sin x))))
double code(double x, double y) {
return sinh(y) / (x / sin(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sinh(y) / (x / sin(x))
end function
public static double code(double x, double y) {
return Math.sinh(y) / (x / Math.sin(x));
}
def code(x, y): return math.sinh(y) / (x / math.sin(x))
function code(x, y) return Float64(sinh(y) / Float64(x / sin(x))) end
function tmp = code(x, y) tmp = sinh(y) / (x / sin(x)); end
code[x_, y_] := N[(N[Sinh[y], $MachinePrecision] / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sinh y}{\frac{x}{\sin x}}
\end{array}
Initial program 90.8%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(/ (* (sinh y) (* x (* x (* x -0.16666666666666666)))) x)
(if (<= t_0 1e-5)
(* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
(/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (sinh(y) * (x * (x * (x * -0.16666666666666666)))) / x;
} else if (t_0 <= 1e-5) {
tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y) * Float64(x * Float64(x * Float64(x * -0.16666666666666666)))) / x); elseif (t_0 <= 1e-5) tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 1e-5], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\sinh y \cdot \left(x \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 10^{-5}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\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-*.f6477.6
Applied rewrites77.6%
Taylor expanded in x around inf
Applied rewrites32.8%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.00000000000000008e-5Initial program 82.2%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites99.8%
if 1.00000000000000008e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites84.6%
Final simplification80.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(/ (* (sinh y) (* x (* x (* x -0.16666666666666666)))) x)
(if (<= t_0 2e-25) (/ y (/ x (sin x))) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (sinh(y) * (x * (x * (x * -0.16666666666666666)))) / x;
} else if (t_0 <= 2e-25) {
tmp = y / (x / sin(x));
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
public static double code(double x, double y) {
double t_0 = (Math.sinh(y) * Math.sin(x)) / x;
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = (Math.sinh(y) * (x * (x * (x * -0.16666666666666666)))) / x;
} else if (t_0 <= 2e-25) {
tmp = y / (x / Math.sin(x));
} else {
tmp = Math.sinh(y) / 1.0;
}
return tmp;
}
def code(x, y): t_0 = (math.sinh(y) * math.sin(x)) / x tmp = 0 if t_0 <= -math.inf: tmp = (math.sinh(y) * (x * (x * (x * -0.16666666666666666)))) / x elif t_0 <= 2e-25: tmp = y / (x / math.sin(x)) else: tmp = math.sinh(y) / 1.0 return tmp
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y) * Float64(x * Float64(x * Float64(x * -0.16666666666666666)))) / x); elseif (t_0 <= 2e-25) tmp = Float64(y / Float64(x / sin(x))); else tmp = Float64(sinh(y) / 1.0); end return tmp end
function tmp_2 = code(x, y) t_0 = (sinh(y) * sin(x)) / x; tmp = 0.0; if (t_0 <= -Inf) tmp = (sinh(y) * (x * (x * (x * -0.16666666666666666)))) / x; elseif (t_0 <= 2e-25) tmp = y / (x / sin(x)); else tmp = sinh(y) / 1.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\sinh y \cdot \left(x \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\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-*.f6477.6
Applied rewrites77.6%
Taylor expanded in x around inf
Applied rewrites32.8%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000008e-25Initial program 81.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.4
Applied rewrites99.4%
Applied rewrites99.4%
if 2.00000000000000008e-25 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites85.3%
Final simplification80.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(/
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(fma y (* y 0.008333333333333333) 0.16666666666666666)
(* y (* y y))
y))
x)
(if (<= t_0 2e-25) (/ y (/ x (sin x))) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sinh(y) * 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, (y * 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y)) / x;
} else if (t_0 <= 2e-25) {
tmp = y / (x / sin(x));
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * 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(y, Float64(y * 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y)) / x); elseif (t_0 <= 2e-25) tmp = Float64(y / Float64(x / sin(x))); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, 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[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\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, y \cdot 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6475.2
Applied rewrites75.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites61.2%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000008e-25Initial program 81.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.4
Applied rewrites99.4%
Applied rewrites99.4%
if 2.00000000000000008e-25 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites85.3%
Final simplification87.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(/
(*
(fma
(* x x)
(*
x
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666))
x)
(fma
(fma y (* y 0.008333333333333333) 0.16666666666666666)
(* y (* y y))
y))
x)
(if (<= t_0 2e-25) (* y (/ (sin x) x)) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sinh(y) * 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, (y * 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y)) / x;
} else if (t_0 <= 2e-25) {
tmp = y * (sin(x) / x);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * 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(y, Float64(y * 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y)) / x); elseif (t_0 <= 2e-25) tmp = Float64(y * Float64(sin(x) / x)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, 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[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\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, y \cdot 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6475.2
Applied rewrites75.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites61.2%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.00000000000000008e-25Initial program 81.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.4
Applied rewrites99.4%
if 2.00000000000000008e-25 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites85.3%
Final simplification87.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-235)
(/
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(fma
(* y y)
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
y))
x)
(if (<= t_0 0.0)
(*
(*
(fma y (* (* y y) 0.16666666666666666) y)
(* y (fma 0.16666666666666666 (* y y) -1.0)))
(/ 1.0 (* y (fma y (* y 0.16666666666666666) -1.0))))
(*
(/ (fma y (* y (* y 0.16666666666666666)) y) x)
(fma
(* x x)
(* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))
x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-235) {
tmp = (fma(x, (-0.16666666666666666 * (x * x)), x) * fma((y * y), (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y)) / x;
} else if (t_0 <= 0.0) {
tmp = (fma(y, ((y * y) * 0.16666666666666666), y) * (y * fma(0.16666666666666666, (y * y), -1.0))) * (1.0 / (y * fma(y, (y * 0.16666666666666666), -1.0)));
} else {
tmp = (fma(y, (y * (y * 0.16666666666666666)), y) / x) * fma((x * x), (x * fma((x * x), 0.008333333333333333, -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -5e-235) tmp = Float64(Float64(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y)) / x); elseif (t_0 <= 0.0) tmp = Float64(Float64(fma(y, Float64(Float64(y * y) * 0.16666666666666666), y) * Float64(y * fma(0.16666666666666666, Float64(y * y), -1.0))) * Float64(1.0 / Float64(y * fma(y, Float64(y * 0.16666666666666666), -1.0)))); else tmp = Float64(Float64(fma(y, Float64(y * Float64(y * 0.16666666666666666)), y) / x) * fma(Float64(x * x), Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-235], N[(N[(N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(y * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-235}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\left(\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right) \cdot \left(y \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right)\right)\right) \cdot \frac{1}{y \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot 0.16666666666666666\right), y\right)}{x} \cdot \mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial program 99.9%
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-*.f6468.7
Applied rewrites68.7%
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
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.0
Applied rewrites60.0%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 62.7%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites44.9%
Applied rewrites25.4%
Taylor expanded in x around 0
Applied rewrites49.6%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites82.2%
Applied rewrites90.8%
Taylor expanded in x around 0
Applied rewrites72.3%
Final simplification62.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-235)
(/
(*
(fma
(fma y (* y 0.008333333333333333) 0.16666666666666666)
(* y (* y y))
y)
(fma x (* x (* x -0.16666666666666666)) x))
x)
(if (<= t_0 0.0)
(*
(*
(fma y (* (* y y) 0.16666666666666666) y)
(* y (fma 0.16666666666666666 (* y y) -1.0)))
(/ 1.0 (* y (fma y (* y 0.16666666666666666) -1.0))))
(*
(/ (fma y (* y (* y 0.16666666666666666)) y) x)
(fma
(* x x)
(* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))
x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-235) {
tmp = (fma(fma(y, (y * 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) * fma(x, (x * (x * -0.16666666666666666)), x)) / x;
} else if (t_0 <= 0.0) {
tmp = (fma(y, ((y * y) * 0.16666666666666666), y) * (y * fma(0.16666666666666666, (y * y), -1.0))) * (1.0 / (y * fma(y, (y * 0.16666666666666666), -1.0)));
} else {
tmp = (fma(y, (y * (y * 0.16666666666666666)), y) / x) * fma((x * x), (x * fma((x * x), 0.008333333333333333, -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -5e-235) tmp = Float64(Float64(fma(fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) * fma(x, Float64(x * Float64(x * -0.16666666666666666)), x)) / x); elseif (t_0 <= 0.0) tmp = Float64(Float64(fma(y, Float64(Float64(y * y) * 0.16666666666666666), y) * Float64(y * fma(0.16666666666666666, Float64(y * y), -1.0))) * Float64(1.0 / Float64(y * fma(y, Float64(y * 0.16666666666666666), -1.0)))); else tmp = Float64(Float64(fma(y, Float64(y * Float64(y * 0.16666666666666666)), y) / x) * fma(Float64(x * x), Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-235], N[(N[(N[(N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(y * N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-235}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right) \cdot \mathsf{fma}\left(x, x \cdot \left(x \cdot -0.16666666666666666\right), x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\left(\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right) \cdot \left(y \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right)\right)\right) \cdot \frac{1}{y \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot 0.16666666666666666\right), y\right)}{x} \cdot \mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial 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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6485.1
Applied rewrites85.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 62.7%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites44.9%
Applied rewrites25.4%
Taylor expanded in x around 0
Applied rewrites49.6%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites82.2%
Applied rewrites90.8%
Taylor expanded in x around 0
Applied rewrites72.3%
Final simplification61.6%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-235)
(/
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(fma
(* y y)
(*
y
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666))
y))
x)
(/ (sinh y) 1.0)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = (fma(x, (-0.16666666666666666 * (x * x)), x) * fma((y * y), (y * fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y)) / x;
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(Float64(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * fma(Float64(y * y), Float64(y * fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666)), y)) / x); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-235], N[(N[(N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial program 99.9%
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-*.f6468.7
Applied rewrites68.7%
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
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.0
Applied rewrites60.0%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.2%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites64.2%
Final simplification62.6%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-283)
(*
(/
(fma
(* y y)
(* y (fma y (* y 0.008333333333333333) 0.16666666666666666))
y)
x)
(fma (* x -0.16666666666666666) (* x x) x))
(*
(/ (fma y (* y (* y 0.16666666666666666)) y) x)
(fma
(* x x)
(* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))
x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-283) {
tmp = (fma((y * y), (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), y) / x) * fma((x * -0.16666666666666666), (x * x), x);
} else {
tmp = (fma(y, (y * (y * 0.16666666666666666)), y) / x) * fma((x * x), (x * fma((x * x), 0.008333333333333333, -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-283) tmp = Float64(Float64(fma(Float64(y * y), Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), y) / x) * fma(Float64(x * -0.16666666666666666), Float64(x * x), x)); else tmp = Float64(Float64(fma(y, Float64(y * Float64(y * 0.16666666666666666)), y) / x) * fma(Float64(x * x), Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)), x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-283], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(x * -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-283}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), y\right)}{x} \cdot \mathsf{fma}\left(x \cdot -0.16666666666666666, x \cdot x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot 0.16666666666666666\right), y\right)}{x} \cdot \mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.0000000000000001e-283Initial program 85.4%
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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites55.7%
if 5.0000000000000001e-283 < (/.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
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites82.0%
Applied rewrites90.7%
Taylor expanded in x around 0
Applied rewrites73.0%
Final simplification62.1%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -1e-291)
(/
(*
(fma
(fma y (* y 0.008333333333333333) 0.16666666666666666)
(* y (* y y))
y)
(* x (* -0.16666666666666666 (* x x))))
x)
(*
(/ (fma y (* y (* y 0.16666666666666666)) y) x)
(fma
(* x x)
(* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))
x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -1e-291) {
tmp = (fma(fma(y, (y * 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) * (x * (-0.16666666666666666 * (x * x)))) / x;
} else {
tmp = (fma(y, (y * (y * 0.16666666666666666)), y) / x) * fma((x * x), (x * fma((x * x), 0.008333333333333333, -0.16666666666666666)), x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -1e-291) tmp = Float64(Float64(fma(fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) * Float64(x * Float64(-0.16666666666666666 * Float64(x * x)))) / x); else tmp = Float64(Float64(fma(y, Float64(y * Float64(y * 0.16666666666666666)), y) / x) * fma(Float64(x * x), Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)), x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-291], N[(N[(N[(N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-291}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right) \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot 0.16666666666666666\right), y\right)}{x} \cdot \mathsf{fma}\left(x \cdot x, x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.99999999999999962e-292Initial program 99.8%
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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6486.1
Applied rewrites86.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6456.8
Applied rewrites56.8%
Taylor expanded in x around inf
Applied rewrites18.2%
if -9.99999999999999962e-292 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 84.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites88.7%
Applied rewrites94.1%
Taylor expanded in x around 0
Applied rewrites63.2%
Final simplification44.7%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -1e-291)
(/
(*
(fma
(fma y (* y 0.008333333333333333) 0.16666666666666666)
(* y (* y y))
y)
(* x (* -0.16666666666666666 (* x x))))
x)
(*
(fma (* y y) (* y 0.16666666666666666) y)
(fma
x
(* x (fma 0.008333333333333333 (* x x) -0.16666666666666666))
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -1e-291) {
tmp = (fma(fma(y, (y * 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) * (x * (-0.16666666666666666 * (x * x)))) / x;
} else {
tmp = fma((y * y), (y * 0.16666666666666666), y) * fma(x, (x * fma(0.008333333333333333, (x * x), -0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -1e-291) tmp = Float64(Float64(fma(fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) * Float64(x * Float64(-0.16666666666666666 * Float64(x * x)))) / x); else tmp = Float64(fma(Float64(y * y), Float64(y * 0.16666666666666666), y) * fma(x, Float64(x * fma(0.008333333333333333, Float64(x * x), -0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-291], N[(N[(N[(N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(x * N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-291}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right) \cdot \left(x \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.99999999999999962e-292Initial program 99.8%
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
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6486.1
Applied rewrites86.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6456.8
Applied rewrites56.8%
Taylor expanded in x around inf
Applied rewrites18.2%
if -9.99999999999999962e-292 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 84.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites88.7%
Taylor expanded in x around 0
Applied rewrites57.4%
Final simplification41.3%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-283)
(*
(fma x (* -0.16666666666666666 (* x x)) x)
(/ (fma y (* y (* y 0.16666666666666666)) y) x))
(*
(fma (* y y) (* y 0.16666666666666666) y)
(fma
x
(* x (fma 0.008333333333333333 (* x x) -0.16666666666666666))
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-283) {
tmp = fma(x, (-0.16666666666666666 * (x * x)), x) * (fma(y, (y * (y * 0.16666666666666666)), y) / x);
} else {
tmp = fma((y * y), (y * 0.16666666666666666), y) * fma(x, (x * fma(0.008333333333333333, (x * x), -0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-283) tmp = Float64(fma(x, Float64(-0.16666666666666666 * Float64(x * x)), x) * Float64(fma(y, Float64(y * Float64(y * 0.16666666666666666)), y) / x)); else tmp = Float64(fma(Float64(y * y), Float64(y * 0.16666666666666666), y) * fma(x, Float64(x * fma(0.008333333333333333, Float64(x * x), -0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-283], N[(N[(x * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(x * N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-283}:\\
\;\;\;\;\mathsf{fma}\left(x, -0.16666666666666666 \cdot \left(x \cdot x\right), x\right) \cdot \frac{\mathsf{fma}\left(y, y \cdot \left(y \cdot 0.16666666666666666\right), y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.0000000000000001e-283Initial program 85.4%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites86.2%
Applied rewrites89.7%
Taylor expanded in x around 0
Applied rewrites54.5%
if 5.0000000000000001e-283 < (/.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
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites82.0%
Taylor expanded in x around 0
Applied rewrites64.3%
Final simplification58.1%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-236)
(*
y
(fma
(* x x)
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666)
1.0))
(*
(fma (* y y) (* y 0.16666666666666666) y)
(fma
x
(* x (fma 0.008333333333333333 (* x x) -0.16666666666666666))
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-236) {
tmp = y * fma((x * x), fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0);
} else {
tmp = fma((y * y), (y * 0.16666666666666666), y) * fma(x, (x * fma(0.008333333333333333, (x * x), -0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-236) tmp = Float64(y * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0)); else tmp = Float64(fma(Float64(y * y), Float64(y * 0.16666666666666666), y) * fma(x, Float64(x * fma(0.008333333333333333, Float64(x * x), -0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-236], N[(y * 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], N[(N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(x * N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-236}:\\
\;\;\;\;y \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{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right) \cdot \mathsf{fma}\left(x, x \cdot \mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999998e-236Initial program 85.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6466.2
Applied rewrites66.2%
Taylor expanded in x around 0
Applied rewrites41.0%
if 4.9999999999999998e-236 < (/.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
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites80.8%
Taylor expanded in x around 0
Applied rewrites67.4%
Final simplification50.2%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 4e-152)
(*
y
(fma
(* x x)
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666)
1.0))
(*
(fma (* y y) (* y 0.16666666666666666) y)
(fma x (* x (* (* x x) 0.008333333333333333)) 1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 4e-152) {
tmp = y * fma((x * x), fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0);
} else {
tmp = fma((y * y), (y * 0.16666666666666666), y) * fma(x, (x * ((x * x) * 0.008333333333333333)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 4e-152) tmp = Float64(y * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0)); else tmp = Float64(fma(Float64(y * y), Float64(y * 0.16666666666666666), y) * fma(x, Float64(x * Float64(Float64(x * x) * 0.008333333333333333)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 4e-152], N[(y * 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], N[(N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 4 \cdot 10^{-152}:\\
\;\;\;\;y \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{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right) \cdot \mathsf{fma}\left(x, x \cdot \left(\left(x \cdot x\right) \cdot 0.008333333333333333\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.00000000000000026e-152Initial program 86.2%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6467.0
Applied rewrites67.0%
Taylor expanded in x around 0
Applied rewrites40.7%
if 4.00000000000000026e-152 < (/.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
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites79.9%
Taylor expanded in x around 0
Applied rewrites58.9%
Taylor expanded in x around 0
Applied rewrites69.3%
Taylor expanded in x around inf
Applied rewrites69.3%
Final simplification50.2%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -2e-180)
(*
y
(fma
(* x x)
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666)
1.0))
(fma y (* (* y y) 0.16666666666666666) y)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -2e-180) {
tmp = y * fma((x * x), fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0);
} else {
tmp = fma(y, ((y * y) * 0.16666666666666666), y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-180) tmp = Float64(y * fma(Float64(x * x), fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), 1.0)); else tmp = fma(y, Float64(Float64(y * y) * 0.16666666666666666), y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-180], N[(y * 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], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-180}:\\
\;\;\;\;y \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{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-180Initial program 99.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6435.3
Applied rewrites35.3%
Taylor expanded in x around 0
Applied rewrites40.4%
if -2e-180 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 86.1%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites89.9%
Taylor expanded in x around 0
Applied rewrites53.7%
Final simplification49.3%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-235)
(*
(fma (* y y) (* y 0.16666666666666666) y)
(* -0.16666666666666666 (* x x)))
(fma y (* (* y y) 0.16666666666666666) y)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = fma((y * y), (y * 0.16666666666666666), y) * (-0.16666666666666666 * (x * x));
} else {
tmp = fma(y, ((y * y) * 0.16666666666666666), y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(fma(Float64(y * y), Float64(y * 0.16666666666666666), y) * Float64(-0.16666666666666666 * Float64(x * x))); else tmp = fma(y, Float64(Float64(y * y) * 0.16666666666666666), y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-235], N[(N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right) \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites77.2%
Taylor expanded in x around 0
Applied rewrites54.1%
Taylor expanded in x around inf
Applied rewrites17.4%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.2%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites89.2%
Taylor expanded in x around 0
Applied rewrites54.8%
Final simplification40.6%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -5e-235) (* y (* -0.16666666666666666 (* x x))) (fma y (* (* y y) 0.16666666666666666) y)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = y * (-0.16666666666666666 * (x * x));
} else {
tmp = fma(y, ((y * y) * 0.16666666666666666), y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(y * Float64(-0.16666666666666666 * Float64(x * x))); else tmp = fma(y, Float64(Float64(y * y) * 0.16666666666666666), y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-235], N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;y \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot 0.16666666666666666, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial program 99.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6442.4
Applied rewrites42.4%
Applied rewrites54.9%
Taylor expanded in x around 0
Applied rewrites38.4%
Taylor expanded in x around inf
Applied rewrites16.6%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.2%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites89.2%
Taylor expanded in x around 0
Applied rewrites54.8%
Final simplification40.3%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -5e-235) (* y (* -0.16666666666666666 (* x x))) (* y 1.0)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = y * (-0.16666666666666666 * (x * x));
} else {
tmp = y * 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (((sinh(y) * sin(x)) / x) <= (-5d-235)) then
tmp = y * ((-0.16666666666666666d0) * (x * x))
else
tmp = y * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (((Math.sinh(y) * Math.sin(x)) / x) <= -5e-235) {
tmp = y * (-0.16666666666666666 * (x * x));
} else {
tmp = y * 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if ((math.sinh(y) * math.sin(x)) / x) <= -5e-235: tmp = y * (-0.16666666666666666 * (x * x)) else: tmp = y * 1.0 return tmp
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(y * Float64(-0.16666666666666666 * Float64(x * x))); else tmp = Float64(y * 1.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (((sinh(y) * sin(x)) / x) <= -5e-235) tmp = y * (-0.16666666666666666 * (x * x)); else tmp = y * 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-235], N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;y \cdot \left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-235Initial program 99.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6442.4
Applied rewrites42.4%
Applied rewrites54.9%
Taylor expanded in x around 0
Applied rewrites38.4%
Taylor expanded in x around inf
Applied rewrites16.6%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.2%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6460.5
Applied rewrites60.5%
Taylor expanded in x around 0
Applied rewrites31.5%
Final simplification25.8%
(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}
Initial program 90.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (fma y (* -0.16666666666666666 (* x x)) y))
double code(double x, double y) {
return fma(y, (-0.16666666666666666 * (x * x)), y);
}
function code(x, y) return fma(y, Float64(-0.16666666666666666 * Float64(x * x)), y) end
code[x_, y_] := N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, -0.16666666666666666 \cdot \left(x \cdot x\right), y\right)
\end{array}
Initial program 90.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.6
Applied rewrites53.6%
Applied rewrites64.9%
Taylor expanded in x around 0
Applied rewrites35.6%
Final simplification35.6%
(FPCore (x y) :precision binary64 (* y 1.0))
double code(double x, double y) {
return y * 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y * 1.0d0
end function
public static double code(double x, double y) {
return y * 1.0;
}
def code(x, y): return y * 1.0
function code(x, y) return Float64(y * 1.0) end
function tmp = code(x, y) tmp = y * 1.0; end
code[x_, y_] := N[(y * 1.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 1
\end{array}
Initial program 90.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.6
Applied rewrites53.6%
Taylor expanded in x around 0
Applied rewrites28.9%
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
double code(double x, double y) {
return sin(x) * (sinh(y) / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / x)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / x);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / x)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / x)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / x); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
herbie shell --seed 2024219
(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))