
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* (sin x) (sinh y)) x))
double code(double x, double y) {
return (sin(x) * sinh(y)) / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sin(x) * sinh(y)) / x
end function
public static double code(double x, double y) {
return (Math.sin(x) * Math.sinh(y)) / x;
}
def code(x, y): return (math.sin(x) * math.sinh(y)) / x
function code(x, y) return Float64(Float64(sin(x) * sinh(y)) / x) end
function tmp = code(x, y) tmp = (sin(x) * sinh(y)) / x; end
code[x_, y_] := N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin x \cdot \sinh y}{x}
\end{array}
(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-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/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)))))
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);
}
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(Float64(x * 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 = sinh(y); 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[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $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[Sinh[y], $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(\left(x \cdot x\right) \cdot \left(x \cdot -0.16666666666666666\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}:\\
\;\;\;\;\sinh y\\
\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
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6432.8
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-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/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)))))
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);
}
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);
}
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) 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(Float64(x * x) * Float64(x * -0.16666666666666666))) / x); elseif (t_0 <= 2e-25) tmp = Float64(y / Float64(x / sin(x))); else tmp = sinh(y); 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); 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[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $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(\left(x \cdot x\right) \cdot \left(x \cdot -0.16666666666666666\right)\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\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
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6432.8
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%
lift-sin.f64N/A
clear-numN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6499.4
Applied rewrites99.4%
if 2.00000000000000008e-25 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/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))
(*
(* y (* x x))
(fma
(* (* y y) (* y y))
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= t_0 2e-25) (/ y (/ x (sin x))) (sinh y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (y * (x * x)) * fma(((y * y) * (y * y)), fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (t_0 <= 2e-25) {
tmp = y / (x / sin(x));
} else {
tmp = sinh(y);
}
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(y * Float64(x * x)) * fma(Float64(Float64(y * y) * Float64(y * y)), fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (t_0 <= 2e-25) tmp = Float64(y / Float64(x / sin(x))); else tmp = sinh(y); 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[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y / N[(x / N[Sin[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{\frac{x}{\sin x}}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\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 y around 0
Applied rewrites62.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites29.6%
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%
lift-sin.f64N/A
clear-numN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6499.4
Applied rewrites99.4%
if 2.00000000000000008e-25 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites85.3%
Final simplification79.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(* y (* x x))
(fma
(* (* y y) (* y y))
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= t_0 2e-25) (* y (/ (sin x) x)) (sinh y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (y * (x * x)) * fma(((y * y) * (y * y)), fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (t_0 <= 2e-25) {
tmp = y * (sin(x) / x);
} else {
tmp = sinh(y);
}
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(y * Float64(x * x)) * fma(Float64(Float64(y * y) * Float64(y * y)), fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (t_0 <= 2e-25) tmp = Float64(y * Float64(sin(x) / x)); else tmp = sinh(y); 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[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-25], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[Sinh[y], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-25}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\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 y around 0
Applied rewrites62.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites29.6%
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-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/A
lower-/.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites85.3%
Final simplification79.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x))
(t_1 (* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))))
(if (<= t_0 -2e-206)
(/
(*
y
(fma
(*
(fma (* x x) (* x -0.16666666666666666) x)
(fma (* y y) 0.0001984126984126984 0.008333333333333333))
(* (* y y) (* y y))
(*
(* y y)
(* 0.16666666666666666 (fma x (* (* x x) -0.16666666666666666) x)))))
x)
(if (<= t_0 0.0)
(* y (* (* y y) 0.16666666666666666))
(fma
y
(fma
(fma (* x x) t_1 x)
(*
(/ (* y y) x)
(fma (* y y) 0.008333333333333333 0.16666666666666666))
(* x t_1))
y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = x * fma((x * x), 0.008333333333333333, -0.16666666666666666);
double tmp;
if (t_0 <= -2e-206) {
tmp = (y * fma((fma((x * x), (x * -0.16666666666666666), x) * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), ((y * y) * (y * y)), ((y * y) * (0.16666666666666666 * fma(x, ((x * x) * -0.16666666666666666), x))))) / x;
} else if (t_0 <= 0.0) {
tmp = y * ((y * y) * 0.16666666666666666);
} else {
tmp = fma(y, fma(fma((x * x), t_1, x), (((y * y) / x) * fma((y * y), 0.008333333333333333, 0.16666666666666666)), (x * t_1)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)) tmp = 0.0 if (t_0 <= -2e-206) tmp = Float64(Float64(y * fma(Float64(fma(Float64(x * x), Float64(x * -0.16666666666666666), x) * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), Float64(Float64(y * y) * Float64(y * y)), Float64(Float64(y * y) * Float64(0.16666666666666666 * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x))))) / x); elseif (t_0 <= 0.0) tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); else tmp = fma(y, fma(fma(Float64(x * x), t_1, x), Float64(Float64(Float64(y * y) / x) * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), Float64(x * t_1)), y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-206], N[(N[(y * N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(x * x), $MachinePrecision] * t$95$1 + x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-206}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), \left(y \cdot y\right) \cdot \left(y \cdot y\right), \left(y \cdot y\right) \cdot \left(0.16666666666666666 \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)\right)\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, t\_1, x\right), \frac{y \cdot y}{x} \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), x \cdot t\_1\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2.00000000000000006e-206Initial 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-*.f6470.2
Applied rewrites70.2%
Taylor expanded in y around 0
Applied rewrites60.9%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.5
Applied rewrites41.5%
if -2.00000000000000006e-206 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 65.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 rewrites99.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6444.9
Applied rewrites44.9%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f643.5
Applied rewrites3.5%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6446.5
Applied rewrites46.5%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6475.3
Applied rewrites75.3%
Taylor expanded in y around 0
Applied rewrites70.3%
Applied rewrites73.3%
Final simplification54.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-180)
(*
(* y (* x x))
(fma
(* (* y y) (* y y))
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= t_0 0.0)
(* y (* (* y y) 0.16666666666666666))
(/
(*
(fma
(fma (* x x) 0.008333333333333333 -0.16666666666666666)
(* x (* x x))
x)
(fma
(* y y)
(* y (fma y (* y 0.008333333333333333) 0.16666666666666666))
y))
x)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-180) {
tmp = (y * (x * x)) * fma(((y * y) * (y * y)), fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (t_0 <= 0.0) {
tmp = y * ((y * y) * 0.16666666666666666);
} else {
tmp = (fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), x) * fma((y * y), (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), y)) / x;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-180) tmp = Float64(Float64(y * Float64(x * x)) * fma(Float64(Float64(y * y) * Float64(y * y)), fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (t_0 <= 0.0) tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); else tmp = Float64(Float64(fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), x) * fma(Float64(y * y), Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), y)) / 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, -2e-180], N[(N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-180}:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-180Initial 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-*.f6472.6
Applied rewrites72.6%
Taylor expanded in y around 0
Applied rewrites62.6%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites21.2%
if -2e-180 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 68.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%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6444.0
Applied rewrites44.0%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f643.4
Applied rewrites3.4%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6443.2
Applied rewrites43.2%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6475.3
Applied rewrites75.3%
Taylor expanded in y around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6469.4
Applied rewrites69.4%
Final simplification45.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)) (t_1 (* (* y y) (* y y))))
(if (<= t_0 -2e-180)
(*
(* y (* x x))
(fma
t_1
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= t_0 0.0)
(* y (* (* y y) 0.16666666666666666))
(/
(*
(* y x)
(fma
t_1
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
(fma 0.16666666666666666 (* y y) 1.0)))
x)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = (y * y) * (y * y);
double tmp;
if (t_0 <= -2e-180) {
tmp = (y * (x * x)) * fma(t_1, fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (t_0 <= 0.0) {
tmp = y * ((y * y) * 0.16666666666666666);
} else {
tmp = ((y * x) * fma(t_1, fma((y * y), 0.0001984126984126984, 0.008333333333333333), fma(0.16666666666666666, (y * y), 1.0))) / x;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(Float64(y * y) * Float64(y * y)) tmp = 0.0 if (t_0 <= -2e-180) tmp = Float64(Float64(y * Float64(x * x)) * fma(t_1, fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (t_0 <= 0.0) tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); else tmp = Float64(Float64(Float64(y * x) * fma(t_1, fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), fma(0.16666666666666666, Float64(y * y), 1.0))) / 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]}, Block[{t$95$1 = N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-180], N[(N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] * N[(t$95$1 * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := \left(y \cdot y\right) \cdot \left(y \cdot y\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-180}:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(t\_1, \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot x\right) \cdot \mathsf{fma}\left(t\_1, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), \mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right)\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-180Initial 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-*.f6472.6
Applied rewrites72.6%
Taylor expanded in y around 0
Applied rewrites62.6%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites21.2%
if -2e-180 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 68.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%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6444.0
Applied rewrites44.0%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f643.4
Applied rewrites3.4%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6443.2
Applied rewrites43.2%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial 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-*.f6466.1
Applied rewrites66.1%
Taylor expanded in y around 0
Applied rewrites63.1%
Taylor expanded in x around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-+r+N/A
+-commutativeN/A
lower-fma.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6469.6
Applied rewrites69.6%
Final simplification45.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x))
(t_1 (* (* y y) 0.16666666666666666))
(t_2 (* (* y y) (* y y))))
(if (<= t_0 -2e-180)
(*
(* y (* x x))
(fma
t_2
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(if (<= t_0 0.0)
(* y t_1)
(/
(*
y
(fma
x
(fma
t_2
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
t_1)
x))
x)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = (y * y) * 0.16666666666666666;
double t_2 = (y * y) * (y * y);
double tmp;
if (t_0 <= -2e-180) {
tmp = (y * (x * x)) * fma(t_2, fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else if (t_0 <= 0.0) {
tmp = y * t_1;
} else {
tmp = (y * fma(x, fma(t_2, fma((y * y), 0.0001984126984126984, 0.008333333333333333), t_1), x)) / x;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(Float64(y * y) * 0.16666666666666666) t_2 = Float64(Float64(y * y) * Float64(y * y)) tmp = 0.0 if (t_0 <= -2e-180) tmp = Float64(Float64(y * Float64(x * x)) * fma(t_2, fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); elseif (t_0 <= 0.0) tmp = Float64(y * t_1); else tmp = Float64(Float64(y * fma(x, fma(t_2, fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), t_1), x)) / 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]}, Block[{t$95$1 = N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-180], N[(N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(y * t$95$1), $MachinePrecision], N[(N[(y * N[(x * N[(t$95$2 * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + t$95$1), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := \left(y \cdot y\right) \cdot 0.16666666666666666\\
t_2 := \left(y \cdot y\right) \cdot \left(y \cdot y\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-180}:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(t\_2, \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;y \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(t\_2, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), t\_1\right), x\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -2e-180Initial 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-*.f6472.6
Applied rewrites72.6%
Taylor expanded in y around 0
Applied rewrites62.6%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites21.2%
if -2e-180 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 68.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%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6444.0
Applied rewrites44.0%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f643.4
Applied rewrites3.4%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6443.2
Applied rewrites43.2%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial 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-*.f6466.1
Applied rewrites66.1%
Taylor expanded in y around 0
Applied rewrites63.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites69.6%
Final simplification45.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-235)
(* -0.16666666666666666 (* y (* x x)))
(if (<= t_0 1e-5) y (* y (* (* y y) 0.16666666666666666))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-235) {
tmp = -0.16666666666666666 * (y * (x * x));
} else if (t_0 <= 1e-5) {
tmp = y;
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (sinh(y) * sin(x)) / x
if (t_0 <= (-5d-235)) then
tmp = (-0.16666666666666666d0) * (y * (x * x))
else if (t_0 <= 1d-5) then
tmp = y
else
tmp = y * ((y * y) * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (Math.sinh(y) * Math.sin(x)) / x;
double tmp;
if (t_0 <= -5e-235) {
tmp = -0.16666666666666666 * (y * (x * x));
} else if (t_0 <= 1e-5) {
tmp = y;
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
def code(x, y): t_0 = (math.sinh(y) * math.sin(x)) / x tmp = 0 if t_0 <= -5e-235: tmp = -0.16666666666666666 * (y * (x * x)) elif t_0 <= 1e-5: tmp = y else: tmp = y * ((y * y) * 0.16666666666666666) 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(-0.16666666666666666 * Float64(y * Float64(x * x))); elseif (t_0 <= 1e-5) tmp = y; else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
function tmp_2 = code(x, y) t_0 = (sinh(y) * sin(x)) / x; tmp = 0.0; if (t_0 <= -5e-235) tmp = -0.16666666666666666 * (y * (x * x)); elseif (t_0 <= 1e-5) tmp = y; else tmp = y * ((y * y) * 0.16666666666666666); 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, -5e-235], N[(-0.16666666666666666 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-5], y, N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $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}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\
\mathbf{elif}\;t\_0 \leq 10^{-5}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\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
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in x around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6416.6
Applied rewrites16.6%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.00000000000000008e-5Initial program 74.9%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.2
Applied rewrites99.2%
Taylor expanded in x around 0
Applied rewrites49.9%
*-rgt-identity49.9
Applied rewrites49.9%
if 1.00000000000000008e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
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 rewrites73.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification40.2%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -1e-291)
(/
(*
y
(fma
(*
(fma (* x x) (* x -0.16666666666666666) x)
(fma (* y y) 0.0001984126984126984 0.008333333333333333))
(* (* y y) (* y y))
(*
(* y y)
(* 0.16666666666666666 (fma x (* (* x x) -0.16666666666666666) x)))))
x)
(sinh y)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -1e-291) {
tmp = (y * fma((fma((x * x), (x * -0.16666666666666666), x) * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), ((y * y) * (y * y)), ((y * y) * (0.16666666666666666 * fma(x, ((x * x) * -0.16666666666666666), x))))) / x;
} else {
tmp = sinh(y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -1e-291) tmp = Float64(Float64(y * fma(Float64(fma(Float64(x * x), Float64(x * -0.16666666666666666), x) * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), Float64(Float64(y * y) * Float64(y * y)), Float64(Float64(y * y) * Float64(0.16666666666666666 * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x))))) / x); else tmp = sinh(y); 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[(y * N[(N[(N[(N[(x * x), $MachinePrecision] * N[(x * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[Sinh[y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -1 \cdot 10^{-291}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, x \cdot -0.16666666666666666, x\right) \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), \left(y \cdot y\right) \cdot \left(y \cdot y\right), \left(y \cdot y\right) \cdot \left(0.16666666666666666 \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -9.99999999999999962e-292Initial program 99.8%
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-*.f6465.9
Applied rewrites65.9%
Taylor expanded in y around 0
Applied rewrites57.8%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6437.1
Applied rewrites37.1%
if -9.99999999999999962e-292 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 84.5%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/r/N/A
lower-/.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites65.9%
Final simplification54.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (fma (* x x) 0.008333333333333333 -0.16666666666666666))))
(if (<= (/ (* (sinh y) (sin x)) x) 1e-238)
(*
(*
(fma -0.16666666666666666 (* x (* x x)) x)
(fma
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
(* y (* y (* y y)))
(fma y (* y 0.16666666666666666) 1.0)))
(/ y x))
(fma
y
(fma
(fma (* x x) t_0 x)
(* (/ (* y y) x) (fma (* y y) 0.008333333333333333 0.16666666666666666))
(* x t_0))
y))))
double code(double x, double y) {
double t_0 = x * fma((x * x), 0.008333333333333333, -0.16666666666666666);
double tmp;
if (((sinh(y) * sin(x)) / x) <= 1e-238) {
tmp = (fma(-0.16666666666666666, (x * (x * x)), x) * fma(fma(y, (y * 0.0001984126984126984), 0.008333333333333333), (y * (y * (y * y))), fma(y, (y * 0.16666666666666666), 1.0))) * (y / x);
} else {
tmp = fma(y, fma(fma((x * x), t_0, x), (((y * y) / x) * fma((y * y), 0.008333333333333333, 0.16666666666666666)), (x * t_0)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(x * fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666)) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 1e-238) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x * Float64(x * x)), x) * fma(fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), Float64(y * Float64(y * Float64(y * y))), fma(y, Float64(y * 0.16666666666666666), 1.0))) * Float64(y / x)); else tmp = fma(y, fma(fma(Float64(x * x), t_0, x), Float64(Float64(Float64(y * y) / x) * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), Float64(x * t_0)), y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 1e-238], N[(N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(x * x), $MachinePrecision] * t$95$0 + x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$0), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right)\\
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 10^{-238}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), y \cdot \left(y \cdot \left(y \cdot y\right)\right), \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, t\_0, x\right), \frac{y \cdot y}{x} \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), x \cdot t\_0\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.9999999999999999e-239Initial program 85.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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in y around 0
Applied rewrites38.1%
Applied rewrites53.3%
if 9.9999999999999999e-239 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6479.9
Applied rewrites79.9%
Taylor expanded in y around 0
Applied rewrites74.6%
Applied rewrites77.8%
Final simplification61.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y))) (t_1 (* x (* x x))))
(if (<= (/ (* (sinh y) (sin x)) x) 1e-259)
(*
(*
(fma -0.16666666666666666 t_1 x)
(fma
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
(* y t_0)
(fma y (* y 0.16666666666666666) 1.0)))
(/ y x))
(/
(*
(fma (fma (* x x) 0.008333333333333333 -0.16666666666666666) t_1 x)
(fma
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
t_0
y))
x))))
double code(double x, double y) {
double t_0 = y * (y * y);
double t_1 = x * (x * x);
double tmp;
if (((sinh(y) * sin(x)) / x) <= 1e-259) {
tmp = (fma(-0.16666666666666666, t_1, x) * fma(fma(y, (y * 0.0001984126984126984), 0.008333333333333333), (y * t_0), fma(y, (y * 0.16666666666666666), 1.0))) * (y / x);
} else {
tmp = (fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), t_1, x) * fma(fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), t_0, y)) / x;
}
return tmp;
}
function code(x, y) t_0 = Float64(y * Float64(y * y)) t_1 = Float64(x * Float64(x * x)) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 1e-259) tmp = Float64(Float64(fma(-0.16666666666666666, t_1, x) * fma(fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), Float64(y * t_0), fma(y, Float64(y * 0.16666666666666666), 1.0))) * Float64(y / x)); else tmp = Float64(Float64(fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), t_1, x) * fma(fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), t_0, y)) / x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 1e-259], N[(N[(N[(-0.16666666666666666 * t$95$1 + x), $MachinePrecision] * N[(N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * t$95$0), $MachinePrecision] + N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * t$95$1 + x), $MachinePrecision] * N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$0 + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \cdot y\right)\\
t_1 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 10^{-259}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, t\_1, x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), y \cdot t\_0, \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), t\_1, x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), t\_0, y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.0000000000000001e-259Initial program 85.8%
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-*.f6443.7
Applied rewrites43.7%
Taylor expanded in y around 0
Applied rewrites38.3%
Applied rewrites53.6%
if 1.0000000000000001e-259 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6479.1
Applied rewrites79.1%
Taylor expanded in y around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites76.0%
Final simplification61.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (* y y) (* y y))))
(if (<= (/ (* (sinh y) (sin x)) x) -5e-235)
(*
(* y (* x x))
(fma
t_0
(fma (* y y) -3.306878306878307e-5 -0.001388888888888889)
(fma (* y y) -0.027777777777777776 -0.16666666666666666)))
(fma
y
(fma
t_0
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
(* (* y y) 0.16666666666666666))
y))))
double code(double x, double y) {
double t_0 = (y * y) * (y * y);
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = (y * (x * x)) * fma(t_0, fma((y * y), -3.306878306878307e-5, -0.001388888888888889), fma((y * y), -0.027777777777777776, -0.16666666666666666));
} else {
tmp = fma(y, fma(t_0, fma((y * y), 0.0001984126984126984, 0.008333333333333333), ((y * y) * 0.16666666666666666)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(y * y) * Float64(y * y)) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(Float64(y * Float64(x * x)) * fma(t_0, fma(Float64(y * y), -3.306878306878307e-5, -0.001388888888888889), fma(Float64(y * y), -0.027777777777777776, -0.16666666666666666))); else tmp = fma(y, fma(t_0, fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), Float64(Float64(y * y) * 0.16666666666666666)), y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-235], N[(N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[(y * y), $MachinePrecision] * -3.306878306878307e-5 + -0.001388888888888889), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * -0.027777777777777776 + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t$95$0 * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y \cdot y\right) \cdot \left(y \cdot y\right)\\
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;\left(y \cdot \left(x \cdot x\right)\right) \cdot \mathsf{fma}\left(t\_0, \mathsf{fma}\left(y \cdot y, -3.306878306878307 \cdot 10^{-5}, -0.001388888888888889\right), \mathsf{fma}\left(y \cdot y, -0.027777777777777776, -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(t\_0, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), \left(y \cdot y\right) \cdot 0.16666666666666666\right), 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 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
Applied rewrites60.0%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites19.3%
if -4.9999999999999998e-235 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.2%
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-*.f6442.9
Applied rewrites42.9%
Taylor expanded in y around 0
Applied rewrites40.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites60.1%
Final simplification44.6%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) 1e-5) (* y (fma (* x x) -0.16666666666666666 1.0)) (* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 1e-5) {
tmp = y * fma((x * x), -0.16666666666666666, 1.0);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 1e-5) tmp = Float64(y * fma(Float64(x * x), -0.16666666666666666, 1.0)); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 1e-5], N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 10^{-5}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.00000000000000008e-5Initial program 87.6%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6470.3
Applied rewrites70.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6443.4
Applied rewrites43.4%
if 1.00000000000000008e-5 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
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 rewrites73.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6461.4
Applied rewrites61.4%
Final simplification47.9%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -5e-235) (* -0.16666666666666666 (* y (* x x))) y))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-235) {
tmp = -0.16666666666666666 * (y * (x * x));
} else {
tmp = y;
}
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 = (-0.16666666666666666d0) * (y * (x * x))
else
tmp = y
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 = -0.16666666666666666 * (y * (x * x));
} else {
tmp = y;
}
return tmp;
}
def code(x, y): tmp = 0 if ((math.sinh(y) * math.sin(x)) / x) <= -5e-235: tmp = -0.16666666666666666 * (y * (x * x)) else: tmp = y return tmp
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-235) tmp = Float64(-0.16666666666666666 * Float64(y * Float64(x * x))); else tmp = y; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (((sinh(y) * sin(x)) / x) <= -5e-235) tmp = -0.16666666666666666 * (y * (x * x)); else tmp = y; 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[(-0.16666666666666666 * N[(y * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-235}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(y \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\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
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in x around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6416.6
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%
*-rgt-identity31.5
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-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= x 1.3e+92)
(*
(*
(fma -0.16666666666666666 (* x (* x x)) x)
(fma
(fma y (* y 0.0001984126984126984) 0.008333333333333333)
(* y (* y (* y y)))
(fma y (* y 0.16666666666666666) 1.0)))
(/ y x))
(* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (x <= 1.3e+92) {
tmp = (fma(-0.16666666666666666, (x * (x * x)), x) * fma(fma(y, (y * 0.0001984126984126984), 0.008333333333333333), (y * (y * (y * y))), fma(y, (y * 0.16666666666666666), 1.0))) * (y / x);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 1.3e+92) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x * Float64(x * x)), x) * fma(fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333), Float64(y * Float64(y * Float64(y * y))), fma(y, Float64(y * 0.16666666666666666), 1.0))) * Float64(y / x)); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[x, 1.3e+92], N[(N[(N[(-0.16666666666666666 * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(y * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{+92}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot \left(x \cdot x\right), x\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), y \cdot \left(y \cdot \left(y \cdot y\right)\right), \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 1.2999999999999999e92Initial program 89.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-*.f6459.3
Applied rewrites59.3%
Taylor expanded in y around 0
Applied rewrites53.9%
Applied rewrites65.7%
if 1.2999999999999999e92 < x Initial program 100.0%
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 rewrites83.4%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6417.8
Applied rewrites17.8%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6417.2
Applied rewrites17.2%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.5
Applied rewrites57.5%
Final simplification64.4%
(FPCore (x y)
:precision binary64
(if (<= x 2.7e+86)
(fma
y
(fma
(fma -0.16666666666666666 (* x x) 1.0)
(* y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)))
(* (* x x) -0.16666666666666666))
y)
(* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (x <= 2.7e+86) {
tmp = fma(y, fma(fma(-0.16666666666666666, (x * x), 1.0), (y * (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666))), ((x * x) * -0.16666666666666666)), y);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 2.7e+86) tmp = fma(y, fma(fma(-0.16666666666666666, Float64(x * x), 1.0), Float64(y * Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666))), Float64(Float64(x * x) * -0.16666666666666666)), y); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[x, 2.7e+86], N[(y * N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right), y \cdot \left(y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right)\right), \left(x \cdot x\right) \cdot -0.16666666666666666\right), y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 2.70000000000000018e86Initial program 88.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.9
Applied rewrites57.9%
Taylor expanded in y around 0
Applied rewrites63.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
distribute-lft-outN/A
lower-fma.f64N/A
Applied rewrites64.4%
if 2.70000000000000018e86 < x Initial program 100.0%
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.7%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6416.4
Applied rewrites16.4%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.8
Applied rewrites15.8%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
Final simplification62.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (* y y) 0.16666666666666666)))
(if (<= x 3.1)
(fma
y
(fma
(* (* y y) (* y y))
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
t_0)
y)
(if (<= x 2.05e+108)
(*
(* y (* y y))
(fma (* x x) -0.027777777777777776 0.16666666666666666))
(* y t_0)))))
double code(double x, double y) {
double t_0 = (y * y) * 0.16666666666666666;
double tmp;
if (x <= 3.1) {
tmp = fma(y, fma(((y * y) * (y * y)), fma((y * y), 0.0001984126984126984, 0.008333333333333333), t_0), y);
} else if (x <= 2.05e+108) {
tmp = (y * (y * y)) * fma((x * x), -0.027777777777777776, 0.16666666666666666);
} else {
tmp = y * t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(y * y) * 0.16666666666666666) tmp = 0.0 if (x <= 3.1) tmp = fma(y, fma(Float64(Float64(y * y) * Float64(y * y)), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), t_0), y); elseif (x <= 2.05e+108) tmp = Float64(Float64(y * Float64(y * y)) * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)); else tmp = Float64(y * t_0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]}, If[LessEqual[x, 3.1], N[(y * N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + t$95$0), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[x, 2.05e+108], N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(y * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y \cdot y\right) \cdot 0.16666666666666666\\
\mathbf{if}\;x \leq 3.1:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right), \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), t\_0\right), y\right)\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;\left(y \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\_0\\
\end{array}
\end{array}
if x < 3.10000000000000009Initial program 87.8%
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-*.f6464.8
Applied rewrites64.8%
Taylor expanded in y around 0
Applied rewrites58.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites68.3%
if 3.10000000000000009 < x < 2.05e108Initial program 99.8%
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 rewrites91.7%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.2
Applied rewrites14.2%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.1
Applied rewrites15.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6420.3
Applied rewrites20.3%
if 2.05e108 < x Initial program 100.0%
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 rewrites84.2%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.4
Applied rewrites14.4%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6413.7
Applied rewrites13.7%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification62.2%
(FPCore (x y)
:precision binary64
(if (<= x 3.1)
(fma y (* y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666))) y)
(if (<= x 2.05e+108)
(* (* y (* y y)) (fma (* x x) -0.027777777777777776 0.16666666666666666))
(* y (* (* y y) 0.16666666666666666)))))
double code(double x, double y) {
double tmp;
if (x <= 3.1) {
tmp = fma(y, (y * (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666))), y);
} else if (x <= 2.05e+108) {
tmp = (y * (y * y)) * fma((x * x), -0.027777777777777776, 0.16666666666666666);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 3.1) tmp = fma(y, Float64(y * Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666))), y); elseif (x <= 2.05e+108) tmp = Float64(Float64(y * Float64(y * y)) * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[x, 3.1], N[(y * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[x, 2.05e+108], N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.1:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right)\right), y\right)\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;\left(y \cdot \left(y \cdot y\right)\right) \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 3.10000000000000009Initial program 87.8%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.7
Applied rewrites62.7%
Taylor expanded in y around 0
Applied rewrites68.9%
Taylor expanded in x around 0
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6466.8
Applied rewrites66.8%
if 3.10000000000000009 < x < 2.05e108Initial program 99.8%
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 rewrites91.7%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.2
Applied rewrites14.2%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.1
Applied rewrites15.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6420.3
Applied rewrites20.3%
if 2.05e108 < x Initial program 100.0%
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 rewrites84.2%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.4
Applied rewrites14.4%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6413.7
Applied rewrites13.7%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification61.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y))))
(if (<= x 3.1)
(fma 0.16666666666666666 t_0 y)
(if (<= x 2.05e+108)
(* t_0 (fma (* x x) -0.027777777777777776 0.16666666666666666))
(* y (* (* y y) 0.16666666666666666))))))
double code(double x, double y) {
double t_0 = y * (y * y);
double tmp;
if (x <= 3.1) {
tmp = fma(0.16666666666666666, t_0, y);
} else if (x <= 2.05e+108) {
tmp = t_0 * fma((x * x), -0.027777777777777776, 0.16666666666666666);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) t_0 = Float64(y * Float64(y * y)) tmp = 0.0 if (x <= 3.1) tmp = fma(0.16666666666666666, t_0, y); elseif (x <= 2.05e+108) tmp = Float64(t_0 * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.1], N[(0.16666666666666666 * t$95$0 + y), $MachinePrecision], If[LessEqual[x, 2.05e+108], N[(t$95$0 * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \cdot y\right)\\
\mathbf{if}\;x \leq 3.1:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, t\_0, y\right)\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 3.10000000000000009Initial program 87.8%
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 rewrites83.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.0
Applied rewrites62.0%
if 3.10000000000000009 < x < 2.05e108Initial program 99.8%
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 rewrites91.7%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.2
Applied rewrites14.2%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.1
Applied rewrites15.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6420.3
Applied rewrites20.3%
if 2.05e108 < x Initial program 100.0%
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 rewrites84.2%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6414.4
Applied rewrites14.4%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6413.7
Applied rewrites13.7%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification57.4%
(FPCore (x y) :precision binary64 (if (<= x 1.85e+35) (fma 0.16666666666666666 (* y (* y y)) y) (* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (x <= 1.85e+35) {
tmp = fma(0.16666666666666666, (y * (y * y)), y);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 1.85e+35) tmp = fma(0.16666666666666666, Float64(y * Float64(y * y)), y); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[x, 1.85e+35], N[(0.16666666666666666 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot \left(y \cdot y\right), y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 1.85e35Initial program 88.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 rewrites84.3%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6460.3
Applied rewrites60.3%
if 1.85e35 < 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 rewrites85.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6415.4
Applied rewrites15.4%
Taylor expanded in y around inf
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6415.2
Applied rewrites15.2%
Taylor expanded in x around 0
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.2
Applied rewrites45.2%
Final simplification57.0%
(FPCore (x y) :precision binary64 y)
double code(double x, double y) {
return y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y
end function
public static double code(double x, double y) {
return y;
}
def code(x, y): return y
function code(x, y) return y end
function tmp = code(x, y) tmp = y; end
code[x_, y_] := y
\begin{array}{l}
\\
y
\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%
*-rgt-identity28.9
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))