
(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 20 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 87.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%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y)) x)))
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
(fma (* (* y y) 0.008333333333333333) (* y y) 1.0))
y)
(if (<= t_0 5e-5)
(* (* (fma 0.16666666666666666 (* y y) 1.0) (sin x)) (/ y x))
(/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sin(x) * sinh(y)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * fma(((y * y) * 0.008333333333333333), (y * y), 1.0)) * y;
} else if (t_0 <= 5e-5) {
tmp = (fma(0.16666666666666666, (y * y), 1.0) * sin(x)) * (y / x);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sin(x) * sinh(y)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0)) * y); elseif (t_0 <= 5e-5) tmp = Float64(Float64(fma(0.16666666666666666, Float64(y * y), 1.0) * sin(x)) * Float64(y / x)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e-5], N[(N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, 1\right) \cdot \sin x\right) \cdot \frac{y}{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
lower-*.f64N/A
Applied rewrites78.7%
Taylor expanded in x around 0
Applied rewrites64.4%
Taylor expanded in y around inf
Applied rewrites64.4%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5Initial program 75.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.1%
Applied rewrites99.0%
Taylor expanded in y around 0
Applied rewrites98.9%
if 5.00000000000000024e-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 rewrites79.6%
Final simplification85.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y)) x)))
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
(fma (* (* y y) 0.008333333333333333) (* y y) 1.0))
y)
(if (<= t_0 5e-75) (/ y (/ x (sin x))) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sin(x) * sinh(y)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * fma(((y * y) * 0.008333333333333333), (y * y), 1.0)) * y;
} else if (t_0 <= 5e-75) {
tmp = y / (x / sin(x));
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sin(x) * sinh(y)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0)) * y); elseif (t_0 <= 5e-75) 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[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e-75], 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{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-75}:\\
\;\;\;\;\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
lower-*.f64N/A
Applied rewrites78.7%
Taylor expanded in x around 0
Applied rewrites64.4%
Taylor expanded in y around inf
Applied rewrites64.4%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999979e-75Initial program 74.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Applied rewrites99.0%
if 4.99999999999999979e-75 < (/.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 rewrites78.6%
Final simplification84.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y)) x)))
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
(fma (* (* y y) 0.008333333333333333) (* y y) 1.0))
y)
(if (<= t_0 5e-75) (* (/ (sin x) x) y) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sin(x) * sinh(y)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * fma(((y * y) * 0.008333333333333333), (y * y), 1.0)) * y;
} else if (t_0 <= 5e-75) {
tmp = (sin(x) / x) * y;
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sin(x) * sinh(y)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0)) * y); elseif (t_0 <= 5e-75) tmp = Float64(Float64(sin(x) / x) * y); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e-75], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * y), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-75}:\\
\;\;\;\;\frac{\sin x}{x} \cdot y\\
\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
lower-*.f64N/A
Applied rewrites78.7%
Taylor expanded in x around 0
Applied rewrites64.4%
Taylor expanded in y around inf
Applied rewrites64.4%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999979e-75Initial program 74.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
if 4.99999999999999979e-75 < (/.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 rewrites78.6%
Final simplification84.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sin x) (sinh y)) x)))
(if (<= t_0 (- INFINITY))
(*
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
(fma (* (* y y) 0.008333333333333333) (* y y) 1.0))
y)
(if (<= t_0 5e-75) (* (/ y x) (sin x)) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = (sin(x) * sinh(y)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * fma(((y * y) * 0.008333333333333333), (y * y), 1.0)) * y;
} else if (t_0 <= 5e-75) {
tmp = (y / x) * sin(x);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sin(x) * sinh(y)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * fma(Float64(Float64(y * y) * 0.008333333333333333), Float64(y * y), 1.0)) * y); elseif (t_0 <= 5e-75) tmp = Float64(Float64(y / x) * sin(x)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 5e-75], N[(N[(y / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot \mathsf{fma}\left(\left(y \cdot y\right) \cdot 0.008333333333333333, y \cdot y, 1\right)\right) \cdot y\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-75}:\\
\;\;\;\;\frac{y}{x} \cdot \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
lower-*.f64N/A
Applied rewrites78.7%
Taylor expanded in x around 0
Applied rewrites64.4%
Taylor expanded in y around inf
Applied rewrites64.4%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999979e-75Initial program 74.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.0
Applied rewrites99.0%
Applied rewrites98.9%
if 4.99999999999999979e-75 < (/.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 rewrites78.6%
Final simplification84.8%
(FPCore (x y)
:precision binary64
(let* ((t_0
(fma
(fma (* y y) 0.008333333333333333 0.16666666666666666)
(* y y)
1.0))
(t_1 (/ (* (sin x) (sinh y)) x)))
(if (<= t_1 -1e-239)
(* (* (fma -0.16666666666666666 (* x x) 1.0) t_0) y)
(if (<= t_1 0.0) (* (* t_0 x) (/ y x)) (/ (sinh y) 1.0)))))
double code(double x, double y) {
double t_0 = fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
double t_1 = (sin(x) * sinh(y)) / x;
double tmp;
if (t_1 <= -1e-239) {
tmp = (fma(-0.16666666666666666, (x * x), 1.0) * t_0) * y;
} else if (t_1 <= 0.0) {
tmp = (t_0 * x) * (y / x);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) t_0 = fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) t_1 = Float64(Float64(sin(x) * sinh(y)) / x) tmp = 0.0 if (t_1 <= -1e-239) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * t_0) * y); elseif (t_1 <= 0.0) tmp = Float64(Float64(t_0 * x) * Float64(y / x)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-239], N[(N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(t$95$0 * x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
t_1 := \frac{\sin x \cdot \sinh y}{x}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-239}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot t\_0\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\left(t\_0 \cdot x\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.0000000000000001e-239Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites82.7%
Taylor expanded in x around 0
Applied rewrites65.4%
if -1.0000000000000001e-239 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0Initial program 60.3%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites100.0%
Applied rewrites99.9%
Taylor expanded in x around 0
Applied rewrites88.3%
if 0.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
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 rewrites67.5%
Final simplification73.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) 5e-75)
(*
(*
(/ (sin x) x)
(fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0))
y)
(/ (sinh y) 1.0)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 5e-75) {
tmp = ((sin(x) / x) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0)) * y;
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 5e-75) tmp = Float64(Float64(Float64(sin(x) / x) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0)) * y); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-75], N[(N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 5 \cdot 10^{-75}:\\
\;\;\;\;\left(\frac{\sin x}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999979e-75Initial program 83.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.9%
if 4.99999999999999979e-75 < (/.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 rewrites78.6%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) 5e-5)
(*
(*
(/ y x)
(fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0))
(sin x))
(/ (sinh y) 1.0)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 5e-5) {
tmp = ((y / x) * fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0)) * sin(x);
} else {
tmp = sinh(y) / 1.0;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 5e-5) tmp = Float64(Float64(Float64(y / x) * fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0)) * sin(x)); else tmp = Float64(sinh(y) / 1.0); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-5], N[(N[(N[(y / x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\left(\frac{y}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\right) \cdot \sin x\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{1}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000024e-5Initial program 84.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites92.0%
Applied rewrites92.4%
Applied rewrites93.8%
if 5.00000000000000024e-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 rewrites79.6%
(FPCore (x y)
:precision binary64
(let* ((t_0
(fma
(fma (* y y) 0.008333333333333333 0.16666666666666666)
(* y y)
1.0)))
(if (<= (/ (* (sin x) (sinh y)) x) -1e-239)
(* (* (fma -0.16666666666666666 (* x x) 1.0) t_0) y)
(* (* t_0 x) (/ y x)))))
double code(double x, double y) {
double t_0 = fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0);
double tmp;
if (((sin(x) * sinh(y)) / x) <= -1e-239) {
tmp = (fma(-0.16666666666666666, (x * x), 1.0) * t_0) * y;
} else {
tmp = (t_0 * x) * (y / x);
}
return tmp;
}
function code(x, y) t_0 = fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= -1e-239) tmp = Float64(Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * t_0) * y); else tmp = Float64(Float64(t_0 * x) * Float64(y / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-239], N[(N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision] * y), $MachinePrecision], N[(N[(t$95$0 * x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right)\\
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -1 \cdot 10^{-239}:\\
\;\;\;\;\left(\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot t\_0\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot x\right) \cdot \frac{y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.0000000000000001e-239Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites82.7%
Taylor expanded in x around 0
Applied rewrites65.4%
if -1.0000000000000001e-239 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 80.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites89.7%
Applied rewrites89.7%
Taylor expanded in x around 0
Applied rewrites73.3%
Final simplification70.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) -2e-143)
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
y)
(*
(*
(fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
x)
(/ y x))))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= -2e-143) {
tmp = fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * y;
} else {
tmp = (fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * x) * (y / x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= -2e-143) tmp = Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * y); else tmp = Float64(Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * x) * Float64(y / x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-143], N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-143}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot x\right) \cdot \frac{y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-143Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6416.3
Applied rewrites16.3%
Taylor expanded in x around 0
Applied rewrites35.3%
if -1.9999999999999999e-143 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 81.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites90.2%
Applied rewrites90.2%
Taylor expanded in x around 0
Applied rewrites71.2%
Final simplification59.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) 2e-131)
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
y)
(/ (* (fma (* (* (* (* y y) 0.008333333333333333) y) y) x x) y) x)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 2e-131) {
tmp = fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * y;
} else {
tmp = (fma(((((y * y) * 0.008333333333333333) * y) * y), x, x) * y) / x;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 2e-131) tmp = Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * y); else tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(y * y) * 0.008333333333333333) * y) * y), x, x) * y) / x); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-131], N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * y), $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(\left(\left(y \cdot y\right) \cdot 0.008333333333333333\right) \cdot y\right) \cdot y, x, x\right) \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2e-131Initial program 83.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6464.4
Applied rewrites64.4%
Taylor expanded in x around 0
Applied rewrites39.8%
if 2e-131 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.7%
Taylor expanded in x around 0
Applied rewrites64.5%
Applied rewrites64.5%
Taylor expanded in y around inf
Applied rewrites64.5%
Final simplification45.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) -2e-143)
(*
(fma
(fma
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
(* x x)
-0.16666666666666666)
(* x x)
1.0)
y)
(*
(fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
y)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= -2e-143) {
tmp = fma(fma(fma(-0.0001984126984126984, (x * x), 0.008333333333333333), (x * x), -0.16666666666666666), (x * x), 1.0) * y;
} else {
tmp = fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= -2e-143) tmp = Float64(fma(fma(fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), Float64(x * x), -0.16666666666666666), Float64(x * x), 1.0) * y); else tmp = Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-143], N[(N[(N[(N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -2 \cdot 10^{-143}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), x \cdot x, -0.16666666666666666\right), x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.9999999999999999e-143Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6416.3
Applied rewrites16.3%
Taylor expanded in x around 0
Applied rewrites35.3%
if -1.9999999999999999e-143 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 81.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites90.2%
Taylor expanded in x around 0
Applied rewrites50.1%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) -1e-239)
(* (* -0.16666666666666666 (* x x)) y)
(*
(fma (fma (* y y) 0.008333333333333333 0.16666666666666666) (* y y) 1.0)
y)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= -1e-239) {
tmp = (-0.16666666666666666 * (x * x)) * y;
} else {
tmp = fma(fma((y * y), 0.008333333333333333, 0.16666666666666666), (y * y), 1.0) * y;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= -1e-239) tmp = Float64(Float64(-0.16666666666666666 * Float64(x * x)) * y); else tmp = Float64(fma(fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666), Float64(y * y), 1.0) * y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-239], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -1 \cdot 10^{-239}:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot y, 1\right) \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.0000000000000001e-239Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6424.4
Applied rewrites24.4%
Taylor expanded in x around 0
Applied rewrites34.3%
Taylor expanded in x around inf
Applied rewrites18.5%
if -1.0000000000000001e-239 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 80.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites89.7%
Taylor expanded in x around 0
Applied rewrites51.0%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sin x) (sinh y)) x) 2e-261)
(* (fma -0.16666666666666666 (* x x) 1.0) y)
(fma
(* y (fma 0.008333333333333333 (* x x) -0.16666666666666666))
(* x x)
y)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 2e-261) {
tmp = fma(-0.16666666666666666, (x * x), 1.0) * y;
} else {
tmp = fma((y * fma(0.008333333333333333, (x * x), -0.16666666666666666)), (x * x), y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 2e-261) tmp = Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * y); else tmp = fma(Float64(y * fma(0.008333333333333333, Float64(x * x), -0.16666666666666666)), Float64(x * x), y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-261], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(y * N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-261}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot x, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1.99999999999999997e-261Initial program 81.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6461.3
Applied rewrites61.3%
Taylor expanded in x around 0
Applied rewrites37.4%
if 1.99999999999999997e-261 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6435.7
Applied rewrites35.7%
Taylor expanded in x around 0
Applied rewrites40.4%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sin x) (sinh y)) x) 2e-173) (* (fma -0.16666666666666666 (* x x) 1.0) y) (* (fma (* (* x x) 0.008333333333333333) (* x x) 1.0) y)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 2e-173) {
tmp = fma(-0.16666666666666666, (x * x), 1.0) * y;
} else {
tmp = fma(((x * x) * 0.008333333333333333), (x * x), 1.0) * y;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 2e-173) tmp = Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * y); else tmp = Float64(fma(Float64(Float64(x * x) * 0.008333333333333333), Float64(x * x), 1.0) * y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-173], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-173}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(x \cdot x\right) \cdot 0.008333333333333333, x \cdot x, 1\right) \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2.0000000000000001e-173Initial program 82.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6463.3
Applied rewrites63.3%
Taylor expanded in x around 0
Applied rewrites38.6%
if 2.0000000000000001e-173 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6425.7
Applied rewrites25.7%
Taylor expanded in x around 0
Applied rewrites37.2%
Taylor expanded in x around inf
Applied rewrites37.2%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sin x) (sinh y)) x) 2e-131) (* (fma -0.16666666666666666 (* x x) 1.0) y) (/ (* x y) x)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= 2e-131) {
tmp = fma(-0.16666666666666666, (x * x), 1.0) * y;
} else {
tmp = (x * y) / x;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= 2e-131) tmp = Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * y); else tmp = Float64(Float64(x * y) / x); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 2e-131], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq 2 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 2e-131Initial program 83.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6464.4
Applied rewrites64.4%
Taylor expanded in x around 0
Applied rewrites39.4%
if 2e-131 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6418.1
Applied rewrites18.1%
Taylor expanded in x around 0
Applied rewrites28.9%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sin x) (sinh y)) x) -1e-239) (* (* -0.16666666666666666 (* x x)) y) (* 1.0 y)))
double code(double x, double y) {
double tmp;
if (((sin(x) * sinh(y)) / x) <= -1e-239) {
tmp = (-0.16666666666666666 * (x * x)) * y;
} else {
tmp = 1.0 * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (((sin(x) * sinh(y)) / x) <= (-1d-239)) then
tmp = ((-0.16666666666666666d0) * (x * x)) * y
else
tmp = 1.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (((Math.sin(x) * Math.sinh(y)) / x) <= -1e-239) {
tmp = (-0.16666666666666666 * (x * x)) * y;
} else {
tmp = 1.0 * y;
}
return tmp;
}
def code(x, y): tmp = 0 if ((math.sin(x) * math.sinh(y)) / x) <= -1e-239: tmp = (-0.16666666666666666 * (x * x)) * y else: tmp = 1.0 * y return tmp
function code(x, y) tmp = 0.0 if (Float64(Float64(sin(x) * sinh(y)) / x) <= -1e-239) tmp = Float64(Float64(-0.16666666666666666 * Float64(x * x)) * y); else tmp = Float64(1.0 * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (((sin(x) * sinh(y)) / x) <= -1e-239) tmp = (-0.16666666666666666 * (x * x)) * y; else tmp = 1.0 * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(N[(N[Sin[x], $MachinePrecision] * N[Sinh[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -1e-239], N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(1.0 * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sin x \cdot \sinh y}{x} \leq -1 \cdot 10^{-239}:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(x \cdot x\right)\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;1 \cdot y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.0000000000000001e-239Initial program 99.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6424.4
Applied rewrites24.4%
Taylor expanded in x around 0
Applied rewrites34.3%
Taylor expanded in x around inf
Applied rewrites18.5%
if -1.0000000000000001e-239 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 80.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6470.8
Applied rewrites70.8%
Taylor expanded in x around 0
Applied rewrites36.2%
Taylor expanded in x around 0
Applied rewrites34.3%
(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(Float64(sinh(y) / x) * sin(x)) end
function tmp = code(x, y) tmp = (sinh(y) / x) * sin(x); end
code[x_, y_] := N[(N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sinh y}{x} \cdot \sin x
\end{array}
Initial program 87.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
(FPCore (x y) :precision binary64 (* (fma -0.16666666666666666 (* x x) 1.0) y))
double code(double x, double y) {
return fma(-0.16666666666666666, (x * x), 1.0) * y;
}
function code(x, y) return Float64(fma(-0.16666666666666666, Float64(x * x), 1.0) * y) end
code[x_, y_] := N[(N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right) \cdot y
\end{array}
Initial program 87.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.9
Applied rewrites53.9%
Taylor expanded in x around 0
Applied rewrites35.5%
(FPCore (x y) :precision binary64 (* 1.0 y))
double code(double x, double y) {
return 1.0 * y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 * y
end function
public static double code(double x, double y) {
return 1.0 * y;
}
def code(x, y): return 1.0 * y
function code(x, y) return Float64(1.0 * y) end
function tmp = code(x, y) tmp = 1.0 * y; end
code[x_, y_] := N[(1.0 * y), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot y
\end{array}
Initial program 87.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6453.9
Applied rewrites53.9%
Taylor expanded in x around 0
Applied rewrites35.5%
Taylor expanded in x around 0
Applied rewrites28.3%
(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 2024296
(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))