
(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 17 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.9%
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9
Applied egg-rr99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(* (* y y) (fma x (* x -0.16666666666666666) 1.0))
(* y (* (* y y) 0.008333333333333333)))
(if (<= t_0 1e-40)
(* y (* (fma y (* y 0.16666666666666666) 1.0) (/ (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 * y) * fma(x, (x * -0.16666666666666666), 1.0)) * (y * ((y * y) * 0.008333333333333333));
} else if (t_0 <= 1e-40) {
tmp = y * (fma(y, (y * 0.16666666666666666), 1.0) * (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(Float64(y * y) * fma(x, Float64(x * -0.16666666666666666), 1.0)) * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))); elseif (t_0 <= 1e-40) tmp = Float64(y * Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * 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[(N[(y * y), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-40], N[(y * N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / 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(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right) \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;t\_0 \leq 10^{-40}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \frac{\sin x}{x}\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 y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified64.6%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.6
Simplified64.6%
*-commutativeN/A
associate-*l/N/A
clear-numN/A
associate-/r*N/A
*-inversesN/A
flip3-+N/A
clear-numN/A
Applied egg-rr64.6%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.9999999999999993e-41Initial program 83.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.0%
if 9.9999999999999993e-41 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
Simplified77.6%
*-commutativeN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
sinh-lowering-sinh.f6477.6
Applied egg-rr77.6%
Final simplification86.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(* (* y y) (fma x (* x -0.16666666666666666) 1.0))
(* y (* (* y y) 0.008333333333333333)))
(if (<= t_0 1e-40) (* 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 * y) * fma(x, (x * -0.16666666666666666), 1.0)) * (y * ((y * y) * 0.008333333333333333));
} else if (t_0 <= 1e-40) {
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(Float64(y * y) * fma(x, Float64(x * -0.16666666666666666), 1.0)) * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))); elseif (t_0 <= 1e-40) 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[(N[(y * y), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-40], 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(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right) \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;t\_0 \leq 10^{-40}:\\
\;\;\;\;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 y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.1
Simplified81.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified64.6%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.6
Simplified64.6%
*-commutativeN/A
associate-*l/N/A
clear-numN/A
associate-/r*N/A
*-inversesN/A
flip3-+N/A
clear-numN/A
Applied egg-rr64.6%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 9.9999999999999993e-41Initial program 83.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified99.0%
Taylor expanded in y around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6498.6
Simplified98.6%
if 9.9999999999999993e-41 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
Simplified77.6%
*-commutativeN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
sinh-lowering-sinh.f6477.6
Applied egg-rr77.6%
Final simplification86.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-271)
(*
(* (* y y) (fma x (* x -0.16666666666666666) 1.0))
(* y (* (* y y) 0.008333333333333333)))
(if (<= t_0 4e-134)
(/
x
(/
x
(*
y
(fma
y
(* y (fma (* y y) 0.008333333333333333 0.16666666666666666))
1.0))))
(sinh y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-271) {
tmp = ((y * y) * fma(x, (x * -0.16666666666666666), 1.0)) * (y * ((y * y) * 0.008333333333333333));
} else if (t_0 <= 4e-134) {
tmp = x / (x / (y * fma(y, (y * fma((y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)));
} 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 <= -2e-271) tmp = Float64(Float64(Float64(y * y) * fma(x, Float64(x * -0.16666666666666666), 1.0)) * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))); elseif (t_0 <= 4e-134) tmp = Float64(x / Float64(x / Float64(y * fma(y, Float64(y * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)))); 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, -2e-271], N[(N[(N[(y * y), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e-134], N[(x / N[(x / N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $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 -2 \cdot 10^{-271}:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right) \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-134}:\\
\;\;\;\;\frac{x}{\frac{x}{y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sinh y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999993e-271Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6487.3
Simplified87.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified59.7%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.6
Simplified40.6%
*-commutativeN/A
associate-*l/N/A
clear-numN/A
associate-/r*N/A
*-inversesN/A
flip3-+N/A
clear-numN/A
Applied egg-rr40.7%
if -1.99999999999999993e-271 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.00000000000000016e-134Initial program 74.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6473.3
Simplified73.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6496.4
Applied egg-rr96.4%
Taylor expanded in x around 0
Simplified75.8%
if 4.00000000000000016e-134 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 99.2%
Taylor expanded in x around 0
Simplified78.2%
*-commutativeN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
sinh-lowering-sinh.f6479.0
Applied egg-rr79.0%
Final simplification64.2%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -2e-271)
(*
(* (* y y) (fma x (* x -0.16666666666666666) 1.0))
(* y (* (* y y) 0.008333333333333333)))
(/
x
(/
x
(*
y
(fma
y
(* y (fma (* y y) 0.008333333333333333 0.16666666666666666))
1.0))))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -2e-271) {
tmp = ((y * y) * fma(x, (x * -0.16666666666666666), 1.0)) * (y * ((y * y) * 0.008333333333333333));
} else {
tmp = x / (x / (y * fma(y, (y * fma((y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)));
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-271) tmp = Float64(Float64(Float64(y * y) * fma(x, Float64(x * -0.16666666666666666), 1.0)) * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))); else tmp = Float64(x / Float64(x / Float64(y * fma(y, Float64(y * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)))); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-271], N[(N[(N[(y * y), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(x / N[(y * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-271}:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right) \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999993e-271Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6487.3
Simplified87.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified59.7%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.6
Simplified40.6%
*-commutativeN/A
associate-*l/N/A
clear-numN/A
associate-/r*N/A
*-inversesN/A
flip3-+N/A
clear-numN/A
Applied egg-rr40.7%
if -1.99999999999999993e-271 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 86.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6481.3
Simplified81.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6494.1
Applied egg-rr94.1%
Taylor expanded in x around 0
Simplified74.5%
Final simplification62.4%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -2e-271)
(*
(* (* y y) (fma x (* x -0.16666666666666666) 1.0))
(* y (* (* y y) 0.008333333333333333)))
(*
y
(fma
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -2e-271) {
tmp = ((y * y) * fma(x, (x * -0.16666666666666666), 1.0)) * (y * ((y * y) * 0.008333333333333333));
} else {
tmp = y * fma((y * y), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-271) tmp = Float64(Float64(Float64(y * y) * fma(x, Float64(x * -0.16666666666666666), 1.0)) * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))); else tmp = Float64(y * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-271], N[(N[(N[(y * y), $MachinePrecision] * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-271}:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\right) \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999993e-271Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6487.3
Simplified87.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified59.7%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.6
Simplified40.6%
*-commutativeN/A
associate-*l/N/A
clear-numN/A
associate-/r*N/A
*-inversesN/A
flip3-+N/A
clear-numN/A
Applied egg-rr40.7%
if -1.99999999999999993e-271 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 86.5%
Taylor expanded in x around 0
Simplified46.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6457.6
Simplified57.6%
Final simplification51.5%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-214)
(*
y
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma (* x x) -0.16666666666666666 1.0)))
(*
y
(fma
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666)
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * (fma(y, (y * 0.16666666666666666), 1.0) * fma((x * x), -0.16666666666666666, 1.0));
} else {
tmp = y * fma((y * y), fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0))); else tmp = Float64(y * fma(Float64(y * y), fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2
Simplified58.2%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.2
Simplified56.2%
Final simplification56.9%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-214)
(*
y
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma (* x x) -0.16666666666666666 1.0)))
(*
y
(fma
(* y y)
(fma y (* y (* (* y y) 0.0001984126984126984)) 0.16666666666666666)
1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * (fma(y, (y * 0.16666666666666666), 1.0) * fma((x * x), -0.16666666666666666, 1.0));
} else {
tmp = y * fma((y * y), fma(y, (y * ((y * y) * 0.0001984126984126984)), 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0))); else tmp = Float64(y * fma(Float64(y * y), fma(y, Float64(y * Float64(Float64(y * y) * 0.0001984126984126984)), 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right), 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2
Simplified58.2%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.2
Simplified56.2%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.2
Simplified56.2%
Final simplification56.9%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-214)
(*
y
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma (* x x) -0.16666666666666666 1.0)))
(* y (fma (* y y) (* y (* 0.0001984126984126984 (* y (* y y)))) 1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * (fma(y, (y * 0.16666666666666666), 1.0) * fma((x * x), -0.16666666666666666, 1.0));
} else {
tmp = y * fma((y * y), (y * (0.0001984126984126984 * (y * (y * y)))), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0))); else tmp = Float64(y * fma(Float64(y * y), Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y)))), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y \cdot y, y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2
Simplified58.2%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6456.2
Simplified56.2%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.2
Simplified56.2%
Final simplification56.9%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-214)
(*
y
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma (* x x) -0.16666666666666666 1.0)))
(*
y
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * (fma(y, (y * 0.16666666666666666), 1.0) * fma((x * x), -0.16666666666666666, 1.0));
} else {
tmp = y * fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(Float64(x * x), -0.16666666666666666, 1.0))); else tmp = Float64(y * fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(x \cdot x, -0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2
Simplified58.2%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6455.6
Simplified55.6%
Final simplification56.5%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) -5e-214)
(* y (fma -0.16666666666666666 (* x x) 1.0))
(*
y
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * fma(-0.16666666666666666, (x * x), 1.0);
} else {
tmp = y * fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * fma(-0.16666666666666666, Float64(x * x), 1.0)); else tmp = Float64(y * fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6486.2
Simplified86.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified62.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6436.5
Simplified36.5%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6455.6
Simplified55.6%
Final simplification49.4%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -5e-214) (* y (fma -0.16666666666666666 (* x x) 1.0)) (* y (fma y (* y 0.16666666666666666) 1.0))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * fma(-0.16666666666666666, (x * x), 1.0);
} else {
tmp = y * fma(y, (y * 0.16666666666666666), 1.0);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * fma(-0.16666666666666666, Float64(x * x), 1.0)); else tmp = Float64(y * fma(y, Float64(y * 0.16666666666666666), 1.0)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -5e-214], N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6486.2
Simplified86.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified62.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6436.5
Simplified36.5%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6451.4
Simplified51.4%
Final simplification46.5%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -5e-214) (* y (* x (* x -0.16666666666666666))) y))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -5e-214) {
tmp = y * (x * (x * -0.16666666666666666));
} 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-214)) then
tmp = y * (x * (x * (-0.16666666666666666d0)))
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-214) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = y;
}
return tmp;
}
def code(x, y): tmp = 0 if ((math.sinh(y) * math.sin(x)) / x) <= -5e-214: tmp = y * (x * (x * -0.16666666666666666)) else: tmp = y return tmp
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -5e-214) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); else tmp = y; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (((sinh(y) * sin(x)) / x) <= -5e-214) tmp = y * (x * (x * -0.16666666666666666)); 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-214], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -5 \cdot 10^{-214}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -4.9999999999999998e-214Initial program 98.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6486.2
Simplified86.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified62.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6436.5
Simplified36.5%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6415.1
Simplified15.1%
if -4.9999999999999998e-214 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 87.1%
Taylor expanded in x around 0
Simplified46.1%
Taylor expanded in y around 0
Simplified36.5%
Final simplification29.5%
(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.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f6499.8
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= x 3.6e-21)
(sinh y)
(/
(*
(sin x)
(*
y
(fma
(* y y)
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
1.0)))
x)))
double code(double x, double y) {
double tmp;
if (x <= 3.6e-21) {
tmp = sinh(y);
} else {
tmp = (sin(x) * (y * fma((y * y), fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), 1.0))) / x;
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 3.6e-21) tmp = sinh(y); else tmp = Float64(Float64(sin(x) * Float64(y * fma(Float64(y * y), fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), 1.0))) / x); end return tmp end
code[x_, y_] := If[LessEqual[x, 3.6e-21], N[Sinh[y], $MachinePrecision], N[(N[(N[Sin[x], $MachinePrecision] * N[(y * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.6 \cdot 10^{-21}:\\
\;\;\;\;\sinh y\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin x \cdot \left(y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), 1\right)\right)}{x}\\
\end{array}
\end{array}
if x < 3.59999999999999989e-21Initial program 87.6%
Taylor expanded in x around 0
Simplified58.9%
*-commutativeN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
sinh-lowering-sinh.f6471.2
Applied egg-rr71.2%
if 3.59999999999999989e-21 < x Initial program 99.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6498.5
Simplified98.5%
(FPCore (x y) :precision binary64 (* y (fma -0.16666666666666666 (* x x) 1.0)))
double code(double x, double y) {
return y * fma(-0.16666666666666666, (x * x), 1.0);
}
function code(x, y) return Float64(y * fma(-0.16666666666666666, Float64(x * x), 1.0)) end
code[x_, y_] := N[(y * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right)
\end{array}
Initial program 90.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6483.5
Simplified83.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
Simplified49.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6440.3
Simplified40.3%
(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.9%
Taylor expanded in x around 0
Simplified53.0%
Taylor expanded in y around 0
Simplified32.4%
(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 2024196
(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))