
(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 22 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
(if (<= y 0.000115)
(cos x)
(if (<= y 2e+154)
(/ (sinh y) y)
(* (cos x) (+ 1.0 (* 0.16666666666666666 (* y y)))))))
double code(double x, double y) {
double tmp;
if (y <= 0.000115) {
tmp = cos(x);
} else if (y <= 2e+154) {
tmp = sinh(y) / y;
} else {
tmp = cos(x) * (1.0 + (0.16666666666666666 * (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.000115d0) then
tmp = cos(x)
else if (y <= 2d+154) then
tmp = sinh(y) / y
else
tmp = cos(x) * (1.0d0 + (0.16666666666666666d0 * (y * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.000115) {
tmp = Math.cos(x);
} else if (y <= 2e+154) {
tmp = Math.sinh(y) / y;
} else {
tmp = Math.cos(x) * (1.0 + (0.16666666666666666 * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.000115: tmp = math.cos(x) elif y <= 2e+154: tmp = math.sinh(y) / y else: tmp = math.cos(x) * (1.0 + (0.16666666666666666 * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (y <= 0.000115) tmp = cos(x); elseif (y <= 2e+154) tmp = Float64(sinh(y) / y); else tmp = Float64(cos(x) * Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.000115) tmp = cos(x); elseif (y <= 2e+154) tmp = sinh(y) / y; else tmp = cos(x) * (1.0 + (0.16666666666666666 * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.000115], N[Cos[x], $MachinePrecision], If[LessEqual[y, 2e+154], N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision], N[(N[Cos[x], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.000115:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+154}:\\
\;\;\;\;\frac{\sinh y}{y}\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if y < 1.15e-4Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6467.7%
Simplified67.7%
if 1.15e-4 < y < 2.00000000000000007e154Initial program 100.0%
Taylor expanded in x around 0
Simplified83.9%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6483.9%
Applied egg-rr83.9%
if 2.00000000000000007e154 < y Initial program 100.0%
Taylor expanded in y around 0
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
y
(*
y
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))))))
(if (<= y 0.00078)
(cos x)
(if (<= y 8.5e+24)
(/ (/ (* y (+ 1.0 (* t_0 (* t_0 t_0)))) (+ 1.0 (* t_0 (+ t_0 -1.0)))) y)
(if (<= y 1e+67)
(*
(+ 1.0 (* x (* x -0.5)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))))
double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 0.00078) {
tmp = cos(x);
} else if (y <= 8.5e+24) {
tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y;
} else if (y <= 1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
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.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))
if (y <= 0.00078d0) then
tmp = cos(x)
else if (y <= 8.5d+24) then
tmp = ((y * (1.0d0 + (t_0 * (t_0 * t_0)))) / (1.0d0 + (t_0 * (t_0 + (-1.0d0))))) / y
else if (y <= 1d+67) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 0.00078) {
tmp = Math.cos(x);
} else if (y <= 8.5e+24) {
tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y;
} else if (y <= 1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) tmp = 0 if y <= 0.00078: tmp = math.cos(x) elif y <= 8.5e+24: tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y elif y <= 1e+67: tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) t_0 = Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))) tmp = 0.0 if (y <= 0.00078) tmp = cos(x); elseif (y <= 8.5e+24) tmp = Float64(Float64(Float64(y * Float64(1.0 + Float64(t_0 * Float64(t_0 * t_0)))) / Float64(1.0 + Float64(t_0 * Float64(t_0 + -1.0)))) / y); elseif (y <= 1e+67) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))); tmp = 0.0; if (y <= 0.00078) tmp = cos(x); elseif (y <= 8.5e+24) tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y; elseif (y <= 1e+67) tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 0.00078], N[Cos[x], $MachinePrecision], If[LessEqual[y, 8.5e+24], N[(N[(N[(y * N[(1.0 + N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$0 * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1e+67], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 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[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \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{if}\;y \leq 0.00078:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{y \cdot \left(1 + t\_0 \cdot \left(t\_0 \cdot t\_0\right)\right)}{1 + t\_0 \cdot \left(t\_0 + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 10^{+67}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot \left(1 + \left(y \cdot y\right) \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}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 7.79999999999999986e-4Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6467.7%
Simplified67.7%
if 7.79999999999999986e-4 < y < 8.49999999999999959e24Initial program 100.0%
Taylor expanded in x around 0
Simplified100.0%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f643.9%
Simplified3.9%
Applied egg-rr72.4%
if 8.49999999999999959e24 < y < 9.99999999999999983e66Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 9.99999999999999983e66 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification72.2%
(FPCore (x y) :precision binary64 (if (<= y 0.000155) (cos x) (/ (sinh y) y)))
double code(double x, double y) {
double tmp;
if (y <= 0.000155) {
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.000155d0) 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.000155) {
tmp = Math.cos(x);
} else {
tmp = Math.sinh(y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.000155: tmp = math.cos(x) else: tmp = math.sinh(y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 0.000155) 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.000155) tmp = cos(x); else tmp = sinh(y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.000155], N[Cos[x], $MachinePrecision], N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.000155:\\
\;\;\;\;\cos x\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{y}\\
\end{array}
\end{array}
if y < 1.55e-4Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6467.7%
Simplified67.7%
if 1.55e-4 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified87.3%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6487.3%
Applied egg-rr87.3%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
y
(*
y
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))))))
(if (<= y 8.5e+24)
(/ (/ (* y (+ 1.0 (* t_0 (* t_0 t_0)))) (+ 1.0 (* t_0 (+ t_0 -1.0)))) y)
(if (<= y 1.1e+67)
(*
(+ 1.0 (* x (* x -0.5)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y)))))
double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 8.5e+24) {
tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y;
} else if (y <= 1.1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
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.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))
if (y <= 8.5d+24) then
tmp = ((y * (1.0d0 + (t_0 * (t_0 * t_0)))) / (1.0d0 + (t_0 * (t_0 + (-1.0d0))))) / y
else if (y <= 1.1d+67) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 8.5e+24) {
tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y;
} else if (y <= 1.1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) tmp = 0 if y <= 8.5e+24: tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y elif y <= 1.1e+67: tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) t_0 = Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))) tmp = 0.0 if (y <= 8.5e+24) tmp = Float64(Float64(Float64(y * Float64(1.0 + Float64(t_0 * Float64(t_0 * t_0)))) / Float64(1.0 + Float64(t_0 * Float64(t_0 + -1.0)))) / y); elseif (y <= 1.1e+67) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))); tmp = 0.0; if (y <= 8.5e+24) tmp = ((y * (1.0 + (t_0 * (t_0 * t_0)))) / (1.0 + (t_0 * (t_0 + -1.0)))) / y; elseif (y <= 1.1e+67) tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 8.5e+24], N[(N[(N[(y * N[(1.0 + N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$0 * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.1e+67], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 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[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \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{if}\;y \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{y \cdot \left(1 + t\_0 \cdot \left(t\_0 \cdot t\_0\right)\right)}{1 + t\_0 \cdot \left(t\_0 + -1\right)}}{y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+67}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot \left(1 + \left(y \cdot y\right) \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}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 8.49999999999999959e24Initial program 100.0%
Taylor expanded in x around 0
Simplified66.9%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6466.9%
Applied egg-rr66.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/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-*.f6461.5%
Simplified61.5%
Applied egg-rr42.9%
if 8.49999999999999959e24 < y < 1.1e67Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 1.1e67 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification52.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y y)))
(t_1 (+ 0.16666666666666666 (* y (* y 0.008333333333333333))))
(t_2 (* y t_1))
(t_3 (* (* t_0 t_1) t_2)))
(if (<= y 8.5e+24)
(/ (- 1.0 (* t_3 t_3)) (* (+ 1.0 t_3) (- 1.0 (* y t_2))))
(if (<= y 5e+68)
(*
(+ 1.0 (* x (* x -0.5)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(/ (* (* y y) (* 0.008333333333333333 t_0)) y)))))
double code(double x, double y) {
double t_0 = y * (y * y);
double t_1 = 0.16666666666666666 + (y * (y * 0.008333333333333333));
double t_2 = y * t_1;
double t_3 = (t_0 * t_1) * t_2;
double tmp;
if (y <= 8.5e+24) {
tmp = (1.0 - (t_3 * t_3)) / ((1.0 + t_3) * (1.0 - (y * t_2)));
} else if (y <= 5e+68) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * t_0)) / y;
}
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) :: t_3
real(8) :: tmp
t_0 = y * (y * y)
t_1 = 0.16666666666666666d0 + (y * (y * 0.008333333333333333d0))
t_2 = y * t_1
t_3 = (t_0 * t_1) * t_2
if (y <= 8.5d+24) then
tmp = (1.0d0 - (t_3 * t_3)) / ((1.0d0 + t_3) * (1.0d0 - (y * t_2)))
else if (y <= 5d+68) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = ((y * y) * (0.008333333333333333d0 * t_0)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (y * y);
double t_1 = 0.16666666666666666 + (y * (y * 0.008333333333333333));
double t_2 = y * t_1;
double t_3 = (t_0 * t_1) * t_2;
double tmp;
if (y <= 8.5e+24) {
tmp = (1.0 - (t_3 * t_3)) / ((1.0 + t_3) * (1.0 - (y * t_2)));
} else if (y <= 5e+68) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * t_0)) / y;
}
return tmp;
}
def code(x, y): t_0 = y * (y * y) t_1 = 0.16666666666666666 + (y * (y * 0.008333333333333333)) t_2 = y * t_1 t_3 = (t_0 * t_1) * t_2 tmp = 0 if y <= 8.5e+24: tmp = (1.0 - (t_3 * t_3)) / ((1.0 + t_3) * (1.0 - (y * t_2))) elif y <= 5e+68: tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = ((y * y) * (0.008333333333333333 * t_0)) / y return tmp
function code(x, y) t_0 = Float64(y * Float64(y * y)) t_1 = Float64(0.16666666666666666 + Float64(y * Float64(y * 0.008333333333333333))) t_2 = Float64(y * t_1) t_3 = Float64(Float64(t_0 * t_1) * t_2) tmp = 0.0 if (y <= 8.5e+24) tmp = Float64(Float64(1.0 - Float64(t_3 * t_3)) / Float64(Float64(1.0 + t_3) * Float64(1.0 - Float64(y * t_2)))); elseif (y <= 5e+68) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * t_0)) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (y * y); t_1 = 0.16666666666666666 + (y * (y * 0.008333333333333333)); t_2 = y * t_1; t_3 = (t_0 * t_1) * t_2; tmp = 0.0; if (y <= 8.5e+24) tmp = (1.0 - (t_3 * t_3)) / ((1.0 + t_3) * (1.0 - (y * t_2))); elseif (y <= 5e+68) tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = ((y * y) * (0.008333333333333333 * t_0)) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.16666666666666666 + N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$0 * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y, 8.5e+24], N[(N[(1.0 - N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + t$95$3), $MachinePrecision] * N[(1.0 - N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+68], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 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[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \cdot y\right)\\
t_1 := 0.16666666666666666 + y \cdot \left(y \cdot 0.008333333333333333\right)\\
t_2 := y \cdot t\_1\\
t_3 := \left(t\_0 \cdot t\_1\right) \cdot t\_2\\
\mathbf{if}\;y \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{1 - t\_3 \cdot t\_3}{\left(1 + t\_3\right) \cdot \left(1 - y \cdot t\_2\right)}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+68}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot \left(1 + \left(y \cdot y\right) \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}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot t\_0\right)}{y}\\
\end{array}
\end{array}
if y < 8.49999999999999959e24Initial program 100.0%
Taylor expanded in x around 0
Simplified66.9%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6466.9%
Applied egg-rr66.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-*.f6458.1%
Simplified58.1%
flip-+N/A
div-invN/A
metadata-evalN/A
flip--N/A
frac-timesN/A
Applied egg-rr41.2%
if 8.49999999999999959e24 < y < 5.0000000000000004e68Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 5.0000000000000004e68 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification51.4%
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
y
(*
y
(+
0.16666666666666666
(*
y
(*
y
(+ 0.008333333333333333 (* (* y y) 0.0001984126984126984)))))))))
(if (<= y 330.0)
(/ (+ (* t_0 t_0) -1.0) (+ t_0 -1.0))
(if (<= y 4.6e+23)
(/
(*
(- 1.0 (* 0.027777777777777776 (* (* y y) (* y y))))
(+ 1.0 (* (+ -0.5 (* x (* x 0.041666666666666664))) (* x x))))
(+ 1.0 (* (* y y) -0.16666666666666666)))
(if (<= y 2.15e+68)
(*
(+ 1.0 (* x (* x -0.5)))
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))))
double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 330.0) {
tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
} else if (y <= 4.6e+23) {
tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666));
} else if (y <= 2.15e+68) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
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.16666666666666666d0 + (y * (y * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))))
if (y <= 330.0d0) then
tmp = ((t_0 * t_0) + (-1.0d0)) / (t_0 + (-1.0d0))
else if (y <= 4.6d+23) then
tmp = ((1.0d0 - (0.027777777777777776d0 * ((y * y) * (y * y)))) * (1.0d0 + (((-0.5d0) + (x * (x * 0.041666666666666664d0))) * (x * x)))) / (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
else if (y <= 2.15d+68) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * (1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0)))))))
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))));
double tmp;
if (y <= 330.0) {
tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0);
} else if (y <= 4.6e+23) {
tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666));
} else if (y <= 2.15e+68) {
tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))) tmp = 0 if y <= 330.0: tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0) elif y <= 4.6e+23: tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666)) elif y <= 2.15e+68: tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))) else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) t_0 = Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(y * Float64(y * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))))) tmp = 0.0 if (y <= 330.0) tmp = Float64(Float64(Float64(t_0 * t_0) + -1.0) / Float64(t_0 + -1.0)); elseif (y <= 4.6e+23) tmp = Float64(Float64(Float64(1.0 - Float64(0.027777777777777776 * Float64(Float64(y * y) * Float64(y * y)))) * Float64(1.0 + Float64(Float64(-0.5 + Float64(x * Float64(x * 0.041666666666666664))) * Float64(x * x)))) / Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); elseif (y <= 2.15e+68) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984)))))))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (y * (0.16666666666666666 + (y * (y * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))))); tmp = 0.0; if (y <= 330.0) tmp = ((t_0 * t_0) + -1.0) / (t_0 + -1.0); elseif (y <= 4.6e+23) tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666)); elseif (y <= 2.15e+68) tmp = (1.0 + (x * (x * -0.5))) * (1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))); else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * N[(0.16666666666666666 + N[(y * N[(y * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 330.0], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+23], N[(N[(N[(1.0 - N[(0.027777777777777776 * N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+68], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * 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[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(y \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{if}\;y \leq 330:\\
\;\;\;\;\frac{t\_0 \cdot t\_0 + -1}{t\_0 + -1}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{\left(1 - 0.027777777777777776 \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) \cdot \left(1 + \left(-0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right) \cdot \left(x \cdot x\right)\right)}{1 + \left(y \cdot y\right) \cdot -0.16666666666666666}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+68}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot \left(1 + \left(y \cdot y\right) \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}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 330Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6463.6%
Simplified63.6%
+-commutativeN/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-rgt-inN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr40.3%
if 330 < y < 4.6000000000000001e23Initial program 100.0%
Taylor expanded in y around 0
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.4%
Simplified3.4%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.0%
Simplified47.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr58.8%
if 4.6000000000000001e23 < y < 2.1500000000000001e68Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 2.1500000000000001e68 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification51.2%
(FPCore (x y)
:precision binary64
(let* ((t_0
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
(if (<= y 260.0)
t_0
(if (<= y 4.3e+24)
(/
(*
(- 1.0 (* 0.027777777777777776 (* (* y y) (* y y))))
(+ 1.0 (* (+ -0.5 (* x (* x 0.041666666666666664))) (* x x))))
(+ 1.0 (* (* y y) -0.16666666666666666)))
(if (<= y 1e+67)
(* (+ 1.0 (* x (* x -0.5))) t_0)
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))))
double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
double tmp;
if (y <= 260.0) {
tmp = t_0;
} else if (y <= 4.3e+24) {
tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666));
} else if (y <= 1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * t_0;
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
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 = 1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))
if (y <= 260.0d0) then
tmp = t_0
else if (y <= 4.3d+24) then
tmp = ((1.0d0 - (0.027777777777777776d0 * ((y * y) * (y * y)))) * (1.0d0 + (((-0.5d0) + (x * (x * 0.041666666666666664d0))) * (x * x)))) / (1.0d0 + ((y * y) * (-0.16666666666666666d0)))
else if (y <= 1d+67) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * t_0
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
double tmp;
if (y <= 260.0) {
tmp = t_0;
} else if (y <= 4.3e+24) {
tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666));
} else if (y <= 1e+67) {
tmp = (1.0 + (x * (x * -0.5))) * t_0;
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))) tmp = 0 if y <= 260.0: tmp = t_0 elif y <= 4.3e+24: tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666)) elif y <= 1e+67: tmp = (1.0 + (x * (x * -0.5))) * t_0 else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))) tmp = 0.0 if (y <= 260.0) tmp = t_0; elseif (y <= 4.3e+24) tmp = Float64(Float64(Float64(1.0 - Float64(0.027777777777777776 * Float64(Float64(y * y) * Float64(y * y)))) * Float64(1.0 + Float64(Float64(-0.5 + Float64(x * Float64(x * 0.041666666666666664))) * Float64(x * x)))) / Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666))); elseif (y <= 1e+67) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * t_0); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))); tmp = 0.0; if (y <= 260.0) tmp = t_0; elseif (y <= 4.3e+24) tmp = ((1.0 - (0.027777777777777776 * ((y * y) * (y * y)))) * (1.0 + ((-0.5 + (x * (x * 0.041666666666666664))) * (x * x)))) / (1.0 + ((y * y) * -0.16666666666666666)); elseif (y <= 1e+67) tmp = (1.0 + (x * (x * -0.5))) * t_0; else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 260.0], t$95$0, If[LessEqual[y, 4.3e+24], N[(N[(N[(1.0 - N[(0.027777777777777776 * N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+67], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\\
\mathbf{if}\;y \leq 260:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+24}:\\
\;\;\;\;\frac{\left(1 - 0.027777777777777776 \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right)\right) \cdot \left(1 + \left(-0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right) \cdot \left(x \cdot x\right)\right)}{1 + \left(y \cdot y\right) \cdot -0.16666666666666666}\\
\mathbf{elif}\;y \leq 10^{+67}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 260Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6463.6%
Simplified63.6%
if 260 < y < 4.29999999999999987e24Initial program 100.0%
Taylor expanded in y around 0
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.4%
Simplified3.4%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.0%
Simplified47.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr58.8%
if 4.29999999999999987e24 < y < 9.99999999999999983e66Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 9.99999999999999983e66 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification68.7%
(FPCore (x y)
:precision binary64
(let* ((t_0
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(*
(* y y)
(+ 0.008333333333333333 (* y (* y 0.0001984126984126984)))))))))
(if (<= y 400.0)
t_0
(if (<= y 3.9e+24)
(*
0.16666666666666666
(*
(* y y)
(+ 1.0 (* x (* x (+ -0.5 (* 0.041666666666666664 (* x x))))))))
(if (<= y 5.5e+67)
(* (+ 1.0 (* x (* x -0.5))) t_0)
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))))
double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
double tmp;
if (y <= 400.0) {
tmp = t_0;
} else if (y <= 3.9e+24) {
tmp = 0.16666666666666666 * ((y * y) * (1.0 + (x * (x * (-0.5 + (0.041666666666666664 * (x * x)))))));
} else if (y <= 5.5e+67) {
tmp = (1.0 + (x * (x * -0.5))) * t_0;
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
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 = 1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))
if (y <= 400.0d0) then
tmp = t_0
else if (y <= 3.9d+24) then
tmp = 0.16666666666666666d0 * ((y * y) * (1.0d0 + (x * (x * ((-0.5d0) + (0.041666666666666664d0 * (x * x)))))))
else if (y <= 5.5d+67) then
tmp = (1.0d0 + (x * (x * (-0.5d0)))) * t_0
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
double tmp;
if (y <= 400.0) {
tmp = t_0;
} else if (y <= 3.9e+24) {
tmp = 0.16666666666666666 * ((y * y) * (1.0 + (x * (x * (-0.5 + (0.041666666666666664 * (x * x)))))));
} else if (y <= 5.5e+67) {
tmp = (1.0 + (x * (x * -0.5))) * t_0;
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))) tmp = 0 if y <= 400.0: tmp = t_0 elif y <= 3.9e+24: tmp = 0.16666666666666666 * ((y * y) * (1.0 + (x * (x * (-0.5 + (0.041666666666666664 * (x * x))))))) elif y <= 5.5e+67: tmp = (1.0 + (x * (x * -0.5))) * t_0 else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))) tmp = 0.0 if (y <= 400.0) tmp = t_0; elseif (y <= 3.9e+24) tmp = Float64(0.16666666666666666 * Float64(Float64(y * y) * Float64(1.0 + Float64(x * Float64(x * Float64(-0.5 + Float64(0.041666666666666664 * Float64(x * x)))))))); elseif (y <= 5.5e+67) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * -0.5))) * t_0); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))); tmp = 0.0; if (y <= 400.0) tmp = t_0; elseif (y <= 3.9e+24) tmp = 0.16666666666666666 * ((y * y) * (1.0 + (x * (x * (-0.5 + (0.041666666666666664 * (x * x))))))); elseif (y <= 5.5e+67) tmp = (1.0 + (x * (x * -0.5))) * t_0; else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 400.0], t$95$0, If[LessEqual[y, 3.9e+24], N[(0.16666666666666666 * N[(N[(y * y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(-0.5 + N[(0.041666666666666664 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+67], N[(N[(1.0 + N[(x * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)\\
\mathbf{if}\;y \leq 400:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+24}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\left(y \cdot y\right) \cdot \left(1 + x \cdot \left(x \cdot \left(-0.5 + 0.041666666666666664 \cdot \left(x \cdot x\right)\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+67}:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot -0.5\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 400Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6463.6%
Simplified63.6%
if 400 < y < 3.8999999999999998e24Initial program 100.0%
Taylor expanded in y around 0
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.4%
Simplified3.4%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.0%
Simplified47.0%
Taylor expanded in y around inf
*-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
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.8%
Simplified58.8%
if 3.8999999999999998e24 < y < 5.49999999999999968e67Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
if 5.49999999999999968e67 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.5%
Applied egg-rr91.5%
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-*.f6491.5%
Simplified91.5%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.5%
Simplified91.5%
Final simplification68.7%
(FPCore (x y)
:precision binary64
(if (<= y 600.0)
(+ 1.0 (* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333)))))
(if (<= y 1.32e+34)
(*
x
(*
(* x (* x x))
(+ 0.041666666666666664 (* (* y y) 0.006944444444444444))))
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))
double code(double x, double y) {
double tmp;
if (y <= 600.0) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else if (y <= 1.32e+34) {
tmp = x * ((x * (x * x)) * (0.041666666666666664 + ((y * y) * 0.006944444444444444)));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (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 <= 600.0d0) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
else if (y <= 1.32d+34) then
tmp = x * ((x * (x * x)) * (0.041666666666666664d0 + ((y * y) * 0.006944444444444444d0)))
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 600.0) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else if (y <= 1.32e+34) {
tmp = x * ((x * (x * x)) * (0.041666666666666664 + ((y * y) * 0.006944444444444444)));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 600.0: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))) elif y <= 1.32e+34: tmp = x * ((x * (x * x)) * (0.041666666666666664 + ((y * y) * 0.006944444444444444))) else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 600.0) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))); elseif (y <= 1.32e+34) tmp = Float64(x * Float64(Float64(x * Float64(x * x)) * Float64(0.041666666666666664 + Float64(Float64(y * y) * 0.006944444444444444)))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 600.0) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); elseif (y <= 1.32e+34) tmp = x * ((x * (x * x)) * (0.041666666666666664 + ((y * y) * 0.006944444444444444))); else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 600.0], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.32e+34], N[(x * N[(N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(0.041666666666666664 + N[(N[(y * y), $MachinePrecision] * 0.006944444444444444), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 600:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(\left(x \cdot \left(x \cdot x\right)\right) \cdot \left(0.041666666666666664 + \left(y \cdot y\right) \cdot 0.006944444444444444\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 600Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-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-*.f6460.1%
Simplified60.1%
if 600 < y < 1.31999999999999991e34Initial program 100.0%
Taylor expanded in y around 0
associate-*r*N/A
*-lft-identityN/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.4%
Simplified3.4%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6439.3%
Simplified39.3%
Taylor expanded in x around inf
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
unpow2N/A
cube-multN/A
Simplified38.9%
if 1.31999999999999991e34 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified88.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6488.5%
Applied egg-rr88.5%
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-*.f6483.0%
Simplified83.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.0%
Simplified83.0%
(FPCore (x y)
:precision binary64
(if (<= y 390.0)
(+ 1.0 (* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333)))))
(if (<= y 1.32e+34)
(+ 1.0 (* x (* x (+ -0.5 (* x (* x 0.041666666666666664))))))
(/ (* (* y y) (* 0.008333333333333333 (* y (* y y)))) y))))
double code(double x, double y) {
double tmp;
if (y <= 390.0) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else if (y <= 1.32e+34) {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (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 <= 390.0d0) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
else if (y <= 1.32d+34) then
tmp = 1.0d0 + (x * (x * ((-0.5d0) + (x * (x * 0.041666666666666664d0)))))
else
tmp = ((y * y) * (0.008333333333333333d0 * (y * (y * y)))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 390.0) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else if (y <= 1.32e+34) {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
} else {
tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 390.0: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))) elif y <= 1.32e+34: tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))) else: tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 390.0) tmp = Float64(1.0 + Float64(y * Float64(y * Float64(0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))); elseif (y <= 1.32e+34) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(-0.5 + Float64(x * Float64(x * 0.041666666666666664)))))); else tmp = Float64(Float64(Float64(y * y) * Float64(0.008333333333333333 * Float64(y * Float64(y * y)))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 390.0) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); elseif (y <= 1.32e+34) tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))); else tmp = ((y * y) * (0.008333333333333333 * (y * (y * y)))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 390.0], N[(1.0 + N[(y * N[(y * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.32e+34], N[(1.0 + N[(x * N[(x * N[(-0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 390:\\
\;\;\;\;1 + y \cdot \left(y \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+34}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(-0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot y\right) \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)}{y}\\
\end{array}
\end{array}
if y < 390Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-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-*.f6460.1%
Simplified60.1%
if 390 < y < 1.31999999999999991e34Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f643.1%
Simplified3.1%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.3%
Simplified30.3%
if 1.31999999999999991e34 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified88.5%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6488.5%
Applied egg-rr88.5%
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-*.f6483.0%
Simplified83.0%
Taylor expanded in y around inf
metadata-evalN/A
pow-plusN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6483.0%
Simplified83.0%
(FPCore (x y)
:precision binary64
(if (<= y 660.0)
(+ 1.0 (* 0.16666666666666666 (* y y)))
(if (<= y 4e+72)
(* x (* x (* 0.041666666666666664 (* x x))))
(* y (* 0.008333333333333333 (* y (* y y)))))))
double code(double x, double y) {
double tmp;
if (y <= 660.0) {
tmp = 1.0 + (0.16666666666666666 * (y * y));
} else if (y <= 4e+72) {
tmp = x * (x * (0.041666666666666664 * (x * x)));
} 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 <= 660.0d0) then
tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
else if (y <= 4d+72) then
tmp = x * (x * (0.041666666666666664d0 * (x * x)))
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 <= 660.0) {
tmp = 1.0 + (0.16666666666666666 * (y * y));
} else if (y <= 4e+72) {
tmp = x * (x * (0.041666666666666664 * (x * x)));
} else {
tmp = y * (0.008333333333333333 * (y * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 660.0: tmp = 1.0 + (0.16666666666666666 * (y * y)) elif y <= 4e+72: tmp = x * (x * (0.041666666666666664 * (x * x))) else: tmp = y * (0.008333333333333333 * (y * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (y <= 660.0) tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))); elseif (y <= 4e+72) tmp = Float64(x * Float64(x * Float64(0.041666666666666664 * Float64(x * x)))); 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 <= 660.0) tmp = 1.0 + (0.16666666666666666 * (y * y)); elseif (y <= 4e+72) tmp = x * (x * (0.041666666666666664 * (x * x))); else tmp = y * (0.008333333333333333 * (y * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 660.0], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+72], N[(x * N[(x * N[(0.041666666666666664 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $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 660:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+72}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.041666666666666664 \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(0.008333333333333333 \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if y < 660Initial program 100.0%
Taylor expanded in x around 0
Simplified65.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.9%
Simplified52.9%
if 660 < y < 3.99999999999999978e72Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f643.1%
Simplified3.1%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6420.5%
Simplified20.5%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6420.0%
Simplified20.0%
if 3.99999999999999978e72 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified91.3%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6491.3%
Applied egg-rr91.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-*.f6489.4%
Simplified89.4%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.4%
Simplified89.4%
Final simplification57.3%
(FPCore (x y)
:precision binary64
(+
1.0
(*
(* y y)
(+
0.16666666666666666
(* (* y y) (+ 0.008333333333333333 (* y (* y 0.0001984126984126984))))))))
double code(double x, double y) {
return 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * y) * (0.16666666666666666d0 + ((y * y) * (0.008333333333333333d0 + (y * (y * 0.0001984126984126984d0))))))
end function
public static double code(double x, double y) {
return 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))));
}
def code(x, y): return 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984))))))
function code(x, y) return Float64(1.0 + Float64(Float64(y * y) * Float64(0.16666666666666666 + Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(y * Float64(y * 0.0001984126984126984))))))) end
function tmp = code(x, y) tmp = 1.0 + ((y * y) * (0.16666666666666666 + ((y * y) * (0.008333333333333333 + (y * (y * 0.0001984126984126984)))))); end
code[x_, y_] := N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(y * N[(y * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(y \cdot y\right) \cdot \left(0.16666666666666666 + \left(y \cdot y\right) \cdot \left(0.008333333333333333 + y \cdot \left(y \cdot 0.0001984126984126984\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified71.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6465.7%
Simplified65.7%
(FPCore (x y) :precision binary64 (if (<= x 4.4e+189) (+ 1.0 (* y (* y (+ 0.16666666666666666 (* (* y y) 0.008333333333333333))))) (+ 1.0 (* x (* x (+ -0.5 (* x (* x 0.041666666666666664))))))))
double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 4.4d+189) then
tmp = 1.0d0 + (y * (y * (0.16666666666666666d0 + ((y * y) * 0.008333333333333333d0))))
else
tmp = 1.0d0 + (x * (x * ((-0.5d0) + (x * (x * 0.041666666666666664d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4.4e+189: tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))) else: tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 4.4e+189) 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 * Float64(-0.5 + Float64(x * Float64(x * 0.041666666666666664)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4.4e+189) tmp = 1.0 + (y * (y * (0.16666666666666666 + ((y * y) * 0.008333333333333333)))); else tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4.4e+189], 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 * N[(-0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+189}:\\
\;\;\;\;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 \left(-0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if x < 4.4000000000000001e189Initial program 100.0%
Taylor expanded in x around 0
Simplified72.7%
Taylor expanded in y around 0
+-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-*.f6463.5%
Simplified63.5%
if 4.4000000000000001e189 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6440.8%
Simplified40.8%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.1%
Simplified45.1%
(FPCore (x y) :precision binary64 (if (<= x 4.4e+189) (+ 1.0 (* (* y y) (* y (* y 0.008333333333333333)))) (+ 1.0 (* x (* x (+ -0.5 (* x (* x 0.041666666666666664))))))))
double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333)));
} else {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 4.4d+189) then
tmp = 1.0d0 + ((y * y) * (y * (y * 0.008333333333333333d0)))
else
tmp = 1.0d0 + (x * (x * ((-0.5d0) + (x * (x * 0.041666666666666664d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333)));
} else {
tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664)))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4.4e+189: tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333))) else: tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 4.4e+189) tmp = Float64(1.0 + Float64(Float64(y * y) * Float64(y * Float64(y * 0.008333333333333333)))); else tmp = Float64(1.0 + Float64(x * Float64(x * Float64(-0.5 + Float64(x * Float64(x * 0.041666666666666664)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4.4e+189) tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333))); else tmp = 1.0 + (x * (x * (-0.5 + (x * (x * 0.041666666666666664))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4.4e+189], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * N[(-0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+189}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(-0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\\
\end{array}
\end{array}
if x < 4.4000000000000001e189Initial program 100.0%
Taylor expanded in x around 0
Simplified72.7%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6472.7%
Applied egg-rr72.7%
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.5%
Simplified63.5%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
if 4.4000000000000001e189 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6440.8%
Simplified40.8%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.1%
Simplified45.1%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* y y) (* (* y y) (+ 0.008333333333333333 (* (* y y) 0.0001984126984126984))))))
double code(double x, double y) {
return 1.0 + ((y * y) * ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * y) * ((y * y) * (0.008333333333333333d0 + ((y * y) * 0.0001984126984126984d0))))
end function
public static double code(double x, double y) {
return 1.0 + ((y * y) * ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))));
}
def code(x, y): return 1.0 + ((y * y) * ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984))))
function code(x, y) return Float64(1.0 + Float64(Float64(y * y) * Float64(Float64(y * y) * Float64(0.008333333333333333 + Float64(Float64(y * y) * 0.0001984126984126984))))) end
function tmp = code(x, y) tmp = 1.0 + ((y * y) * ((y * y) * (0.008333333333333333 + ((y * y) * 0.0001984126984126984)))); end
code[x_, y_] := N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(0.008333333333333333 + N[(N[(y * y), $MachinePrecision] * 0.0001984126984126984), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(y \cdot y\right) \cdot \left(\left(y \cdot y\right) \cdot \left(0.008333333333333333 + \left(y \cdot y\right) \cdot 0.0001984126984126984\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified71.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6465.7%
Simplified65.7%
Taylor expanded in y around inf
distribute-lft-inN/A
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
pow-sqrN/A
associate-/l*N/A
*-lft-identityN/A
associate-*l/N/A
lft-mult-inverseN/A
*-rgt-identityN/A
*-commutativeN/A
distribute-rgt-inN/A
+-commutativeN/A
Simplified65.2%
(FPCore (x y) :precision binary64 (if (<= x 4.4e+189) (+ 1.0 (* (* y y) (* y (* y 0.008333333333333333)))) (* x (* x (* 0.041666666666666664 (* x x))))))
double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333)));
} else {
tmp = x * (x * (0.041666666666666664 * (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.4d+189) then
tmp = 1.0d0 + ((y * y) * (y * (y * 0.008333333333333333d0)))
else
tmp = x * (x * (0.041666666666666664d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 4.4e+189) {
tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333)));
} else {
tmp = x * (x * (0.041666666666666664 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4.4e+189: tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333))) else: tmp = x * (x * (0.041666666666666664 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 4.4e+189) tmp = Float64(1.0 + Float64(Float64(y * y) * Float64(y * Float64(y * 0.008333333333333333)))); else tmp = Float64(x * Float64(x * Float64(0.041666666666666664 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4.4e+189) tmp = 1.0 + ((y * y) * (y * (y * 0.008333333333333333))); else tmp = x * (x * (0.041666666666666664 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4.4e+189], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(0.041666666666666664 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.4 \cdot 10^{+189}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left(y \cdot \left(y \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.041666666666666664 \cdot \left(x \cdot x\right)\right)\right)\\
\end{array}
\end{array}
if x < 4.4000000000000001e189Initial program 100.0%
Taylor expanded in x around 0
Simplified72.7%
*-lft-identityN/A
/-lowering-/.f64N/A
sinh-lowering-sinh.f6472.7%
Applied egg-rr72.7%
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.5%
Simplified63.5%
Taylor expanded in y around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6463.1%
Simplified63.1%
if 4.4000000000000001e189 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6440.8%
Simplified40.8%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.1%
Simplified45.1%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
Final simplification61.9%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* y y) (* y (* 0.0001984126984126984 (* y (* y y)))))))
double code(double x, double y) {
return 1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y)))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * y) * (y * (0.0001984126984126984d0 * (y * (y * y)))))
end function
public static double code(double x, double y) {
return 1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y)))));
}
def code(x, y): return 1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y)))))
function code(x, y) return Float64(1.0 + Float64(Float64(y * y) * Float64(y * Float64(0.0001984126984126984 * Float64(y * Float64(y * y)))))) end
function tmp = code(x, y) tmp = 1.0 + ((y * y) * (y * (0.0001984126984126984 * (y * (y * y))))); end
code[x_, y_] := N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(y * N[(0.0001984126984126984 * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
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)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified71.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.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
*-commutativeN/A
*-lowering-*.f6465.7%
Simplified65.7%
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
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.2%
Simplified65.2%
(FPCore (x y) :precision binary64 (if (<= x 8.5e+106) (+ 1.0 (* 0.16666666666666666 (* y y))) (* x (* x (* 0.041666666666666664 (* x x))))))
double code(double x, double y) {
double tmp;
if (x <= 8.5e+106) {
tmp = 1.0 + (0.16666666666666666 * (y * y));
} else {
tmp = x * (x * (0.041666666666666664 * (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 <= 8.5d+106) then
tmp = 1.0d0 + (0.16666666666666666d0 * (y * y))
else
tmp = x * (x * (0.041666666666666664d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 8.5e+106) {
tmp = 1.0 + (0.16666666666666666 * (y * y));
} else {
tmp = x * (x * (0.041666666666666664 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 8.5e+106: tmp = 1.0 + (0.16666666666666666 * (y * y)) else: tmp = x * (x * (0.041666666666666664 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 8.5e+106) tmp = Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))); else tmp = Float64(x * Float64(x * Float64(0.041666666666666664 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 8.5e+106) tmp = 1.0 + (0.16666666666666666 * (y * y)); else tmp = x * (x * (0.041666666666666664 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 8.5e+106], N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(x * N[(0.041666666666666664 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8.5 \cdot 10^{+106}:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.041666666666666664 \cdot \left(x \cdot x\right)\right)\right)\\
\end{array}
\end{array}
if x < 8.4999999999999992e106Initial program 100.0%
Taylor expanded in x around 0
Simplified75.4%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.2%
Simplified55.2%
if 8.4999999999999992e106 < x Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6454.6%
Simplified54.6%
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
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6435.3%
Simplified35.3%
Taylor expanded in x around inf
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
unpow3N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification52.7%
(FPCore (x y) :precision binary64 (if (<= y 2.45) 1.0 (* 0.16666666666666666 (* y y))))
double code(double x, double y) {
double tmp;
if (y <= 2.45) {
tmp = 1.0;
} else {
tmp = 0.16666666666666666 * (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 <= 2.45d0) then
tmp = 1.0d0
else
tmp = 0.16666666666666666d0 * (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.45) {
tmp = 1.0;
} else {
tmp = 0.16666666666666666 * (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.45: tmp = 1.0 else: tmp = 0.16666666666666666 * (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.45) tmp = 1.0; else tmp = Float64(0.16666666666666666 * Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.45) tmp = 1.0; else tmp = 0.16666666666666666 * (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.45], 1.0, N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.45:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\end{array}
\end{array}
if y < 2.4500000000000002Initial program 100.0%
Taylor expanded in y around 0
cos-lowering-cos.f6467.7%
Simplified67.7%
Taylor expanded in x around 0
Simplified40.4%
if 2.4500000000000002 < y Initial program 100.0%
Taylor expanded in x around 0
Simplified87.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.2%
Simplified48.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.2%
Simplified48.2%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.16666666666666666 (* y y))))
double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.16666666666666666d0 * (y * y))
end function
public static double code(double x, double y) {
return 1.0 + (0.16666666666666666 * (y * y));
}
def code(x, y): return 1.0 + (0.16666666666666666 * (y * y))
function code(x, y) return Float64(1.0 + Float64(0.16666666666666666 * Float64(y * y))) end
function tmp = code(x, y) tmp = 1.0 + (0.16666666666666666 * (y * y)); end
code[x_, y_] := N[(1.0 + N[(0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.16666666666666666 \cdot \left(y \cdot y\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified71.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
(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.f6451.8%
Simplified51.8%
Taylor expanded in x around 0
Simplified31.2%
herbie shell --seed 2024163
(FPCore (x y)
:name "Linear.Quaternion:$csin from linear-1.19.1.3"
:precision binary64
(* (cos x) (/ (sinh y) y)))