
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 30 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y)))
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.sin(x) * (math.sinh(y) / y)
function code(x, y) return Float64(sin(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = sin(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (* y y) 0.0001984126984126984)))
(if (<= y 230.0)
(*
(sin x)
(+
1.0
(*
(* y y)
(+ 0.16666666666666666 (* (* y y) (+ 0.008333333333333333 t_0))))))
(if (<= y 1.8e+48)
(* (/ (sinh y) y) (* x (+ 1.0 (* (* x x) -0.16666666666666666))))
(*
(sin x)
(+ 1.0 (* (* y y) (+ 0.16666666666666666 (* (* y y) t_0)))))))))
double code(double x, double y) {
double t_0 = (y * y) * 0.0001984126984126984;
double tmp;
if (y <= 230.0) {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + t_0)))));
} else if (y <= 1.8e+48) {
tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 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) * 0.0001984126984126984d0
if (y <= 230.0d0) then
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + t_0)))))
else if (y <= 1.8d+48) then
tmp = (sinh(y) / y) * (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0))))
else
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * t_0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y * y) * 0.0001984126984126984;
double tmp;
if (y <= 230.0) {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + t_0)))));
} else if (y <= 1.8e+48) {
tmp = (Math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0))));
}
return tmp;
}
def code(x, y): t_0 = (y * y) * 0.0001984126984126984 tmp = 0 if y <= 230.0: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + t_0))))) elif y <= 1.8e+48: tmp = (math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))) else: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))) return tmp
function code(x, y) t_0 = Float64(Float64(y * y) * 0.0001984126984126984) tmp = 0.0 if (y <= 230.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + t_0)))))); elseif (y <= 1.8e+48) tmp = Float64(Float64(sinh(y) / y) * Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)))); else tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * t_0))))); end return tmp end
function tmp_2 = code(x, y) t_0 = (y * y) * 0.0001984126984126984; tmp = 0.0; if (y <= 230.0) tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + t_0))))); elseif (y <= 1.8e+48) tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))); else tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]}, If[LessEqual[y, 230.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+48], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y \cdot y\right) \cdot 0.0001984126984126984\\
\mathbf{if}\;y \leq 230:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + t\_0\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot t\_0\right)\right)\\
\end{array}
\end{array}
if y < 230Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified91.5%
if 230 < y < 1.79999999999999992e48Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
if 1.79999999999999992e48 < y Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified98.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.5%
Simplified98.5%
Final simplification92.5%
(FPCore (x y)
:precision binary64
(if (<= y 230.0)
(*
(sin x)
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(if (<= y 1.8e+48)
(* (/ (sinh y) y) (* x (+ 1.0 (* (* x x) -0.16666666666666666))))
(*
(sin x)
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(* (* y y) (* (* y y) 0.0001984126984126984)))))))))
double code(double x, double y) {
double tmp;
if (y <= 230.0) {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 1.8e+48) {
tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * ((y * y) * 0.0001984126984126984)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 230.0d0) then
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else if (y <= 1.8d+48) then
tmp = (sinh(y) / y) * (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0))))
else
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * ((y * y) * 0.0001984126984126984d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 230.0) {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 1.8e+48) {
tmp = (Math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * ((y * y) * 0.0001984126984126984)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 230.0: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) elif y <= 1.8e+48: tmp = (math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))) else: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * ((y * y) * 0.0001984126984126984))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 230.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); elseif (y <= 1.8e+48) tmp = Float64(Float64(sinh(y) / y) * Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)))); else tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(Float64(y * y) * 0.0001984126984126984)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 230.0) tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); elseif (y <= 1.8e+48) tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))); else tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * ((y * y) * 0.0001984126984126984))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 230.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+48], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 230:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(\left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\\
\end{array}
\end{array}
if y < 230Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified88.8%
if 230 < y < 1.79999999999999992e48Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
if 1.79999999999999992e48 < y Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified98.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.5%
Simplified98.5%
Final simplification90.5%
(FPCore (x y)
:precision binary64
(if (<= y 230.0)
(*
(sin x)
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(if (<= y 1.8e+48)
(* (/ (sinh y) y) (* x (+ 1.0 (* (* x x) -0.16666666666666666))))
(*
(sin x)
(+ 1.0 (* (* y y) (* y (* 0.0001984126984126984 (* y (* y y))))))))))
double code(double x, double y) {
double tmp;
if (y <= 230.0) {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 1.8e+48) {
tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = sin(x) * (1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 230.0d0) then
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else if (y <= 1.8d+48) then
tmp = (sinh(y) / y) * (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0))))
else
tmp = sin(x) * (1.0d0 + ((y * y) * (y * (0.0001984126984126984d0 * (y * (y * y))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 230.0) {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 1.8e+48) {
tmp = (Math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666)));
} else {
tmp = Math.sin(x) * (1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y))))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 230.0: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) elif y <= 1.8e+48: tmp = (math.sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))) else: tmp = math.sin(x) * (1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y)))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 230.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); elseif (y <= 1.8e+48) tmp = Float64(Float64(sinh(y) / y) * Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666)))); else tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 230.0) tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); elseif (y <= 1.8e+48) tmp = (sinh(y) / y) * (x * (1.0 + ((x * x) * -0.16666666666666666))); else tmp = sin(x) * (1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 230.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+48], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 230:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 230Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified88.8%
if 230 < y < 1.79999999999999992e48Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
if 1.79999999999999992e48 < y Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified98.5%
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.5%
Applied egg-rr98.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.5%
Simplified98.5%
Final simplification90.5%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(*
(sin x)
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(if (<= y 3.8e+77)
(* x (/ (sinh y) y))
(* (sin x) (+ 1.0 (* y (* y (* (* y y) 0.008333333333333333))))))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 3.8e+77) {
tmp = x * (sinh(y) / y);
} else {
tmp = sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else if (y <= 3.8d+77) then
tmp = x * (sinh(y) / y)
else
tmp = sin(x) * (1.0d0 + (y * (y * ((y * y) * 0.008333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (y <= 3.8e+77) {
tmp = x * (Math.sinh(y) / y);
} else {
tmp = Math.sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) elif y <= 3.8e+77: tmp = x * (math.sinh(y) / y) else: tmp = math.sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333)))) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); elseif (y <= 3.8e+77) tmp = Float64(x * Float64(sinh(y) / y)); else tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); elseif (y <= 3.8e+77) tmp = x * (sinh(y) / y); else tmp = sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333)))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+77], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified88.4%
if 1.04e8 < y < 3.8000000000000001e77Initial program 100.0%
Taylor expanded in x around 0
Simplified90.9%
if 3.8000000000000001e77 < y Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(* (sin x) (+ 1.0 (* y (* y 0.16666666666666666))))
(if (<= y 3.8e+77)
(* x (/ (sinh y) y))
(* (sin x) (+ 1.0 (* y (* y (* (* y y) 0.008333333333333333))))))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 3.8e+77) {
tmp = x * (sinh(y) / y);
} else {
tmp = sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
else if (y <= 3.8d+77) then
tmp = x * (sinh(y) / y)
else
tmp = sin(x) * (1.0d0 + (y * (y * ((y * y) * 0.008333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 3.8e+77) {
tmp = x * (Math.sinh(y) / y);
} else {
tmp = Math.sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) elif y <= 3.8e+77: tmp = x * (math.sinh(y) / y) else: tmp = math.sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333)))) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); elseif (y <= 3.8e+77) tmp = Float64(x * Float64(sinh(y) / y)); else tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * Float64(Float64(y * y) * 0.008333333333333333))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); elseif (y <= 3.8e+77) tmp = x * (sinh(y) / y); else tmp = sin(x) * (1.0 + (y * (y * ((y * y) * 0.008333333333333333)))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+77], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot \left(\left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.2%
Simplified81.2%
if 1.04e8 < y < 3.8000000000000001e77Initial program 100.0%
Taylor expanded in x around 0
Simplified90.9%
if 3.8000000000000001e77 < y Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(* (sin x) (+ 1.0 (* y (* y 0.16666666666666666))))
(if (<= y 3.4e+94)
(* x (/ (sinh y) y))
(* y (* y (* y (* y (* (sin x) 0.008333333333333333))))))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 3.4e+94) {
tmp = x * (sinh(y) / y);
} else {
tmp = y * (y * (y * (y * (sin(x) * 0.008333333333333333))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
else if (y <= 3.4d+94) then
tmp = x * (sinh(y) / y)
else
tmp = y * (y * (y * (y * (sin(x) * 0.008333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 3.4e+94) {
tmp = x * (Math.sinh(y) / y);
} else {
tmp = y * (y * (y * (y * (Math.sin(x) * 0.008333333333333333))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) elif y <= 3.4e+94: tmp = x * (math.sinh(y) / y) else: tmp = y * (y * (y * (y * (math.sin(x) * 0.008333333333333333)))) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); elseif (y <= 3.4e+94) tmp = Float64(x * Float64(sinh(y) / y)); else tmp = Float64(y * Float64(y * Float64(y * Float64(y * Float64(sin(x) * 0.008333333333333333))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); elseif (y <= 3.4e+94) tmp = x * (sinh(y) / y); else tmp = y * (y * (y * (y * (sin(x) * 0.008333333333333333)))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+94], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(y * N[(y * N[(y * N[(N[Sin[x], $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+94}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y \cdot \left(y \cdot \left(y \cdot \left(\sin x \cdot 0.008333333333333333\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.2%
Simplified81.2%
if 1.04e8 < y < 3.4000000000000002e94Initial program 100.0%
Taylor expanded in x around 0
Simplified93.8%
if 3.4000000000000002e94 < y Initial program 100.0%
Taylor expanded in y around 0
*-rgt-identityN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
+-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified100.0%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64100.0%
Simplified100.0%
Final simplification85.5%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(* (sin x) (+ 1.0 (* y (* y 0.16666666666666666))))
(if (<= y 1.35e+154)
(* x (/ (sinh y) y))
(* (sin x) (* (* y y) 0.16666666666666666)))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 1.35e+154) {
tmp = x * (sinh(y) / y);
} else {
tmp = sin(x) * ((y * y) * 0.16666666666666666);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
else if (y <= 1.35d+154) then
tmp = x * (sinh(y) / y)
else
tmp = sin(x) * ((y * y) * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x) * (1.0 + (y * (y * 0.16666666666666666)));
} else if (y <= 1.35e+154) {
tmp = x * (Math.sinh(y) / y);
} else {
tmp = Math.sin(x) * ((y * y) * 0.16666666666666666);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) * (1.0 + (y * (y * 0.16666666666666666))) elif y <= 1.35e+154: tmp = x * (math.sinh(y) / y) else: tmp = math.sin(x) * ((y * y) * 0.16666666666666666) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = Float64(sin(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); elseif (y <= 1.35e+154) tmp = Float64(x * Float64(sinh(y) / y)); else tmp = Float64(sin(x) * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x) * (1.0 + (y * (y * 0.16666666666666666))); elseif (y <= 1.35e+154) tmp = x * (sinh(y) / y); else tmp = sin(x) * ((y * y) * 0.16666666666666666); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[(N[Sin[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.2%
Simplified81.2%
if 1.04e8 < y < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in x around 0
Simplified83.3%
if 1.35000000000000003e154 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(sin x)
(if (<= y 1.35e+154)
(* x (/ (sinh y) y))
(* (sin x) (* (* y y) 0.16666666666666666)))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x);
} else if (y <= 1.35e+154) {
tmp = x * (sinh(y) / y);
} else {
tmp = sin(x) * ((y * y) * 0.16666666666666666);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x)
else if (y <= 1.35d+154) then
tmp = x * (sinh(y) / y)
else
tmp = sin(x) * ((y * y) * 0.16666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x);
} else if (y <= 1.35e+154) {
tmp = x * (Math.sinh(y) / y);
} else {
tmp = Math.sin(x) * ((y * y) * 0.16666666666666666);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) elif y <= 1.35e+154: tmp = x * (math.sinh(y) / y) else: tmp = math.sin(x) * ((y * y) * 0.16666666666666666) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = sin(x); elseif (y <= 1.35e+154) tmp = Float64(x * Float64(sinh(y) / y)); else tmp = Float64(sin(x) * Float64(Float64(y * y) * 0.16666666666666666)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x); elseif (y <= 1.35e+154) tmp = x * (sinh(y) / y); else tmp = sin(x) * ((y * y) * 0.16666666666666666); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[Sin[x], $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;\sin x \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6462.3%
Simplified62.3%
if 1.04e8 < y < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in x around 0
Simplified83.3%
if 1.35000000000000003e154 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x y)
:precision binary64
(if (<= y 104000000.0)
(sin x)
(if (<= y 5e+91)
(* x (/ (sinh y) y))
(if (<= y 1.28e+246)
(*
(* x (+ 1.0 (* (* x x) -0.16666666666666666)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
(*
x
(+
1.0
(*
(* y y)
(+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))))))
double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = sin(x);
} else if (y <= 5e+91) {
tmp = x * (sinh(y) / y);
} else if (y <= 1.28e+246) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 104000000.0d0) then
tmp = sin(x)
else if (y <= 5d+91) then
tmp = x * (sinh(y) / y)
else if (y <= 1.28d+246) then
tmp = (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))
else
tmp = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 104000000.0) {
tmp = Math.sin(x);
} else if (y <= 5e+91) {
tmp = x * (Math.sinh(y) / y);
} else if (y <= 1.28e+246) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 104000000.0: tmp = math.sin(x) elif y <= 5e+91: tmp = x * (math.sinh(y) / y) elif y <= 1.28e+246: tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))) else: tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 104000000.0) tmp = sin(x); elseif (y <= 5e+91) tmp = Float64(x * Float64(sinh(y) / y)); elseif (y <= 1.28e+246) tmp = Float64(Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))); else tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 104000000.0) tmp = sin(x); elseif (y <= 5e+91) tmp = x * (sinh(y) / y); elseif (y <= 1.28e+246) tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))); else tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 104000000.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 5e+91], N[(x * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.28e+246], N[(N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 104000000:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \frac{\sinh y}{y}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+246}:\\
\;\;\;\;\left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.04e8Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6462.3%
Simplified62.3%
if 1.04e8 < y < 5.0000000000000002e91Initial program 100.0%
Taylor expanded in x around 0
Simplified93.3%
if 5.0000000000000002e91 < y < 1.2800000000000001e246Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
if 1.2800000000000001e246 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified78.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.6%
Simplified78.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))
(if (<= y 61000000000000.0)
(sin x)
(if (<= y 2e+91)
(*
(+ 1.0 (* (* y y) (+ 0.16666666666666666 (* (* y y) t_0))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))
(if (<= y 5.7e+243)
(*
(* x (+ 1.0 (* (* x x) -0.16666666666666666)))
(+ 1.0 (* (* y y) (+ 0.16666666666666666 (* y (* y t_0))))))
(*
x
(+
1.0
(*
(* y y)
(+ 0.16666666666666666 (* y (* y 0.008333333333333333)))))))))))
double code(double x, double y) {
double t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984);
double tmp;
if (y <= 61000000000000.0) {
tmp = sin(x);
} else if (y <= 2e+91) {
tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))));
} else if (y <= 5.7e+243) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * t_0)))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
}
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 = 0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)
if (y <= 61000000000000.0d0) then
tmp = sin(x)
else if (y <= 2d+91) then
tmp = (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * t_0)))) * (x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x)))))))
else if (y <= 5.7d+243) then
tmp = (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * t_0)))))
else
tmp = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984);
double tmp;
if (y <= 61000000000000.0) {
tmp = Math.sin(x);
} else if (y <= 2e+91) {
tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))));
} else if (y <= 5.7e+243) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * t_0)))));
} else {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
}
return tmp;
}
def code(x, y): t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984) tmp = 0 if y <= 61000000000000.0: tmp = math.sin(x) elif y <= 2e+91: tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))))) elif y <= 5.7e+243: tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * t_0))))) else: tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) return tmp
function code(x, y) t_0 = Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)) tmp = 0.0 if (y <= 61000000000000.0) tmp = sin(x); elseif (y <= 2e+91) tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * t_0)))) * Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x)))))))); elseif (y <= 5.7e+243) tmp = Float64(Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * t_0)))))); else tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984); tmp = 0.0; if (y <= 61000000000000.0) tmp = sin(x); elseif (y <= 2e+91) tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * t_0)))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))))); elseif (y <= 5.7e+243) tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * t_0))))); else tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 61000000000000.0], N[Sin[x], $MachinePrecision], If[LessEqual[y, 2e+91], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e+243], N[(N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\\
\mathbf{if}\;y \leq 61000000000000:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+91}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot t\_0\right)\right) \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{+243}:\\
\;\;\;\;\left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if y < 6.1e13Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6462.0%
Simplified62.0%
if 6.1e13 < y < 2.00000000000000016e91Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified52.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.3%
Simplified72.3%
if 2.00000000000000016e91 < y < 5.7000000000000003e243Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6480.0%
Simplified80.0%
if 5.7000000000000003e243 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified78.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.6%
Simplified78.6%
Final simplification65.9%
(FPCore (x y)
:precision binary64
(if (<= x 1.85e+120)
(*
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))
(*
x
(+
1.0
(*
x
(*
x
(+
-0.16666666666666666
(*
x
(*
x
(+ 0.008333333333333333 (* (* x x) -0.0001984126984126984))))))))))
(*
x
(+
1.0
(* x (* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x)))))))))
double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.85d+120) then
tmp = (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))) * (x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (x * (x * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0))))))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.85e+120: tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.85e+120) tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))) * Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(x * Float64(x * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984)))))))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.85e+120) tmp = (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.85e+120], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(x * N[(x * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right) \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + x \cdot \left(x \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified91.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6%
Simplified62.6%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification59.3%
(FPCore (x y)
:precision binary64
(if (<= x 0.00175)
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
y))
(if (<= x 1.85e+120)
(*
(+ 1.0 (* y (* y 0.16666666666666666)))
(*
x
(+
1.0
(*
x
(*
x
(+
-0.16666666666666666
(*
x
(*
x
(+
0.008333333333333333
(* (* x x) -0.0001984126984126984))))))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 0.00175) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 1.85e+120) {
tmp = (1.0 + (y * (y * 0.16666666666666666))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.00175d0) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))) / y)
else if (x <= 1.85d+120) then
tmp = (1.0d0 + (y * (y * 0.16666666666666666d0))) * (x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (x * (x * (0.008333333333333333d0 + ((x * x) * (-0.0001984126984126984d0))))))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.00175) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 1.85e+120) {
tmp = (1.0 + (y * (y * 0.16666666666666666))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984)))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.00175: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y) elif x <= 1.85e+120: tmp = (1.0 + (y * (y * 0.16666666666666666))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.00175) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))) / y)); elseif (x <= 1.85e+120) tmp = Float64(Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666))) * Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(x * Float64(x * Float64(0.008333333333333333 + Float64(Float64(x * x) * -0.0001984126984126984)))))))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.00175) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y); elseif (x <= 1.85e+120) tmp = (1.0 + (y * (y * 0.16666666666666666))) * (x * (1.0 + (x * (x * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + ((x * x) * -0.0001984126984126984))))))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.00175], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(x * N[(x * N[(0.008333333333333333 + N[(N[(x * x), $MachinePrecision] * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00175:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}{y}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;\left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right) \cdot \left(x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + x \cdot \left(x \cdot \left(0.008333333333333333 + \left(x \cdot x\right) \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 0.00175000000000000004Initial program 100.0%
Taylor expanded in x around 0
Simplified70.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.6%
Simplified66.6%
if 0.00175000000000000004 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.7%
Simplified85.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.3%
Simplified34.3%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification59.5%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
y))
(if (<= x 8e+104)
(*
(* x (* (* y y) 0.16666666666666666))
(+
1.0
(*
(* x x)
(+
-0.16666666666666666
(*
x
(*
x
(+ 0.008333333333333333 (* x (* x -0.0001984126984126984)))))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 8e+104) {
tmp = (x * ((y * y) * 0.16666666666666666)) * (1.0 + ((x * x) * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + (x * (x * -0.0001984126984126984))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))) / y)
else if (x <= 8d+104) then
tmp = (x * ((y * y) * 0.16666666666666666d0)) * (1.0d0 + ((x * x) * ((-0.16666666666666666d0) + (x * (x * (0.008333333333333333d0 + (x * (x * (-0.0001984126984126984d0)))))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 8e+104) {
tmp = (x * ((y * y) * 0.16666666666666666)) * (1.0 + ((x * x) * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + (x * (x * -0.0001984126984126984))))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y) elif x <= 8e+104: tmp = (x * ((y * y) * 0.16666666666666666)) * (1.0 + ((x * x) * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + (x * (x * -0.0001984126984126984)))))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))) / y)); elseif (x <= 8e+104) tmp = Float64(Float64(x * Float64(Float64(y * y) * 0.16666666666666666)) * Float64(1.0 + Float64(Float64(x * x) * Float64(-0.16666666666666666 + Float64(x * Float64(x * Float64(0.008333333333333333 + Float64(x * Float64(x * -0.0001984126984126984))))))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y); elseif (x <= 8e+104) tmp = (x * ((y * y) * 0.16666666666666666)) * (1.0 + ((x * x) * (-0.16666666666666666 + (x * (x * (0.008333333333333333 + (x * (x * -0.0001984126984126984)))))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e+104], N[(N[(x * N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(-0.16666666666666666 + N[(x * N[(x * N[(0.008333333333333333 + N[(x * N[(x * -0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}{y}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\left(x \cdot \left(\left(y \cdot y\right) \cdot 0.16666666666666666\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(-0.16666666666666666 + x \cdot \left(x \cdot \left(0.008333333333333333 + x \cdot \left(x \cdot -0.0001984126984126984\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in x around 0
Simplified69.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.0%
Simplified66.0%
if 28 < x < 8e104Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.2%
Simplified81.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.6%
Simplified43.6%
Taylor expanded in y around inf
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
Simplified43.5%
if 8e104 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6453.2%
Simplified53.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6437.0%
Simplified37.0%
Final simplification60.0%
(FPCore (x y)
:precision binary64
(if (<= x 1.85e+120)
(*
(* x (+ 1.0 (* (* x x) -0.16666666666666666)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
(*
x
(+
1.0
(* x (* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x)))))))))
double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.85d+120) then
tmp = (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.85e+120: tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.85e+120) tmp = Float64(Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.85e+120) tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.85e+120], N[(N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;\left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.3%
Simplified66.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.0%
Simplified62.0%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification58.7%
(FPCore (x y)
:precision binary64
(if (<= x 4.5e-30)
(*
x
(/
(*
y
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
y))
(if (<= x 1.85e+120)
(*
(* x (+ 1.0 (* (* x x) -0.16666666666666666)))
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 4.5e-30) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 4.5d-30) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))) / y)
else if (x <= 1.85d+120) then
tmp = (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 4.5e-30) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y);
} else if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4.5e-30: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y) elif x <= 1.85e+120: tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 4.5e-30) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))) / y)); elseif (x <= 1.85e+120) tmp = Float64(Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4.5e-30) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y); elseif (x <= 1.85e+120) tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4.5e-30], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.5 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}{y}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;\left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 4.49999999999999967e-30Initial program 100.0%
Taylor expanded in x around 0
Simplified70.2%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.2%
Simplified66.2%
if 4.49999999999999967e-30 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.8%
Simplified38.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6435.3%
Simplified35.3%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification59.1%
(FPCore (x y)
:precision binary64
(if (<= x 1.85e+120)
(*
(* x (+ 1.0 (* (* x x) -0.16666666666666666)))
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(*
x
(+
1.0
(* x (* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x)))))))))
double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.85d+120) then
tmp = (x * (1.0d0 + ((x * x) * (-0.16666666666666666d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.85e+120) {
tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.85e+120: tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.85e+120) tmp = Float64(Float64(x * Float64(1.0 + Float64(Float64(x * x) * -0.16666666666666666))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.85e+120) tmp = (x * (1.0 + ((x * x) * -0.16666666666666666))) * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.85e+120], N[(N[(x * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;\left(x \cdot \left(1 + \left(x \cdot x\right) \cdot -0.16666666666666666\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.3%
Simplified66.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6460.2%
Simplified60.2%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification57.2%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(*
x
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
y
(* y (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
(if (<= x 1.85e+120)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))
else if (x <= 1.85d+120) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))) elif x <= 1.85e+120: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))); elseif (x <= 1.85e+120) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))))); elseif (x <= 1.85e+120) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in y around 0
distribute-rgt-inN/A
associate-+r+N/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*l*N/A
Simplified91.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.6%
Simplified65.6%
if 28 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.6%
Simplified32.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.1%
Simplified33.1%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification58.9%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(*
x
(/
(*
y
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
y))
(if (<= x 1.85e+120)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y);
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x * ((y * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))) / y)
else if (x <= 1.85d+120) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y);
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y) elif x <= 1.85e+120: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))) / y)); elseif (x <= 1.85e+120) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x * ((y * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))))) / y); elseif (x <= 1.85e+120) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)}{y}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in x around 0
Simplified69.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.6%
Simplified64.6%
if 28 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.6%
Simplified32.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.1%
Simplified33.1%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification58.1%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(+ x (* (* y y) (* x (* y (* 0.0001984126984126984 (* y (* y y)))))))
(if (<= x 1.85e+120)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x + ((y * y) * (x * (y * (0.0001984126984126984 * (y * (y * y))))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x + ((y * y) * (x * (y * (0.0001984126984126984d0 * (y * (y * y))))))
else if (x <= 1.85d+120) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x + ((y * y) * (x * (y * (0.0001984126984126984 * (y * (y * y))))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x + ((y * y) * (x * (y * (0.0001984126984126984 * (y * (y * y)))))) elif x <= 1.85e+120: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x + Float64(Float64(y * y) * Float64(x * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))); elseif (x <= 1.85e+120) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x + ((y * y) * (x * (y * (0.0001984126984126984 * (y * (y * y)))))); elseif (x <= 1.85e+120) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x + N[(N[(y * y), $MachinePrecision] * N[(x * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x + \left(y \cdot y\right) \cdot \left(x \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in x around 0
Simplified69.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
Simplified63.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.6%
Simplified63.6%
if 28 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.6%
Simplified32.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.1%
Simplified33.1%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification57.4%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(*
x
(+
1.0
(* (* y y) (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))
(if (<= x 1.85e+120)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
(*
x
(+
1.0
(*
x
(* x (+ -0.16666666666666666 (* 0.008333333333333333 (* x x))))))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
else if (x <= 1.85d+120) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = x * (1.0d0 + (x * (x * ((-0.16666666666666666d0) + (0.008333333333333333d0 * (x * x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
} else if (x <= 1.85e+120) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) elif x <= 1.85e+120: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))); elseif (x <= 1.85e+120) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * Float64(-0.16666666666666666 + Float64(0.008333333333333333 * Float64(x * x))))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); elseif (x <= 1.85e+120) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = x * (1.0 + (x * (x * (-0.16666666666666666 + (0.008333333333333333 * (x * x)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+120], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(x * N[(x * N[(-0.16666666666666666 + N[(0.008333333333333333 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot \left(-0.16666666666666666 + 0.008333333333333333 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in x around 0
Simplified69.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.6%
Simplified63.6%
if 28 < x < 1.85000000000000012e120Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.7%
Simplified36.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.6%
Simplified32.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.1%
Simplified33.1%
if 1.85000000000000012e120 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6450.6%
Simplified50.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.2%
Simplified38.2%
Final simplification57.4%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
x
(+
1.0
(*
(* y y)
(+ 0.16666666666666666 (* y (* y 0.008333333333333333))))))))
(if (<= x 28.0)
t_0
(if (<= x 3.2e+116)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
t_0))))
double code(double x, double y) {
double t_0 = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 3.2e+116) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} 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 = x * (1.0d0 + ((y * y) * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0)))))
if (x <= 28.0d0) then
tmp = t_0
else if (x <= 3.2d+116) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333)))));
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 3.2e+116) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))) tmp = 0 if x <= 28.0: tmp = t_0 elif x <= 3.2e+116: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333)))))) tmp = 0.0 if (x <= 28.0) tmp = t_0; elseif (x <= 3.2e+116) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x * (1.0 + ((y * y) * (0.16666666666666666 + (y * (y * 0.008333333333333333))))); tmp = 0.0; if (x <= 28.0) tmp = t_0; elseif (x <= 3.2e+116) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 28.0], t$95$0, If[LessEqual[x, 3.2e+116], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{if}\;x \leq 28:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+116}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 28 or 3.2e116 < x Initial program 100.0%
Taylor expanded in x around 0
Simplified64.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.2%
Simplified59.2%
if 28 < x < 3.2e116Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.4%
Simplified38.4%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.0%
Simplified34.0%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6434.5%
Simplified34.5%
(FPCore (x y)
:precision binary64
(if (<= x 28.0)
(* x (/ (* y (+ 1.0 (* (* y y) 0.16666666666666666))) y))
(if (<= x 3.2e+116)
(*
x
(*
0.16666666666666666
(* (* y y) (+ 1.0 (* x (* x -0.16666666666666666))))))
(* x (+ 1.0 (* y (* y 0.16666666666666666)))))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y);
} else if (x <= 3.2e+116) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x * ((y * (1.0d0 + ((y * y) * 0.16666666666666666d0))) / y)
else if (x <= 3.2d+116) then
tmp = x * (0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * (-0.16666666666666666d0))))))
else
tmp = x * (1.0d0 + (y * (y * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y);
} else if (x <= 3.2e+116) {
tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666)))));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y) elif x <= 3.2e+116: tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))) else: tmp = x * (1.0 + (y * (y * 0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666))) / y)); elseif (x <= 3.2e+116) tmp = Float64(x * Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))))); else tmp = Float64(x * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y); elseif (x <= 3.2e+116) tmp = x * (0.16666666666666666 * ((y * y) * (1.0 + (x * (x * -0.16666666666666666))))); else tmp = x * (1.0 + (y * (y * 0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+116], N[(x * N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot 0.16666666666666666\right)}{y}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+116}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in x around 0
Simplified69.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.3%
Simplified57.3%
if 28 < x < 3.2e116Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.4%
Simplified38.4%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.0%
Simplified34.0%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6434.5%
Simplified34.5%
if 3.2e116 < x Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.8%
Simplified68.8%
Taylor expanded in x around 0
Simplified32.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (/ (* y (+ 1.0 (* (* y y) 0.16666666666666666))) y))))
(if (<= x 28.0)
t_0
(if (<= x 8e+104)
(* (* y y) (* (* x (* x x)) -0.027777777777777776))
t_0))))
double code(double x, double y) {
double t_0 = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y);
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 8e+104) {
tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776);
} 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 = x * ((y * (1.0d0 + ((y * y) * 0.16666666666666666d0))) / y)
if (x <= 28.0d0) then
tmp = t_0
else if (x <= 8d+104) then
tmp = (y * y) * ((x * (x * x)) * (-0.027777777777777776d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y);
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 8e+104) {
tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y) tmp = 0 if x <= 28.0: tmp = t_0 elif x <= 8e+104: tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x * Float64(Float64(y * Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666))) / y)) tmp = 0.0 if (x <= 28.0) tmp = t_0; elseif (x <= 8e+104) tmp = Float64(Float64(y * y) * Float64(Float64(x * Float64(x * x)) * -0.027777777777777776)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x * ((y * (1.0 + ((y * y) * 0.16666666666666666))) / y); tmp = 0.0; if (x <= 28.0) tmp = t_0; elseif (x <= 8e+104) tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 28.0], t$95$0, If[LessEqual[x, 8e+104], N[(N[(y * y), $MachinePrecision] * N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y \cdot \left(1 + \left(y \cdot y\right) \cdot 0.16666666666666666\right)}{y}\\
\mathbf{if}\;x \leq 28:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot -0.027777777777777776\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 28 or 8e104 < x Initial program 100.0%
Taylor expanded in x around 0
Simplified64.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.3%
Simplified53.3%
if 28 < x < 8e104Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.2%
Simplified44.2%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.2%
Simplified39.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.6%
Simplified39.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (+ 1.0 (* y (* y 0.16666666666666666))))))
(if (<= x 28.0)
t_0
(if (<= x 8e+104)
(* (* y y) (* (* x (* x x)) -0.027777777777777776))
t_0))))
double code(double x, double y) {
double t_0 = x * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 8e+104) {
tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776);
} 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 = x * (1.0d0 + (y * (y * 0.16666666666666666d0)))
if (x <= 28.0d0) then
tmp = t_0
else if (x <= 8d+104) then
tmp = (y * y) * ((x * (x * x)) * (-0.027777777777777776d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (x <= 28.0) {
tmp = t_0;
} else if (x <= 8e+104) {
tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x * (1.0 + (y * (y * 0.16666666666666666))) tmp = 0 if x <= 28.0: tmp = t_0 elif x <= 8e+104: tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))) tmp = 0.0 if (x <= 28.0) tmp = t_0; elseif (x <= 8e+104) tmp = Float64(Float64(y * y) * Float64(Float64(x * Float64(x * x)) * -0.027777777777777776)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x * (1.0 + (y * (y * 0.16666666666666666))); tmp = 0.0; if (x <= 28.0) tmp = t_0; elseif (x <= 8e+104) tmp = (y * y) * ((x * (x * x)) * -0.027777777777777776); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 28.0], t$95$0, If[LessEqual[x, 8e+104], N[(N[(y * y), $MachinePrecision] * N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;x \leq 28:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+104}:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot -0.027777777777777776\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 28 or 8e104 < x Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.2%
Simplified74.2%
Taylor expanded in x around 0
Simplified48.4%
if 28 < x < 8e104Initial program 100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6444.2%
Simplified44.2%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.2%
Simplified39.2%
Taylor expanded in x around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.2%
Simplified39.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.6%
Simplified39.6%
(FPCore (x y) :precision binary64 (if (<= y 2.5e+30) (+ x (* x (* x (* x -0.16666666666666666)))) (* x (+ 1.0 (* y (* y 0.16666666666666666))))))
double code(double x, double y) {
double tmp;
if (y <= 2.5e+30) {
tmp = x + (x * (x * (x * -0.16666666666666666)));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.5d+30) then
tmp = x + (x * (x * (x * (-0.16666666666666666d0))))
else
tmp = x * (1.0d0 + (y * (y * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.5e+30) {
tmp = x + (x * (x * (x * -0.16666666666666666)));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.5e+30: tmp = x + (x * (x * (x * -0.16666666666666666))) else: tmp = x * (1.0 + (y * (y * 0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.5e+30) tmp = Float64(x + Float64(x * Float64(x * Float64(x * -0.16666666666666666)))); else tmp = Float64(x * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.5e+30) tmp = x + (x * (x * (x * -0.16666666666666666))); else tmp = x * (1.0 + (y * (y * 0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.5e+30], N[(x + N[(x * N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5 \cdot 10^{+30}:\\
\;\;\;\;x + x \cdot \left(x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if y < 2.4999999999999999e30Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6460.8%
Simplified60.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.6%
Simplified33.6%
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.6%
Applied egg-rr33.6%
if 2.4999999999999999e30 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.6%
Simplified59.6%
Taylor expanded in x around 0
Simplified53.6%
Final simplification38.2%
(FPCore (x y) :precision binary64 (if (<= y 2.9e+31) (* x (+ 1.0 (* x (* x -0.16666666666666666)))) (* x (+ 1.0 (* y (* y 0.16666666666666666))))))
double code(double x, double y) {
double tmp;
if (y <= 2.9e+31) {
tmp = x * (1.0 + (x * (x * -0.16666666666666666)));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.9d+31) then
tmp = x * (1.0d0 + (x * (x * (-0.16666666666666666d0))))
else
tmp = x * (1.0d0 + (y * (y * 0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.9e+31) {
tmp = x * (1.0 + (x * (x * -0.16666666666666666)));
} else {
tmp = x * (1.0 + (y * (y * 0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.9e+31: tmp = x * (1.0 + (x * (x * -0.16666666666666666))) else: tmp = x * (1.0 + (y * (y * 0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.9e+31) tmp = Float64(x * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))); else tmp = Float64(x * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.9e+31) tmp = x * (1.0 + (x * (x * -0.16666666666666666))); else tmp = x * (1.0 + (y * (y * 0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.9e+31], N[(x * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if y < 2.9e31Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6460.8%
Simplified60.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6433.6%
Simplified33.6%
if 2.9e31 < y Initial program 100.0%
Taylor expanded in y around 0
*-lft-identityN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.6%
Simplified59.6%
Taylor expanded in x around 0
Simplified53.6%
(FPCore (x y) :precision binary64 (if (<= x 28.0) x (* x (* (* x x) -0.16666666666666666))))
double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x;
} else {
tmp = x * ((x * x) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 28.0d0) then
tmp = x
else
tmp = x * ((x * x) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 28.0) {
tmp = x;
} else {
tmp = x * ((x * x) * -0.16666666666666666);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 28.0: tmp = x else: tmp = x * ((x * x) * -0.16666666666666666) return tmp
function code(x, y) tmp = 0.0 if (x <= 28.0) tmp = x; else tmp = Float64(x * Float64(Float64(x * x) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 28.0) tmp = x; else tmp = x * ((x * x) * -0.16666666666666666); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 28.0], x, N[(x * N[(N[(x * x), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 28:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if x < 28Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6446.7%
Simplified46.7%
Taylor expanded in x around 0
Simplified28.4%
if 28 < x Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6449.8%
Simplified49.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f647.5%
Simplified7.5%
Taylor expanded in x around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.5%
Simplified7.5%
Final simplification23.7%
(FPCore (x y) :precision binary64 (* x (+ 1.0 (* x (* x -0.16666666666666666)))))
double code(double x, double y) {
return x * (1.0 + (x * (x * -0.16666666666666666)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (1.0d0 + (x * (x * (-0.16666666666666666d0))))
end function
public static double code(double x, double y) {
return x * (1.0 + (x * (x * -0.16666666666666666)));
}
def code(x, y): return x * (1.0 + (x * (x * -0.16666666666666666)))
function code(x, y) return Float64(x * Float64(1.0 + Float64(x * Float64(x * -0.16666666666666666)))) end
function tmp = code(x, y) tmp = x * (1.0 + (x * (x * -0.16666666666666666))); end
code[x_, y_] := N[(x * N[(1.0 + N[(x * N[(x * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 + x \cdot \left(x \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6447.4%
Simplified47.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6427.9%
Simplified27.9%
(FPCore (x y) :precision binary64 x)
double code(double x, double y) {
return x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x
end function
public static double code(double x, double y) {
return x;
}
def code(x, y): return x
function code(x, y) return x end
function tmp = code(x, y) tmp = x; end
code[x_, y_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
sin-lowering-sin.f6447.4%
Simplified47.4%
Taylor expanded in x around 0
Simplified22.8%
herbie shell --seed 2024138
(FPCore (x y)
:name "Linear.Quaternion:$ccos from linear-1.19.1.3"
:precision binary64
(* (sin x) (/ (sinh y) y)))