
(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 23 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(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 89.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.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))
(/ (* (sinh y) (fma x (* (* x x) -0.16666666666666666) x)) x)
(if (<= t_0 5e-7)
(* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
(* x (/ (sinh y) x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (sinh(y) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else if (t_0 <= 5e-7) {
tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(sinh(y) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); elseif (t_0 <= 5e-7) tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.5
Simplified68.5%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 80.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Simplified98.6%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification87.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x)
(fma
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)
(* x (* x x))
x))
(if (<= t_0 5e-7)
(* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
(* x (/ (sinh y) x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x) * fma(fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x);
} else if (t_0 <= 5e-7) {
tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x) * fma(fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x)); elseif (t_0 <= 5e-7) tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified92.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified65.0%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 80.5%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Simplified98.6%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification87.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x)
(fma
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)
(* x (* x x))
x))
(if (<= t_0 5e-7)
(* (/ y x) (* (sin x) (fma y (* y 0.16666666666666666) 1.0)))
(* x (/ (sinh y) x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x) * fma(fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x);
} else if (t_0 <= 5e-7) {
tmp = (y / x) * (sin(x) * fma(y, (y * 0.16666666666666666), 1.0));
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x) * fma(fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x)); elseif (t_0 <= 5e-7) tmp = Float64(Float64(y / x) * Float64(sin(x) * fma(y, Float64(y * 0.16666666666666666), 1.0))); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(N[(y / x), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] * N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{x} \cdot \left(\sin x \cdot \mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified92.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified65.0%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 80.5%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6479.2
Simplified79.2%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6498.5
Applied egg-rr98.5%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification87.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 (- INFINITY))
(*
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x)
(fma
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)
(* x (* x x))
x))
(if (<= t_0 5e-7) (* y (/ (sin x) x)) (* x (/ (sinh y) x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x) * fma(fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x);
} else if (t_0 <= 5e-7) {
tmp = y * (sin(x) / x);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x) * fma(fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x)); elseif (t_0 <= 5e-7) tmp = Float64(y * Float64(sin(x) / x)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified92.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified65.0%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 80.5%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6
Simplified97.6%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification86.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x))
(t_1
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x)))
(if (<= t_0 (- INFINITY))
(*
t_1
(fma
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)
(* x (* x x))
x))
(if (<= t_0 5e-7) (* y (/ (sin x) x)) (* x t_1)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = t_1 * fma(fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x);
} else if (t_0 <= 5e-7) {
tmp = y * (sin(x) / x);
} else {
tmp = x * t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(t_1 * fma(fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x)); elseif (t_0 <= 5e-7) tmp = Float64(y * Float64(sin(x) / x)); else tmp = Float64(x * t_1); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(t$95$1 * N[(N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified92.9%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
pow-plusN/A
metadata-evalN/A
cube-unmultN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
Simplified65.0%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 80.5%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6
Simplified97.6%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
Simplified71.3%
Final simplification84.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)) (t_1 (* y (* y y))))
(if (<= t_0 -2e-118)
(*
t_1
(*
(fma
(fma
(* x x)
(fma (* x x) -0.0001984126984126984 0.008333333333333333)
-0.16666666666666666)
(* x (* x x))
x)
(/ 0.16666666666666666 x)))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(*
x
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
t_1
y)
x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = y * (y * y);
double tmp;
if (t_0 <= -2e-118) {
tmp = t_1 * (fma(fma((x * x), fma((x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), (x * (x * x)), x) * (0.16666666666666666 / x));
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = x * (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), t_1, y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(y * Float64(y * y)) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(t_1 * Float64(fma(fma(Float64(x * x), fma(Float64(x * x), -0.0001984126984126984, 0.008333333333333333), -0.16666666666666666), Float64(x * Float64(x * x)), x) * Float64(0.16666666666666666 / x))); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = Float64(x * Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), t_1, y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-118], N[(t$95$1 * N[(N[(N[(N[(x * x), $MachinePrecision] * N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(0.16666666666666666 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$1 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := y \cdot \left(y \cdot y\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;t\_1 \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(x \cdot x, -0.0001984126984126984, 0.008333333333333333\right), -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right) \cdot \frac{0.16666666666666666}{x}\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), t\_1, y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8
Simplified71.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified54.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
Simplified43.1%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
Simplified71.3%
Final simplification63.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (fma (* y y) 0.0001984126984126984 0.008333333333333333))
(t_1 (/ (* (sinh y) (sin x)) x)))
(if (<= t_1 -2e-118)
(*
(fma y (* (* y y) (fma y (* y t_0) 0.16666666666666666)) y)
(fma -0.16666666666666666 (* x x) 1.0))
(if (<= t_1 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(*
x
(/ (fma (fma (* y y) t_0 0.16666666666666666) (* y (* y y)) y) x))))))
double code(double x, double y) {
double t_0 = fma((y * y), 0.0001984126984126984, 0.008333333333333333);
double t_1 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_1 <= -2e-118) {
tmp = fma(y, ((y * y) * fma(y, (y * t_0), 0.16666666666666666)), y) * fma(-0.16666666666666666, (x * x), 1.0);
} else if (t_1 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = x * (fma(fma((y * y), t_0, 0.16666666666666666), (y * (y * y)), y) / x);
}
return tmp;
}
function code(x, y) t_0 = fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333) t_1 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_1 <= -2e-118) tmp = Float64(fma(y, Float64(Float64(y * y) * fma(y, Float64(y * t_0), 0.16666666666666666)), y) * fma(-0.16666666666666666, Float64(x * x), 1.0)); elseif (t_1 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = Float64(x * Float64(fma(fma(Float64(y * y), t_0, 0.16666666666666666), Float64(y * Float64(y * y)), y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-118], N[(N[(y * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * t$95$0), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(-0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(y * y), $MachinePrecision] * t$95$0 + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right)\\
t_1 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot t\_0, 0.16666666666666666\right), y\right) \cdot \mathsf{fma}\left(-0.16666666666666666, x \cdot x, 1\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, t\_0, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified93.6%
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
Simplified65.2%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
Simplified71.3%
Final simplification69.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-118)
(*
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0)
(fma y (* (* x x) -0.16666666666666666) y))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(*
x
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-118) {
tmp = fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(y, ((x * x) * -0.16666666666666666), y);
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = x * (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y)); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = Float64(x * Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-118], N[(N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified87.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified61.9%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
Simplified71.3%
Final simplification68.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-118)
(*
(fma y (* y (fma y (* y 0.008333333333333333) 0.16666666666666666)) 1.0)
(fma y (* (* x x) -0.16666666666666666) y))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma
y
(*
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666))
y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-118) {
tmp = fma(y, (y * fma(y, (y * 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(y, ((x * x) * -0.16666666666666666), y);
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(y, ((y * y) * fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(fma(y, Float64(y * fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666)), 1.0) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y)); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(y, Float64(Float64(y * y) * fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), 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-118], N[(N[(y * N[(y * N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $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]), $MachinePrecision] + 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^{-118}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), 1\right) \cdot \mathsf{fma}\left(y, \left(x \cdot x\right) \cdot -0.16666666666666666, y\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified87.4%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified61.9%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
+-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
Simplified65.7%
Final simplification67.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-118)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma 0.16666666666666666 (* y (* y y)) y))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma
y
(*
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666))
y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-118) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, (y * (y * y)), y);
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(y, ((y * y) * fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, Float64(y * Float64(y * y)), y)); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(y, Float64(Float64(y * y) * fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), 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-118], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $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]), $MachinePrecision] + 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^{-118}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, y \cdot \left(y \cdot y\right), y\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8
Simplified71.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified54.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
Simplified52.7%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified88.2%
Taylor expanded in x around 0
+-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
Simplified65.7%
Final simplification64.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y))) (t_1 (/ (* (sinh y) (sin x)) x)))
(if (<= t_1 -2e-118)
(* (fma x (* x -0.16666666666666666) 1.0) (fma 0.16666666666666666 t_0 y))
(if (<= t_1 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma (fma y (* y 0.008333333333333333) 0.16666666666666666) t_0 y)))))
double code(double x, double y) {
double t_0 = y * (y * y);
double t_1 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_1 <= -2e-118) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, t_0, y);
} else if (t_1 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(fma(y, (y * 0.008333333333333333), 0.16666666666666666), t_0, y);
}
return tmp;
}
function code(x, y) t_0 = Float64(y * Float64(y * y)) t_1 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_1 <= -2e-118) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(0.16666666666666666, t_0, y)); elseif (t_1 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), t_0, y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-118], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(0.16666666666666666 * t$95$0 + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$0 + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \cdot y\right)\\
t_1 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(0.16666666666666666, t\_0, y\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), t\_0, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8
Simplified71.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified54.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
Simplified52.7%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6
Simplified62.6%
Final simplification64.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)) (t_1 (* y (* y y))))
(if (<= t_0 -2e-118)
(* t_1 (fma (* x x) -0.027777777777777776 0.16666666666666666))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma (fma y (* y 0.008333333333333333) 0.16666666666666666) t_1 y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = y * (y * y);
double tmp;
if (t_0 <= -2e-118) {
tmp = t_1 * fma((x * x), -0.027777777777777776, 0.16666666666666666);
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(fma(y, (y * 0.008333333333333333), 0.16666666666666666), t_1, y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(y * Float64(y * y)) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(t_1 * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(fma(y, Float64(y * 0.008333333333333333), 0.16666666666666666), t_1, y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-118], N[(t$95$1 * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(y * 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$1 + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := y \cdot \left(y \cdot y\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot 0.008333333333333333, 0.16666666666666666\right), t\_1, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8
Simplified71.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified54.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
Simplified52.7%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval41.7
Simplified41.7%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified78.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6
Simplified62.6%
Final simplification61.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)) (t_1 (* y (* y y))))
(if (<= t_0 -2e-118)
(* t_1 (fma (* x x) -0.027777777777777776 0.16666666666666666))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma 0.16666666666666666 t_1 y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double t_1 = y * (y * y);
double tmp;
if (t_0 <= -2e-118) {
tmp = t_1 * fma((x * x), -0.027777777777777776, 0.16666666666666666);
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(0.16666666666666666, t_1, y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(y * Float64(y * y)) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(t_1 * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(0.16666666666666666, t_1, y); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-118], N[(t$95$1 * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * t$95$1 + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
t_1 := y \cdot \left(y \cdot y\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-118}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, t\_1, y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8
Simplified71.8%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified54.1%
Taylor expanded in x around 0
associate-*r*N/A
distribute-lft1-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
Simplified52.7%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-eval41.7
Simplified41.7%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6473.3
Simplified73.3%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified62.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.4
Simplified59.4%
Final simplification60.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-118)
(* y (* x (* x -0.16666666666666666)))
(if (<= t_0 5e-7)
(/ y (fma x (* x 0.16666666666666666) 1.0))
(fma 0.16666666666666666 (* y (* y y)) y)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-118) {
tmp = y * (x * (x * -0.16666666666666666));
} else if (t_0 <= 5e-7) {
tmp = y / fma(x, (x * 0.16666666666666666), 1.0);
} else {
tmp = fma(0.16666666666666666, (y * (y * y)), y);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-118) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); elseif (t_0 <= 5e-7) tmp = Float64(y / fma(x, Float64(x * 0.16666666666666666), 1.0)); else tmp = fma(0.16666666666666666, Float64(y * Float64(y * y)), 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-118], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], N[(y / N[(x * N[(x * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + 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^{-118}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x \cdot 0.16666666666666666, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot \left(y \cdot y\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999997e-118Initial program 100.0%
Taylor expanded in y around 0
Simplified16.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.2
Simplified28.2%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6413.8
Simplified13.8%
if -1.99999999999999997e-118 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 79.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Simplified98.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6498.3
Applied egg-rr98.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6470.2
Simplified70.2%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6473.3
Simplified73.3%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified62.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.4
Simplified59.4%
Final simplification53.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -2e-201)
(* y (* x (* x -0.16666666666666666)))
(if (<= t_0 0.001) y (/ (* y x) x)))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -2e-201) {
tmp = y * (x * (x * -0.16666666666666666));
} else if (t_0 <= 0.001) {
tmp = y;
} else {
tmp = (y * x) / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (sinh(y) * sin(x)) / x
if (t_0 <= (-2d-201)) then
tmp = y * (x * (x * (-0.16666666666666666d0)))
else if (t_0 <= 0.001d0) then
tmp = y
else
tmp = (y * x) / x
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (Math.sinh(y) * Math.sin(x)) / x;
double tmp;
if (t_0 <= -2e-201) {
tmp = y * (x * (x * -0.16666666666666666));
} else if (t_0 <= 0.001) {
tmp = y;
} else {
tmp = (y * x) / x;
}
return tmp;
}
def code(x, y): t_0 = (math.sinh(y) * math.sin(x)) / x tmp = 0 if t_0 <= -2e-201: tmp = y * (x * (x * -0.16666666666666666)) elif t_0 <= 0.001: tmp = y else: tmp = (y * x) / x return tmp
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -2e-201) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); elseif (t_0 <= 0.001) tmp = y; else tmp = Float64(Float64(y * x) / x); end return tmp end
function tmp_2 = code(x, y) t_0 = (sinh(y) * sin(x)) / x; tmp = 0.0; if (t_0 <= -2e-201) tmp = y * (x * (x * -0.16666666666666666)); elseif (t_0 <= 0.001) tmp = y; else tmp = (y * x) / x; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-201], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.001], y, N[(N[(y * x), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-201}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t\_0 \leq 0.001:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999989e-201Initial program 99.7%
Taylor expanded in y around 0
Simplified28.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8
Simplified28.8%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6412.0
Simplified12.0%
if -1.99999999999999989e-201 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 1e-3Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.0
Simplified99.0%
Taylor expanded in x around 0
Simplified44.2%
if 1e-3 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
Simplified5.0%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f6415.1
Simplified15.1%
Final simplification27.3%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-7)
(*
(fma
y
(*
(* y y)
(fma
y
(* y (fma (* y y) 0.0001984126984126984 0.008333333333333333))
0.16666666666666666))
y)
(/ (sin x) x))
(* x (/ (sinh y) x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-7) {
tmp = fma(y, ((y * y) * fma(y, (y * fma((y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), y) * (sin(x) / x);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-7) tmp = Float64(fma(y, Float64(Float64(y * y) * fma(y, Float64(y * fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333)), 0.16666666666666666)), y) * Float64(sin(x) / x)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-7], N[(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]), $MachinePrecision] + y), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(y \cdot y\right) \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right) \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 86.0%
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%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified97.3%
Taylor expanded in x around inf
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified96.4%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification92.6%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-7)
(*
(sin x)
(/
(fma
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
(* y (* y y))
y)
x))
(* x (/ (sinh y) x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-7) {
tmp = sin(x) * (fma(fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), (y * (y * y)), y) / x);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-7) tmp = Float64(sin(x) * Float64(fma(fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-7], N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 86.0%
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%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified97.3%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification93.3%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-7)
(*
(sin x)
(/
(fma
(fma (* y y) (* (* y y) 0.0001984126984126984) 0.16666666666666666)
(* y (* y y))
y)
x))
(* x (/ (sinh y) x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-7) {
tmp = sin(x) * (fma(fma((y * y), ((y * y) * 0.0001984126984126984), 0.16666666666666666), (y * (y * y)), y) / x);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-7) tmp = Float64(sin(x) * Float64(fma(fma(Float64(y * y), Float64(Float64(y * y) * 0.0001984126984126984), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-7], N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \left(y \cdot y\right) \cdot 0.0001984126984126984, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 86.0%
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%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
accelerator-lowering-fma.f64N/A
Simplified97.3%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.9
Simplified96.9%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification93.0%
(FPCore (x y)
:precision binary64
(if (<= (/ (* (sinh y) (sin x)) x) 5e-7)
(*
(*
(sin x)
(fma y (* y (fma (* y y) 0.008333333333333333 0.16666666666666666)) 1.0))
(/ y x))
(* x (/ (sinh y) x))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 5e-7) {
tmp = (sin(x) * fma(y, (y * fma((y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)) * (y / x);
} else {
tmp = x * (sinh(y) / x);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 5e-7) tmp = Float64(Float64(sin(x) * fma(y, Float64(y * fma(Float64(y * y), 0.008333333333333333, 0.16666666666666666)), 1.0)) * Float64(y / x)); else tmp = Float64(x * Float64(sinh(y) / x)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 5e-7], N[(N[(N[Sin[x], $MachinePrecision] * N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\left(\sin x \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), 1\right)\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\sinh y}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.99999999999999977e-7Initial program 86.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-lft-inN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
Simplified81.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6494.7
Applied egg-rr94.7%
if 4.99999999999999977e-7 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64N/A
sin-lowering-sin.f64100.0
Applied egg-rr100.0%
Taylor expanded in x around 0
Simplified81.5%
Final simplification91.4%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -2e-201) (* y (* x (* x -0.16666666666666666))) (fma 0.16666666666666666 (* y (* y y)) y)))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -2e-201) {
tmp = y * (x * (x * -0.16666666666666666));
} else {
tmp = fma(0.16666666666666666, (y * (y * y)), y);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= -2e-201) tmp = Float64(y * Float64(x * Float64(x * -0.16666666666666666))); else tmp = fma(0.16666666666666666, Float64(y * Float64(y * y)), y); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], -2e-201], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.16666666666666666 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq -2 \cdot 10^{-201}:\\
\;\;\;\;y \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot \left(y \cdot y\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -1.99999999999999989e-201Initial program 99.7%
Taylor expanded in y around 0
Simplified28.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8
Simplified28.8%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6412.0
Simplified12.0%
if -1.99999999999999989e-201 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.3%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6475.6
Simplified75.6%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
+-commutativeN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Simplified35.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.6
Simplified49.6%
Final simplification38.4%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) -2e-201) (* y (* x (* x -0.16666666666666666))) y))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= -2e-201) {
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) <= (-2d-201)) 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) <= -2e-201) {
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) <= -2e-201: 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) <= -2e-201) 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) <= -2e-201) 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], -2e-201], 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 -2 \cdot 10^{-201}:\\
\;\;\;\;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) < -1.99999999999999989e-201Initial program 99.7%
Taylor expanded in y around 0
Simplified28.3%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8
Simplified28.8%
Taylor expanded in x around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f6412.0
Simplified12.0%
if -1.99999999999999989e-201 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 85.3%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6465.6
Simplified65.6%
Taylor expanded in x around 0
Simplified30.2%
Final simplification24.8%
(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 89.6%
Taylor expanded in y around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6454.6
Simplified54.6%
Taylor expanded in x around 0
Simplified26.7%
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) x)))
double code(double x, double y) {
return sin(x) * (sinh(y) / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / x)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / x);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / x)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / x)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / x); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{x}
\end{array}
herbie shell --seed 2024199
(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))