
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y)))
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y): return math.cos(x) * (math.sinh(y) / y)
function code(x, y) return Float64(cos(x) * Float64(sinh(y) / y)) end
function tmp = code(x, y) tmp = cos(x) * (sinh(y) / y); end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cos x \cdot \frac{\sinh y}{y}
\end{array}
Initial program 100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(cos x)
(+
1.0
(*
(* y y)
(+ 0.16666666666666666 (* (* y y) 0.008333333333333333)))))))
(if (<= y 0.28)
t_0
(if (<= y 3.9e+77) (* (/ (sinh y) y) (+ 1.0 (* (* x x) -0.5))) t_0))))
double code(double x, double y) {
double t_0 = cos(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
double tmp;
if (y <= 0.28) {
tmp = t_0;
} else if (y <= 3.9e+77) {
tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5));
} 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 = cos(x) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
if (y <= 0.28d0) then
tmp = t_0
else if (y <= 3.9d+77) then
tmp = (sinh(y) / y) * (1.0d0 + ((x * x) * (-0.5d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.cos(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
double tmp;
if (y <= 0.28) {
tmp = t_0;
} else if (y <= 3.9e+77) {
tmp = (Math.sinh(y) / y) * (1.0 + ((x * x) * -0.5));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.cos(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))) tmp = 0 if y <= 0.28: tmp = t_0 elif y <= 3.9e+77: tmp = (math.sinh(y) / y) * (1.0 + ((x * x) * -0.5)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(cos(x) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))) tmp = 0.0 if (y <= 0.28) tmp = t_0; elseif (y <= 3.9e+77) tmp = Float64(Float64(sinh(y) / y) * Float64(1.0 + Float64(Float64(x * x) * -0.5))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = cos(x) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); tmp = 0.0; if (y <= 0.28) tmp = t_0; elseif (y <= 3.9e+77) tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.28], t$95$0, If[LessEqual[y, 3.9e+77], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos x \cdot \left(1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{if}\;y \leq 0.28:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+77}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.28000000000000003 or 3.8999999999999998e77 < 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
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified94.9%
if 0.28000000000000003 < y < 3.8999999999999998e77Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.8%
Simplified93.8%
Final simplification94.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (cos x) (+ 1.0 (* y (* y 0.16666666666666666))))))
(if (<= y 0.23)
t_0
(if (<= y 2.7e+95)
(* (/ (sinh y) y) (+ 1.0 (* (* x x) -0.5)))
(if (<= y 3.3e+154)
(* y (* y (+ 0.16666666666666666 (* y (* y 0.008333333333333333)))))
t_0)))))
double code(double x, double y) {
double t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.23) {
tmp = t_0;
} else if (y <= 2.7e+95) {
tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5));
} else if (y <= 3.3e+154) {
tmp = y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333))));
} 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 = cos(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
if (y <= 0.23d0) then
tmp = t_0
else if (y <= 2.7d+95) then
tmp = (sinh(y) / y) * (1.0d0 + ((x * x) * (-0.5d0)))
else if (y <= 3.3d+154) then
tmp = y * (y * (0.16666666666666666d0 + (y * (y * 0.008333333333333333d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.23) {
tmp = t_0;
} else if (y <= 2.7e+95) {
tmp = (Math.sinh(y) / y) * (1.0 + ((x * x) * -0.5));
} else if (y <= 3.3e+154) {
tmp = y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.cos(x) * (1.0 + (y * (y * 0.16666666666666666))) tmp = 0 if y <= 0.23: tmp = t_0 elif y <= 2.7e+95: tmp = (math.sinh(y) / y) * (1.0 + ((x * x) * -0.5)) elif y <= 3.3e+154: tmp = y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(cos(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))) tmp = 0.0 if (y <= 0.23) tmp = t_0; elseif (y <= 2.7e+95) tmp = Float64(Float64(sinh(y) / y) * Float64(1.0 + Float64(Float64(x * x) * -0.5))); elseif (y <= 3.3e+154) tmp = Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666))); tmp = 0.0; if (y <= 0.23) tmp = t_0; elseif (y <= 2.7e+95) tmp = (sinh(y) / y) * (1.0 + ((x * x) * -0.5)); elseif (y <= 3.3e+154) tmp = y * (y * (0.16666666666666666 + (y * (y * 0.008333333333333333)))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.23], t$95$0, If[LessEqual[y, 2.7e+95], N[(N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+154], N[(y * N[(y * N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 0.23:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+95}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\
\;\;\;\;y \cdot \left(y \cdot \left(0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.23000000000000001 or 3.3e154 < 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
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6487.1%
Simplified87.1%
if 0.23000000000000001 < y < 2.7e95Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
if 2.7e95 < y < 3.3e154Initial program 100.0%
Taylor expanded in x around 0
Simplified88.2%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.2%
Simplified88.2%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
lft-mult-inverseN/A
metadata-evalN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.2%
Simplified88.2%
Final simplification87.7%
(FPCore (x y) :precision binary64 (let* ((t_0 (* (cos x) (+ 1.0 (* y (* y 0.16666666666666666)))))) (if (<= y 0.046) t_0 (if (<= y 3.3e+154) (/ (sinh y) y) t_0))))
double code(double x, double y) {
double t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.046) {
tmp = t_0;
} else if (y <= 3.3e+154) {
tmp = sinh(y) / y;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = cos(x) * (1.0d0 + (y * (y * 0.16666666666666666d0)))
if (y <= 0.046d0) then
tmp = t_0
else if (y <= 3.3d+154) then
tmp = sinh(y) / y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.cos(x) * (1.0 + (y * (y * 0.16666666666666666)));
double tmp;
if (y <= 0.046) {
tmp = t_0;
} else if (y <= 3.3e+154) {
tmp = Math.sinh(y) / y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.cos(x) * (1.0 + (y * (y * 0.16666666666666666))) tmp = 0 if y <= 0.046: tmp = t_0 elif y <= 3.3e+154: tmp = math.sinh(y) / y else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(cos(x) * Float64(1.0 + Float64(y * Float64(y * 0.16666666666666666)))) tmp = 0.0 if (y <= 0.046) tmp = t_0; elseif (y <= 3.3e+154) tmp = Float64(sinh(y) / y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = cos(x) * (1.0 + (y * (y * 0.16666666666666666))); tmp = 0.0; if (y <= 0.046) tmp = t_0; elseif (y <= 3.3e+154) tmp = sinh(y) / y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(y * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.046], t$95$0, If[LessEqual[y, 3.3e+154], N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 0.046:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 0.045999999999999999 or 3.3e154 < 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
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6487.1%
Simplified87.1%
if 0.045999999999999999 < y < 3.3e154Initial program 100.0%
Taylor expanded in x around 0
Simplified83.3%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6483.3%
Applied egg-rr83.3%
(FPCore (x y) :precision binary64 (if (<= y 0.009) (cos x) (/ (sinh y) y)))
double code(double x, double y) {
double tmp;
if (y <= 0.009) {
tmp = cos(x);
} else {
tmp = sinh(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 <= 0.009d0) then
tmp = cos(x)
else
tmp = sinh(y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.009) {
tmp = Math.cos(x);
} else {
tmp = Math.sinh(y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.009: tmp = math.cos(x) else: tmp = math.sinh(y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 0.009) tmp = cos(x); else tmp = Float64(sinh(y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.009) tmp = cos(x); else tmp = sinh(y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.009], N[Cos[x], $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.009:\\
\;\;\;\;\cos x\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{y}\\
\end{array}
\end{array}
if y < 0.00899999999999999932Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6465.6%
Simplified65.6%
if 0.00899999999999999932 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified85.1%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6485.1%
Applied egg-rr85.1%
(FPCore (x y)
:precision binary64
(let* ((t_0
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))
(t_1
(+ 1.0 (* y (* y (* y (* 0.0001984126984126984 (* y (* y y)))))))))
(if (<= y 1.7e+24)
(cos x)
(if (<= y 1e+52)
(/
(+ (* (* (* y y) (* y y)) (* t_0 t_0)) -1.0)
(+ (* y (* y t_0)) -1.0))
(if (<= y 4.05e+96) (* (+ 1.0 (* (* x x) -0.5)) t_1) t_1)))))
double code(double x, double y) {
double t_0 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)));
double t_1 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double tmp;
if (y <= 1.7e+24) {
tmp = cos(x);
} else if (y <= 1e+52) {
tmp = ((((y * y) * (y * y)) * (t_0 * t_0)) + -1.0) / ((y * (y * t_0)) + -1.0);
} else if (y <= 4.05e+96) {
tmp = (1.0 + ((x * x) * -0.5)) * t_1;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))
t_1 = 1.0d0 + (y * (y * (y * (0.0001984126984126984d0 * (y * (y * y))))))
if (y <= 1.7d+24) then
tmp = cos(x)
else if (y <= 1d+52) then
tmp = ((((y * y) * (y * y)) * (t_0 * t_0)) + (-1.0d0)) / ((y * (y * t_0)) + (-1.0d0))
else if (y <= 4.05d+96) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * t_1
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)));
double t_1 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double tmp;
if (y <= 1.7e+24) {
tmp = Math.cos(x);
} else if (y <= 1e+52) {
tmp = ((((y * y) * (y * y)) * (t_0 * t_0)) + -1.0) / ((y * (y * t_0)) + -1.0);
} else if (y <= 4.05e+96) {
tmp = (1.0 + ((x * x) * -0.5)) * t_1;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))) t_1 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))) tmp = 0 if y <= 1.7e+24: tmp = math.cos(x) elif y <= 1e+52: tmp = ((((y * y) * (y * y)) * (t_0 * t_0)) + -1.0) / ((y * (y * t_0)) + -1.0) elif y <= 4.05e+96: tmp = (1.0 + ((x * x) * -0.5)) * t_1 else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))) t_1 = Float64(1.0 + Float64(y * Float64(y * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))) tmp = 0.0 if (y <= 1.7e+24) tmp = cos(x); elseif (y <= 1e+52) tmp = Float64(Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * Float64(t_0 * t_0)) + -1.0) / Float64(Float64(y * Float64(y * t_0)) + -1.0)); elseif (y <= 4.05e+96) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * t_1); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))); t_1 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))); tmp = 0.0; if (y <= 1.7e+24) tmp = cos(x); elseif (y <= 1e+52) tmp = ((((y * y) * (y * y)) * (t_0 * t_0)) + -1.0) / ((y * (y * t_0)) + -1.0); elseif (y <= 4.05e+96) tmp = (1.0 + ((x * x) * -0.5)) * t_1; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(y * N[(y * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.7e+24], N[Cos[x], $MachinePrecision], If[LessEqual[y, 1e+52], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[(N[(y * N[(y * t$95$0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.05e+96], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\\
t_1 := 1 + y \cdot \left(y \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\mathbf{if}\;y \leq 1.7 \cdot 10^{+24}:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 10^{+52}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(t\_0 \cdot t\_0\right) + -1}{y \cdot \left(y \cdot t\_0\right) + -1}\\
\mathbf{elif}\;y \leq 4.05 \cdot 10^{+96}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < 1.7e24Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6464.9%
Simplified64.9%
if 1.7e24 < y < 9.9999999999999999e51Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f648.6%
Simplified8.6%
+-commutativeN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
if 9.9999999999999999e51 < y < 4.0500000000000001e96Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if 4.0500000000000001e96 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified87.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Final simplification72.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (* y (* y (* y (* 0.0001984126984126984 (* y (* y y))))))))
(t_1
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))
(if (<= y 9.5e+51)
(/ (+ (* (* (* y y) (* y y)) (* t_1 t_1)) -1.0) (+ (* y (* y t_1)) -1.0))
(if (<= y 4.4e+95) (* (+ 1.0 (* (* x x) -0.5)) t_0) t_0))))
double code(double x, double y) {
double t_0 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double t_1 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)));
double tmp;
if (y <= 9.5e+51) {
tmp = ((((y * y) * (y * y)) * (t_1 * t_1)) + -1.0) / ((y * (y * t_1)) + -1.0);
} else if (y <= 4.4e+95) {
tmp = (1.0 + ((x * x) * -0.5)) * t_0;
} 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + (y * (y * (y * (0.0001984126984126984d0 * (y * (y * y))))))
t_1 = 0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))
if (y <= 9.5d+51) then
tmp = ((((y * y) * (y * y)) * (t_1 * t_1)) + (-1.0d0)) / ((y * (y * t_1)) + (-1.0d0))
else if (y <= 4.4d+95) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * t_0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double t_1 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)));
double tmp;
if (y <= 9.5e+51) {
tmp = ((((y * y) * (y * y)) * (t_1 * t_1)) + -1.0) / ((y * (y * t_1)) + -1.0);
} else if (y <= 4.4e+95) {
tmp = (1.0 + ((x * x) * -0.5)) * t_0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))) t_1 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))) tmp = 0 if y <= 9.5e+51: tmp = ((((y * y) * (y * y)) * (t_1 * t_1)) + -1.0) / ((y * (y * t_1)) + -1.0) elif y <= 4.4e+95: tmp = (1.0 + ((x * x) * -0.5)) * t_0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(y * Float64(y * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))) t_1 = Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))) tmp = 0.0 if (y <= 9.5e+51) tmp = Float64(Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * Float64(t_1 * t_1)) + -1.0) / Float64(Float64(y * Float64(y * t_1)) + -1.0)); elseif (y <= 4.4e+95) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * t_0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))); t_1 = 0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))); tmp = 0.0; if (y <= 9.5e+51) tmp = ((((y * y) * (y * y)) * (t_1 * t_1)) + -1.0) / ((y * (y * t_1)) + -1.0); elseif (y <= 4.4e+95) tmp = (1.0 + ((x * x) * -0.5)) * t_0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(y * N[(y * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 9.5e+51], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] / N[(N[(y * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+95], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + y \cdot \left(y \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
t_1 := 0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\\
\mathbf{if}\;y \leq 9.5 \cdot 10^{+51}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot \left(t\_1 \cdot t\_1\right) + -1}{y \cdot \left(y \cdot t\_1\right) + -1}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+95}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < 9.4999999999999999e51Initial program 100.0%
Taylor expanded in x around 0
Simplified62.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.7%
Simplified55.7%
+-commutativeN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr39.5%
if 9.4999999999999999e51 < y < 4.3999999999999998e95Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if 4.3999999999999998e95 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified87.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Final simplification52.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))
(t_1 (* (* y y) t_0))
(t_2
(+ 1.0 (* y (* y (* y (* 0.0001984126984126984 (* y (* y y)))))))))
(if (<= y 5.5e+52)
(+
1.0
(/
(* (* y y) (- 0.027777777777777776 (* y (* t_1 (* y t_0)))))
(- 0.16666666666666666 t_1)))
(if (<= y 1e+96) (* (+ 1.0 (* (* x x) -0.5)) t_2) t_2))))
double code(double x, double y) {
double t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984);
double t_1 = (y * y) * t_0;
double t_2 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double tmp;
if (y <= 5.5e+52) {
tmp = 1.0 + (((y * y) * (0.027777777777777776 - (y * (t_1 * (y * t_0))))) / (0.16666666666666666 - t_1));
} else if (y <= 1e+96) {
tmp = (1.0 + ((x * x) * -0.5)) * t_2;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)
t_1 = (y * y) * t_0
t_2 = 1.0d0 + (y * (y * (y * (0.0001984126984126984d0 * (y * (y * y))))))
if (y <= 5.5d+52) then
tmp = 1.0d0 + (((y * y) * (0.027777777777777776d0 - (y * (t_1 * (y * t_0))))) / (0.16666666666666666d0 - t_1))
else if (y <= 1d+96) then
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * t_2
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984);
double t_1 = (y * y) * t_0;
double t_2 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
double tmp;
if (y <= 5.5e+52) {
tmp = 1.0 + (((y * y) * (0.027777777777777776 - (y * (t_1 * (y * t_0))))) / (0.16666666666666666 - t_1));
} else if (y <= 1e+96) {
tmp = (1.0 + ((x * x) * -0.5)) * t_2;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y): t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984) t_1 = (y * y) * t_0 t_2 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))) tmp = 0 if y <= 5.5e+52: tmp = 1.0 + (((y * y) * (0.027777777777777776 - (y * (t_1 * (y * t_0))))) / (0.16666666666666666 - t_1)) elif y <= 1e+96: tmp = (1.0 + ((x * x) * -0.5)) * t_2 else: tmp = t_2 return tmp
function code(x, y) t_0 = Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)) t_1 = Float64(Float64(y * y) * t_0) t_2 = Float64(1.0 + Float64(y * Float64(y * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))) tmp = 0.0 if (y <= 5.5e+52) tmp = Float64(1.0 + Float64(Float64(Float64(y * y) * Float64(0.027777777777777776 - Float64(y * Float64(t_1 * Float64(y * t_0))))) / Float64(0.16666666666666666 - t_1))); elseif (y <= 1e+96) tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * t_2); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y) t_0 = 0.008333333333333333 + ((y * y) * 0.0001984126984126984); t_1 = (y * y) * t_0; t_2 = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))); tmp = 0.0; if (y <= 5.5e+52) tmp = 1.0 + (((y * y) * (0.027777777777777776 - (y * (t_1 * (y * t_0))))) / (0.16666666666666666 - t_1)); elseif (y <= 1e+96) tmp = (1.0 + ((x * x) * -0.5)) * t_2; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y * y), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(y * N[(y * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.5e+52], N[(1.0 + N[(N[(N[(y * y), $MachinePrecision] * N[(0.027777777777777776 - N[(y * N[(t$95$1 * N[(y * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.16666666666666666 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+96], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\\
t_1 := \left(y \cdot y\right) \cdot t\_0\\
t_2 := 1 + y \cdot \left(y \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\mathbf{if}\;y \leq 5.5 \cdot 10^{+52}:\\
\;\;\;\;1 + \frac{\left(y \cdot y\right) \cdot \left(0.027777777777777776 - y \cdot \left(t\_1 \cdot \left(y \cdot t\_0\right)\right)\right)}{0.16666666666666666 - t\_1}\\
\mathbf{elif}\;y \leq 10^{+96}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < 5.49999999999999996e52Initial program 100.0%
Taylor expanded in x around 0
Simplified62.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.7%
Simplified55.7%
associate-*r*N/A
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr38.0%
if 5.49999999999999996e52 < y < 1.00000000000000005e96Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if 1.00000000000000005e96 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified87.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6487.3%
Simplified87.3%
Final simplification51.3%
(FPCore (x y)
:precision binary64
(if (<= x 8.2e+252)
(/
(*
y
(+
1.0
(*
y
(*
y
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))))
y)
(*
(+ 1.0 (* (* x x) -0.5))
(+
1.0
(* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = (y * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y;
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (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 (x <= 8.2d+252) then
tmp = (y * (1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0)))))))) / y
else
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (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 (x <= 8.2e+252) {
tmp = (y * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y;
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = (y * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y else: tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(Float64(y * Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984)))))))) / y); else tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = (y * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))))) / y; else tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(N[(y * N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;\frac{y \cdot \left(1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)\right)\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6470.6%
Applied egg-rr70.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.7%
Simplified66.7%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.7%
Simplified29.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.7%
Simplified29.7%
(FPCore (x y)
:precision binary64
(if (<= x 8.2e+252)
(+
1.0
(*
y
(*
y
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(*
(+ 1.0 (* (* x x) -0.5))
(+
1.0
(* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333))))))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (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 (x <= 8.2d+252) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = (1.0d0 + ((x * x) * (-0.5d0))) * (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 (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(Float64(1.0 + Float64(Float64(x * x) * -0.5)) * Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = (1.0 + ((x * x) * -0.5)) * (1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(x \cdot x\right) \cdot -0.5\right) \cdot \left(1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6465.2%
Applied egg-rr65.2%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.7%
Simplified29.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.7%
Simplified29.7%
Final simplification63.3%
(FPCore (x y)
:precision binary64
(if (<= x 8.2e+252)
(+
1.0
(*
y
(*
y
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(+ 1.0 (* x (* x -0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 8.2d+252) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = 1.0d0 + (x * (x * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = 1.0 + (x * (x * -0.5)) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(1.0 + Float64(x * Float64(x * -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = 1.0 + (x * (x * -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot -0.5\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6465.2%
Applied egg-rr65.2%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6458.5%
Simplified58.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.7%
Simplified29.7%
Final simplification63.3%
(FPCore (x y) :precision binary64 (if (<= x 8.2e+252) (+ 1.0 (* y (* y (* y (* 0.0001984126984126984 (* y (* y y))))))) (+ 1.0 (* x (* x -0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 8.2d+252) then
tmp = 1.0d0 + (y * (y * (y * (0.0001984126984126984d0 * (y * (y * y))))))
else
tmp = 1.0d0 + (x * (x * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y))))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))) else: tmp = 1.0 + (x * (x * -0.5)) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y))))))); else tmp = Float64(1.0 + Float64(x * Float64(x * -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = 1.0 + (y * (y * (y * (0.0001984126984126984 * (y * (y * y)))))); else tmp = 1.0 + (x * (x * -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(1.0 + N[(y * N[(y * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(y \cdot \left(0.0001984126984126984 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot -0.5\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
Taylor expanded in y around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
cube-multN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6458.5%
Simplified58.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.7%
Simplified29.7%
Final simplification63.2%
(FPCore (x y)
:precision binary64
(if (<= x 6.6e+92)
(+ 1.0 (* (* y y) 0.16666666666666666))
(if (<= x 2.8e+244)
(* 0.041666666666666664 (* (* x x) (* x x)))
(+ 1.0 (* x (* x -0.5))))))
double code(double x, double y) {
double tmp;
if (x <= 6.6e+92) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else if (x <= 2.8e+244) {
tmp = 0.041666666666666664 * ((x * x) * (x * x));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 6.6d+92) then
tmp = 1.0d0 + ((y * y) * 0.16666666666666666d0)
else if (x <= 2.8d+244) then
tmp = 0.041666666666666664d0 * ((x * x) * (x * x))
else
tmp = 1.0d0 + (x * (x * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 6.6e+92) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else if (x <= 2.8e+244) {
tmp = 0.041666666666666664 * ((x * x) * (x * x));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6.6e+92: tmp = 1.0 + ((y * y) * 0.16666666666666666) elif x <= 2.8e+244: tmp = 0.041666666666666664 * ((x * x) * (x * x)) else: tmp = 1.0 + (x * (x * -0.5)) return tmp
function code(x, y) tmp = 0.0 if (x <= 6.6e+92) tmp = Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666)); elseif (x <= 2.8e+244) tmp = Float64(0.041666666666666664 * Float64(Float64(x * x) * Float64(x * x))); else tmp = Float64(1.0 + Float64(x * Float64(x * -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 6.6e+92) tmp = 1.0 + ((y * y) * 0.16666666666666666); elseif (x <= 2.8e+244) tmp = 0.041666666666666664 * ((x * x) * (x * x)); else tmp = 1.0 + (x * (x * -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6.6e+92], N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+244], N[(0.041666666666666664 * N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6.6 \cdot 10^{+92}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot 0.16666666666666666\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+244}:\\
\;\;\;\;0.041666666666666664 \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot -0.5\right)\\
\end{array}
\end{array}
if x < 6.59999999999999948e92Initial program 100.0%
Taylor expanded in x around 0
Simplified73.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.9%
Simplified52.9%
if 6.59999999999999948e92 < x < 2.79999999999999991e244Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6432.9%
Simplified32.9%
Taylor expanded in x around 0
+-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
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.7%
Simplified46.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.7%
Simplified46.7%
if 2.79999999999999991e244 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6456.9%
Simplified56.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6428.7%
Simplified28.7%
Final simplification50.5%
(FPCore (x y) :precision binary64 (if (<= x 8.2e+252) (+ 1.0 (* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333))))) (+ 1.0 (* x (* x -0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 8.2d+252) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
else
tmp = 1.0d0 + (x * (x * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))) else: tmp = 1.0 + (x * (x * -0.5)) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))); else tmp = Float64(1.0 + Float64(x * Float64(x * -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); else tmp = 1.0 + (x * (x * -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot -0.5\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.0%
Simplified62.0%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6458.5%
Simplified58.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.7%
Simplified29.7%
(FPCore (x y) :precision binary64 (if (<= y 0.0018) (+ 1.0 (* (* y y) 0.16666666666666666)) (* y (* 0.008333333333333333 (* y (* y y))))))
double code(double x, double y) {
double tmp;
if (y <= 0.0018) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else {
tmp = y * (0.008333333333333333 * (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 <= 0.0018d0) then
tmp = 1.0d0 + ((y * y) * 0.16666666666666666d0)
else
tmp = y * (0.008333333333333333d0 * (y * (y * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.0018) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else {
tmp = y * (0.008333333333333333 * (y * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.0018: tmp = 1.0 + ((y * y) * 0.16666666666666666) else: tmp = y * (0.008333333333333333 * (y * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (y <= 0.0018) tmp = Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666)); else tmp = Float64(y * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.0018) tmp = 1.0 + ((y * y) * 0.16666666666666666); else tmp = y * (0.008333333333333333 * (y * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.0018], N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(y * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0018:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if y < 0.0018Initial program 100.0%
Taylor expanded in x around 0
Simplified60.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.1%
Simplified49.1%
if 0.0018 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified85.1%
Taylor expanded in y around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.3%
Simplified67.3%
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
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.3%
Simplified67.3%
Final simplification54.3%
(FPCore (x y) :precision binary64 (if (<= x 8.2e+252) (+ 1.0 (* (* y y) 0.16666666666666666)) (+ 1.0 (* x (* x -0.5)))))
double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 8.2d+252) then
tmp = 1.0d0 + ((y * y) * 0.16666666666666666d0)
else
tmp = 1.0d0 + (x * (x * (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.2e+252) {
tmp = 1.0 + ((y * y) * 0.16666666666666666);
} else {
tmp = 1.0 + (x * (x * -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.2e+252: tmp = 1.0 + ((y * y) * 0.16666666666666666) else: tmp = 1.0 + (x * (x * -0.5)) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.2e+252) tmp = Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666)); else tmp = Float64(1.0 + Float64(x * Float64(x * -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.2e+252) tmp = 1.0 + ((y * y) * 0.16666666666666666); else tmp = 1.0 + (x * (x * -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.2e+252], N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.2 \cdot 10^{+252}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot -0.5\right)\\
\end{array}
\end{array}
if x < 8.2000000000000007e252Initial program 100.0%
Taylor expanded in x around 0
Simplified70.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.0%
Simplified50.0%
if 8.2000000000000007e252 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6458.5%
Simplified58.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.7%
Simplified29.7%
Final simplification48.9%
(FPCore (x y) :precision binary64 (if (<= y 0.0018) 1.0 (* (* y y) 0.16666666666666666)))
double code(double x, double y) {
double tmp;
if (y <= 0.0018) {
tmp = 1.0;
} else {
tmp = (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 <= 0.0018d0) then
tmp = 1.0d0
else
tmp = (y * y) * 0.16666666666666666d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.0018) {
tmp = 1.0;
} else {
tmp = (y * y) * 0.16666666666666666;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.0018: tmp = 1.0 else: tmp = (y * y) * 0.16666666666666666 return tmp
function code(x, y) tmp = 0.0 if (y <= 0.0018) tmp = 1.0; else tmp = Float64(Float64(y * y) * 0.16666666666666666); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.0018) tmp = 1.0; else tmp = (y * y) * 0.16666666666666666; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.0018], 1.0, N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0018:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot y\right) \cdot 0.16666666666666666\\
\end{array}
\end{array}
if y < 0.0018Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6465.6%
Simplified65.6%
Taylor expanded in x around 0
Simplified35.4%
if 0.0018 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified85.1%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.8%
Simplified46.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.8%
Simplified46.8%
Final simplification38.7%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* y y) 0.16666666666666666)))
double code(double x, double y) {
return 1.0 + ((y * y) * 0.16666666666666666);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * y) * 0.16666666666666666d0)
end function
public static double code(double x, double y) {
return 1.0 + ((y * y) * 0.16666666666666666);
}
def code(x, y): return 1.0 + ((y * y) * 0.16666666666666666)
function code(x, y) return Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666)) end
function tmp = code(x, y) tmp = 1.0 + ((y * y) * 0.16666666666666666); end
code[x_, y_] := N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(y \cdot y\right) \cdot 0.16666666666666666
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified67.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.4%
Simplified48.4%
Final simplification48.4%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6447.5%
Simplified47.5%
Taylor expanded in x around 0
Simplified25.9%
herbie shell --seed 2024150
(FPCore (x y)
:name "Linear.Quaternion:$csin from linear-1.19.1.3"
:precision binary64
(* (cos x) (/ (sinh y) y)))