
(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 19 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 90.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
(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 0.02)
(*
(sin x)
(/
(fma
(*
y
(*
y
(fma
y
(* y (fma 0.0001984126984126984 (* y y) 0.008333333333333333))
0.16666666666666666)))
y
y)
x))
(/
(*
(sinh y)
(fma
(fma (* x x) 0.008333333333333333 -0.16666666666666666)
(* x (* x x))
x))
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 <= 0.02) {
tmp = sin(x) * (fma((y * (y * fma(y, (y * fma(0.0001984126984126984, (y * y), 0.008333333333333333)), 0.16666666666666666))), y, y) / x);
} else {
tmp = (sinh(y) * fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), x)) / 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 <= 0.02) tmp = Float64(sin(x) * Float64(fma(Float64(y * Float64(y * fma(y, Float64(y * fma(0.0001984126984126984, Float64(y * y), 0.008333333333333333)), 0.16666666666666666))), y, y) / x)); else tmp = Float64(Float64(sinh(y) * fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), x)) / x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, 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, 0.02], N[(N[Sin[x], $MachinePrecision] * N[(N[(N[(y * N[(y * N[(y * N[(y * N[(0.0001984126984126984 * N[(y * y), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $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 0.02:\\
\;\;\;\;\sin x \cdot \frac{\mathsf{fma}\left(y \cdot \left(y \cdot \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(0.0001984126984126984, y \cdot y, 0.008333333333333333\right), 0.16666666666666666\right)\right), y, y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{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
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6469.6
Applied rewrites69.6%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0200000000000000004Initial program 80.8%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.7
Applied rewrites99.7%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites98.2%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites98.2%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites98.2%
if 0.0200000000000000004 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6473.1
Applied rewrites73.1%
Final simplification85.4%
(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-6)
(*
(fma
y
(* y (* y (fma 0.008333333333333333 (* y y) 0.16666666666666666)))
y)
(/ (sin x) x))
(/
(*
(sinh y)
(fma
(fma (* x x) 0.008333333333333333 -0.16666666666666666)
(* x (* x x))
x))
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-6) {
tmp = fma(y, (y * (y * fma(0.008333333333333333, (y * y), 0.16666666666666666))), y) * (sin(x) / x);
} else {
tmp = (sinh(y) * fma(fma((x * x), 0.008333333333333333, -0.16666666666666666), (x * (x * x)), x)) / 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-6) tmp = Float64(fma(y, Float64(y * Float64(y * fma(0.008333333333333333, Float64(y * y), 0.16666666666666666))), y) * Float64(sin(x) / x)); else tmp = Float64(Float64(sinh(y) * fma(fma(Float64(x * x), 0.008333333333333333, -0.16666666666666666), Float64(x * Float64(x * x)), x)) / x); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, 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-6], N[(N[(y * N[(y * N[(y * N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sinh[y], $MachinePrecision] * N[(N[(N[(x * x), $MachinePrecision] * 0.008333333333333333 + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $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^{-6}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right)\right), y\right) \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(\mathsf{fma}\left(x \cdot x, 0.008333333333333333, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)}{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
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6469.6
Applied rewrites69.6%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000041e-6Initial program 80.4%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6478.8
Applied rewrites78.8%
lift-sin.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6498.2
Applied rewrites98.2%
if 5.00000000000000041e-6 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6474.3
Applied rewrites74.3%
Final simplification85.4%
(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-6)
(* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
(*
(/
(fma
(fma
y
(* y (fma y (* y 0.0001984126984126984) 0.008333333333333333))
0.16666666666666666)
(* y (* y y))
y)
x)
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
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-6) {
tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
} else {
tmp = (fma(fma(y, (y * fma(y, (y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), (y * (y * y)), y) / x) * fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), 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-6) tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y)); else tmp = Float64(Float64(fma(fma(y, Float64(y * fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), Float64(y * Float64(y * y)), y) / x) * fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, 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-6], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -\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^{-6}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 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(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6469.6
Applied rewrites69.6%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000041e-6Initial program 80.4%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites98.0%
if 5.00000000000000041e-6 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites89.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.3
Applied rewrites70.3%
Final simplification84.2%
(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
x
(*
x
(*
x
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)))
x))
(if (<= t_0 5e-6)
(* (/ (sin x) x) (fma (* y y) (* y 0.16666666666666666) y))
(*
t_1
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
x))))))
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(x, (x * (x * fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666))), x);
} else if (t_0 <= 5e-6) {
tmp = (sin(x) / x) * fma((y * y), (y * 0.16666666666666666), y);
} else {
tmp = t_1 * fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(fma(fma(y, Float64(y * fma(y, Float64(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(x, Float64(x * Float64(x * fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666))), x)); elseif (t_0 <= 5e-6) tmp = Float64(Float64(sin(x) / x) * fma(Float64(y * y), Float64(y * 0.16666666666666666), y)); else tmp = Float64(t_1 * fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $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[(x * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-6], N[(N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $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, y \cdot \mathsf{fma}\left(y, y \cdot 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(x, x \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right)\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sin x}{x} \cdot \mathsf{fma}\left(y \cdot y, y \cdot 0.16666666666666666, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites93.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites66.3%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5.00000000000000041e-6Initial program 80.4%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
*-rgt-identityN/A
distribute-lft-inN/A
Applied rewrites98.0%
if 5.00000000000000041e-6 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites89.1%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6470.3
Applied rewrites70.3%
Final simplification83.5%
(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
x
(*
x
(*
x
(fma
(* x x)
(fma -0.0001984126984126984 (* x x) 0.008333333333333333)
-0.16666666666666666)))
x))
(if (<= t_0 5e-31)
(* y (/ (sin x) x))
(*
t_1
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
x))))))
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(x, (x * (x * fma((x * x), fma(-0.0001984126984126984, (x * x), 0.008333333333333333), -0.16666666666666666))), x);
} else if (t_0 <= 5e-31) {
tmp = y * (sin(x) / x);
} else {
tmp = t_1 * fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) t_1 = Float64(fma(fma(y, Float64(y * fma(y, Float64(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(x, Float64(x * Float64(x * fma(Float64(x * x), fma(-0.0001984126984126984, Float64(x * x), 0.008333333333333333), -0.16666666666666666))), x)); elseif (t_0 <= 5e-31) tmp = Float64(y * Float64(sin(x) / x)); else tmp = Float64(t_1 * fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $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[(x * N[(x * N[(x * N[(N[(x * x), $MachinePrecision] * N[(-0.0001984126984126984 * N[(x * x), $MachinePrecision] + 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-31], N[(y * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $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, y \cdot \mathsf{fma}\left(y, y \cdot 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(x, x \cdot \left(x \cdot \mathsf{fma}\left(x \cdot x, \mathsf{fma}\left(-0.0001984126984126984, x \cdot x, 0.008333333333333333\right), -0.16666666666666666\right)\right), x\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-31}:\\
\;\;\;\;y \cdot \frac{\sin x}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -inf.0Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites93.2%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
Applied rewrites66.3%
if -inf.0 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5e-31Initial program 79.8%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6497.7
Applied rewrites97.7%
if 5e-31 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites89.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.9
Applied rewrites71.9%
Final simplification83.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y))) (t_1 (/ (* (sinh y) (sin x)) x)))
(if (<= t_1 -5e-124)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma
t_0
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
y))
(if (<= t_1 5e-31)
(/ y (fma 0.16666666666666666 (* x x) 1.0))
(*
(/
(fma
(fma
y
(* y (fma y (* y 0.0001984126984126984) 0.008333333333333333))
0.16666666666666666)
t_0
y)
x)
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
x))))))
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 <= -5e-124) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(t_0, fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y);
} else if (t_1 <= 5e-31) {
tmp = y / fma(0.16666666666666666, (x * x), 1.0);
} else {
tmp = (fma(fma(y, (y * fma(y, (y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), t_0, y) / x) * fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), x);
}
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 <= -5e-124) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(t_0, fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y)); elseif (t_1 <= 5e-31) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = Float64(Float64(fma(fma(y, Float64(y * fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), t_0, y) / x) * fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x)); 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, -5e-124], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(t$95$0 * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-31], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] * t$95$0 + y), $MachinePrecision] / x), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $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 -5 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(t\_0, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-31}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), t\_0, y\right)}{x} \cdot \mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites92.8%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites92.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites62.8%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5e-31Initial program 77.7%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.6
Applied rewrites71.6%
if 5e-31 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64100.0
Applied rewrites100.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
lower-fma.f64N/A
Applied rewrites89.7%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.9
Applied rewrites71.9%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma
(* y (* y y))
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
y))
(if (<= t_0 5e-31)
(/ y (fma 0.16666666666666666 (* x x) 1.0))
(*
(fma
(fma 0.008333333333333333 (* x x) -0.16666666666666666)
(* x (* x x))
x)
(/
(fma
(* y y)
(* y (fma 0.008333333333333333 (* y y) 0.16666666666666666))
y)
x))))))
double code(double x, double y) {
double t_0 = (sinh(y) * sin(x)) / x;
double tmp;
if (t_0 <= -5e-124) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma((y * (y * y)), fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y);
} else if (t_0 <= 5e-31) {
tmp = y / fma(0.16666666666666666, (x * x), 1.0);
} else {
tmp = fma(fma(0.008333333333333333, (x * x), -0.16666666666666666), (x * (x * x)), x) * (fma((y * y), (y * fma(0.008333333333333333, (y * y), 0.16666666666666666)), y) / x);
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(sinh(y) * sin(x)) / x) tmp = 0.0 if (t_0 <= -5e-124) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(Float64(y * Float64(y * y)), fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y)); elseif (t_0 <= 5e-31) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = Float64(fma(fma(0.008333333333333333, Float64(x * x), -0.16666666666666666), Float64(x * Float64(x * x)), x) * Float64(fma(Float64(y * y), Float64(y * fma(0.008333333333333333, Float64(y * y), 0.16666666666666666)), y) / x)); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-124], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-31], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.008333333333333333 * N[(x * x), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] * N[(N[(N[(y * y), $MachinePrecision] * N[(y * N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $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 -5 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-31}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.008333333333333333, x \cdot x, -0.16666666666666666\right), x \cdot \left(x \cdot x\right), x\right) \cdot \frac{\mathsf{fma}\left(y \cdot y, y \cdot \mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right), y\right)}{x}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites92.8%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites92.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites62.8%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 5e-31Initial program 77.7%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.6
Applied rewrites71.6%
if 5e-31 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6480.5
Applied rewrites80.5%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
*-lft-identityN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f6465.3
Applied rewrites65.3%
Applied rewrites71.7%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y))) (t_1 (/ (* (sinh y) (sin x)) x)))
(if (<= t_1 -5e-124)
(*
(fma x (* x -0.16666666666666666) 1.0)
(fma
t_0
(fma
(* y y)
(fma (* y y) 0.0001984126984126984 0.008333333333333333)
0.16666666666666666)
y))
(if (<= t_1 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 1.0))
(fma
t_0
(fma
y
(* y (fma y (* y 0.0001984126984126984) 0.008333333333333333))
0.16666666666666666)
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 <= -5e-124) {
tmp = fma(x, (x * -0.16666666666666666), 1.0) * fma(t_0, fma((y * y), fma((y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y);
} else if (t_1 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 1.0);
} else {
tmp = fma(t_0, fma(y, (y * fma(y, (y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), 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 <= -5e-124) tmp = Float64(fma(x, Float64(x * -0.16666666666666666), 1.0) * fma(t_0, fma(Float64(y * y), fma(Float64(y * y), 0.0001984126984126984, 0.008333333333333333), 0.16666666666666666), y)); elseif (t_1 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = fma(t_0, fma(y, Float64(y * fma(y, Float64(y * 0.0001984126984126984), 0.008333333333333333)), 0.16666666666666666), 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, -5e-124], N[(N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(t$95$0 * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984 + 0.008333333333333333), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + 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 -5 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right) \cdot \mathsf{fma}\left(t\_0, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites92.8%
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites92.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+r+N/A
associate-*r*N/A
distribute-rgt1-inN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites62.8%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites90.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6466.8
Applied rewrites66.8%
Final simplification67.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma y (* (* x x) -0.16666666666666666) y))
(if (<= t_0 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 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 <= -5e-124) {
tmp = fma(y, (y * 0.16666666666666666), 1.0) * fma(y, ((x * x) * -0.16666666666666666), y);
} else if (t_0 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 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 <= -5e-124) tmp = Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y)); elseif (t_0 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = fma(Float64(y * Float64(y * y)), fma(y, Float64(y * fma(y, Float64(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, -5e-124], N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * N[(y * N[(y * 0.0001984126984126984), $MachinePrecision] + 0.008333333333333333), $MachinePrecision]), $MachinePrecision] + 0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sinh y \cdot \sin x}{x}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 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^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(y \cdot y\right), \mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y, y \cdot 0.0001984126984126984, 0.008333333333333333\right), 0.16666666666666666\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
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
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.7%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
lift-sin.f64N/A
lift-sinh.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in y around 0
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow3N/A
lower-fma.f64N/A
Applied rewrites90.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6466.8
Applied rewrites66.8%
Final simplification64.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(*
(fma y (* y 0.16666666666666666) 1.0)
(fma y (* (* x x) -0.16666666666666666) y))
(if (<= t_0 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 1.0))
(fma
(fma (* y y) 0.008333333333333333 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 <= -5e-124) {
tmp = fma(y, (y * 0.16666666666666666), 1.0) * fma(y, ((x * x) * -0.16666666666666666), y);
} else if (t_0 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 1.0);
} else {
tmp = fma(fma((y * y), 0.008333333333333333, 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 <= -5e-124) tmp = Float64(fma(y, Float64(y * 0.16666666666666666), 1.0) * fma(y, Float64(Float64(x * x) * -0.16666666666666666), y)); elseif (t_0 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = fma(fma(Float64(y * y), 0.008333333333333333, 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, -5e-124], N[(N[(y * N[(y * 0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] * N[(y * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * 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 -5 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 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^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
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
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites50.7%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.2
Applied rewrites81.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.4
Applied rewrites65.4%
Final simplification64.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(* y (* y (* y (fma (* x x) -0.027777777777777776 0.16666666666666666))))
(if (<= t_0 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 1.0))
(fma
(fma (* y y) 0.008333333333333333 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 <= -5e-124) {
tmp = y * (y * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else if (t_0 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 1.0);
} else {
tmp = fma(fma((y * y), 0.008333333333333333, 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 <= -5e-124) tmp = Float64(y * Float64(y * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); elseif (t_0 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 1.0)); else tmp = fma(fma(Float64(y * y), 0.008333333333333333, 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, -5e-124], N[(y * N[(y * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * 0.008333333333333333 + 0.16666666666666666), $MachinePrecision] * 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 -5 \cdot 10^{-124}:\\
\;\;\;\;y \cdot \left(y \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, 0.008333333333333333, 0.16666666666666666\right), y \cdot \left(y \cdot y\right), y\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < -5.0000000000000003e-124Initial program 99.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6448.2
Applied rewrites48.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6436.3
Applied rewrites36.3%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6481.2
Applied rewrites81.2%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.4
Applied rewrites65.4%
Final simplification60.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(* y (* y (* y (fma (* x x) -0.027777777777777776 0.16666666666666666))))
(if (<= t_0 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 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 <= -5e-124) {
tmp = y * (y * (y * fma((x * x), -0.027777777777777776, 0.16666666666666666)));
} else if (t_0 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 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 <= -5e-124) tmp = Float64(y * Float64(y * Float64(y * fma(Float64(x * x), -0.027777777777777776, 0.16666666666666666)))); elseif (t_0 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 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, -5e-124], N[(y * N[(y * N[(y * N[(N[(x * x), $MachinePrecision] * -0.027777777777777776 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $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 -5 \cdot 10^{-124}:\\
\;\;\;\;y \cdot \left(y \cdot \left(y \cdot \mathsf{fma}\left(x \cdot x, -0.027777777777777776, 0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 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) < -5.0000000000000003e-124Initial program 99.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6448.2
Applied rewrites48.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6436.3
Applied rewrites36.3%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.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
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6472.0
Applied rewrites72.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.5
Applied rewrites56.5%
Final simplification57.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (sinh y) (sin x)) x)))
(if (<= t_0 -5e-124)
(* y (fma x (* x -0.16666666666666666) 1.0))
(if (<= t_0 5e-48)
(/ y (fma 0.16666666666666666 (* x x) 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 <= -5e-124) {
tmp = y * fma(x, (x * -0.16666666666666666), 1.0);
} else if (t_0 <= 5e-48) {
tmp = y / fma(0.16666666666666666, (x * x), 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 <= -5e-124) tmp = Float64(y * fma(x, Float64(x * -0.16666666666666666), 1.0)); elseif (t_0 <= 5e-48) tmp = Float64(y / fma(0.16666666666666666, Float64(x * x), 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, -5e-124], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-48], N[(y / N[(0.16666666666666666 * N[(x * x), $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 -5 \cdot 10^{-124}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(0.16666666666666666, x \cdot x, 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) < -5.0000000000000003e-124Initial program 99.0%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6421.7
Applied rewrites21.7%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6427.5
Applied rewrites27.5%
if -5.0000000000000003e-124 < (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 4.9999999999999999e-48Initial program 77.1%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6499.1
Applied rewrites99.1%
lift-sin.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.0
Applied rewrites99.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6471.7
Applied rewrites71.7%
if 4.9999999999999999e-48 < (/.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
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6472.0
Applied rewrites72.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.5
Applied rewrites56.5%
Final simplification54.9%
(FPCore (x y) :precision binary64 (if (<= (/ (* (sinh y) (sin x)) x) 0.02) (* y (fma x (* x -0.16666666666666666) 1.0)) (* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (((sinh(y) * sin(x)) / x) <= 0.02) {
tmp = y * fma(x, (x * -0.16666666666666666), 1.0);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (Float64(Float64(sinh(y) * sin(x)) / x) <= 0.02) tmp = Float64(y * fma(x, Float64(x * -0.16666666666666666), 1.0)); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[N[(N[(N[Sinh[y], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], 0.02], N[(y * N[(x * N[(x * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\sinh y \cdot \sin x}{x} \leq 0.02:\\
\;\;\;\;y \cdot \mathsf{fma}\left(x, x \cdot -0.16666666666666666, 1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sin.f64 x) (sinh.f64 y)) x) < 0.0200000000000000004Initial program 86.5%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6469.3
Applied rewrites69.3%
Taylor expanded in x around 0
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
if 0.0200000000000000004 < (/.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
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6468.4
Applied rewrites68.4%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6465.6
Applied rewrites65.6%
Taylor expanded in x around 0
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.9
Applied rewrites51.9%
Final simplification42.1%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(fma
y
(* y (* y (fma 0.008333333333333333 (* y y) 0.16666666666666666)))
y)
(/ (sin x) x))))
(if (<= y 520.0)
t_0
(if (<= y 1.15e+62)
(/ (* (sinh y) (fma x (* (* x x) -0.16666666666666666) x)) x)
t_0))))
double code(double x, double y) {
double t_0 = fma(y, (y * (y * fma(0.008333333333333333, (y * y), 0.16666666666666666))), y) * (sin(x) / x);
double tmp;
if (y <= 520.0) {
tmp = t_0;
} else if (y <= 1.15e+62) {
tmp = (sinh(y) * fma(x, ((x * x) * -0.16666666666666666), x)) / x;
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y) t_0 = Float64(fma(y, Float64(y * Float64(y * fma(0.008333333333333333, Float64(y * y), 0.16666666666666666))), y) * Float64(sin(x) / x)) tmp = 0.0 if (y <= 520.0) tmp = t_0; elseif (y <= 1.15e+62) tmp = Float64(Float64(sinh(y) * fma(x, Float64(Float64(x * x) * -0.16666666666666666), x)) / x); else tmp = t_0; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * N[(y * N[(y * N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] * N[(N[Sin[x], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 520.0], t$95$0, If[LessEqual[y, 1.15e+62], N[(N[(N[Sinh[y], $MachinePrecision] * N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(y, y \cdot \left(y \cdot \mathsf{fma}\left(0.008333333333333333, y \cdot y, 0.16666666666666666\right)\right), y\right) \cdot \frac{\sin x}{x}\\
\mathbf{if}\;y \leq 520:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+62}:\\
\;\;\;\;\frac{\sinh y \cdot \mathsf{fma}\left(x, \left(x \cdot x\right) \cdot -0.16666666666666666, x\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 520 or 1.14999999999999992e62 < y Initial program 89.6%
Taylor expanded in y around 0
+-commutativeN/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
*-rgt-identityN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6482.2
Applied rewrites82.2%
lift-sin.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6492.4
Applied rewrites92.4%
if 520 < y < 1.14999999999999992e62Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6490.0
Applied rewrites90.0%
Final simplification92.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (* y (* (* y y) 0.16666666666666666)))) (if (<= y 9.5e-251) t_0 (if (<= y 62000000.0) y t_0))))
double code(double x, double y) {
double t_0 = y * ((y * y) * 0.16666666666666666);
double tmp;
if (y <= 9.5e-251) {
tmp = t_0;
} else if (y <= 62000000.0) {
tmp = y;
} else {
tmp = t_0;
}
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 = y * ((y * y) * 0.16666666666666666d0)
if (y <= 9.5d-251) then
tmp = t_0
else if (y <= 62000000.0d0) then
tmp = y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * ((y * y) * 0.16666666666666666);
double tmp;
if (y <= 9.5e-251) {
tmp = t_0;
} else if (y <= 62000000.0) {
tmp = y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * ((y * y) * 0.16666666666666666) tmp = 0 if y <= 9.5e-251: tmp = t_0 elif y <= 62000000.0: tmp = y else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)) tmp = 0.0 if (y <= 9.5e-251) tmp = t_0; elseif (y <= 62000000.0) tmp = y; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * ((y * y) * 0.16666666666666666); tmp = 0.0; if (y <= 9.5e-251) tmp = t_0; elseif (y <= 62000000.0) tmp = y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 9.5e-251], t$95$0, If[LessEqual[y, 62000000.0], y, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\mathbf{if}\;y \leq 9.5 \cdot 10^{-251}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 62000000:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 9.49999999999999927e-251 or 6.2e7 < y Initial program 93.0%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6472.9
Applied rewrites72.9%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6450.9
Applied rewrites50.9%
Taylor expanded in x around 0
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.2
Applied rewrites45.2%
if 9.49999999999999927e-251 < y < 6.2e7Initial program 79.6%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6492.7
Applied rewrites92.7%
Taylor expanded in x around 0
Applied rewrites57.4%
*-rgt-identity57.4
Applied rewrites57.4%
Final simplification47.9%
(FPCore (x y) :precision binary64 (if (<= x 115000000.0) (fma 0.16666666666666666 (* y (* y y)) y) (* y (* (* y y) 0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (x <= 115000000.0) {
tmp = fma(0.16666666666666666, (y * (y * y)), y);
} else {
tmp = y * ((y * y) * 0.16666666666666666);
}
return tmp;
}
function code(x, y) tmp = 0.0 if (x <= 115000000.0) tmp = fma(0.16666666666666666, Float64(y * Float64(y * y)), y); else tmp = Float64(y * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
code[x_, y_] := If[LessEqual[x, 115000000.0], N[(0.16666666666666666 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(y * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 115000000:\\
\;\;\;\;\mathsf{fma}\left(0.16666666666666666, y \cdot \left(y \cdot y\right), y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 1.15e8Initial program 87.1%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.6
Applied rewrites70.6%
Taylor expanded in x around 0
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lft-identityN/A
lower-fma.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6460.6
Applied rewrites60.6%
if 1.15e8 < x Initial program 99.9%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
lower-sin.f64N/A
+-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6482.2
Applied rewrites82.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
associate-*r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f6457.8
Applied rewrites57.8%
Taylor expanded in x around 0
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6450.0
Applied rewrites50.0%
Final simplification58.2%
(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.0%
Taylor expanded in y around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6452.3
Applied rewrites52.3%
Taylor expanded in x around 0
Applied rewrites28.1%
*-rgt-identity28.1
Applied rewrites28.1%
(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 2024216
(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))