
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
(FPCore (x y) :precision binary64 (/ (sin y) (/ y (cosh x))))
double code(double x, double y) {
return sin(y) / (y / cosh(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(y) / (y / cosh(x))
end function
public static double code(double x, double y) {
return Math.sin(y) / (y / Math.cosh(x));
}
def code(x, y): return math.sin(y) / (y / math.cosh(x))
function code(x, y) return Float64(sin(y) / Float64(y / cosh(x))) end
function tmp = code(x, y) tmp = sin(y) / (y / cosh(x)); end
code[x_, y_] := N[(N[Sin[y], $MachinePrecision] / N[(y / N[Cosh[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin y}{\frac{y}{\cosh x}}
\end{array}
Initial program 99.9%
Applied egg-rr0
Applied egg-rr0
(FPCore (x y) :precision binary64 (* (cosh x) (/ (sin y) y)))
double code(double x, double y) {
return cosh(x) * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cosh(x) * (sin(y) / y)
end function
public static double code(double x, double y) {
return Math.cosh(x) * (Math.sin(y) / y);
}
def code(x, y): return math.cosh(x) * (math.sin(y) / y)
function code(x, y) return Float64(cosh(x) * Float64(sin(y) / y)) end
function tmp = code(x, y) tmp = cosh(x) * (sin(y) / y); end
code[x_, y_] := N[(N[Cosh[x], $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\cosh x \cdot \frac{\sin y}{y}
\end{array}
Initial program 99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))
(if (<= x 500000.0)
(* (+ 1.0 (* x (* x (+ 0.5 (* x (* x t_0)))))) (/ (sin y) y))
(if (<= x 3.6e+48)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
(* (/ (+ 1.0 (* (* x x) (+ 0.5 (* (* x x) t_0)))) y) (sin y))))))
double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double tmp;
if (x <= 500000.0) {
tmp = (1.0 + (x * (x * (0.5 + (x * (x * t_0)))))) * (sin(y) / y);
} else if (x <= 3.6e+48) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))) / y) * sin(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 = 0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))
if (x <= 500000.0d0) then
tmp = (1.0d0 + (x * (x * (0.5d0 + (x * (x * t_0)))))) * (sin(y) / y)
else if (x <= 3.6d+48) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * t_0)))) / y) * sin(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889));
double tmp;
if (x <= 500000.0) {
tmp = (1.0 + (x * (x * (0.5 + (x * (x * t_0)))))) * (Math.sin(y) / y);
} else if (x <= 3.6e+48) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))) / y) * Math.sin(y);
}
return tmp;
}
def code(x, y): t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)) tmp = 0 if x <= 500000.0: tmp = (1.0 + (x * (x * (0.5 + (x * (x * t_0)))))) * (math.sin(y) / y) elif x <= 3.6e+48: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))) / y) * math.sin(y) return tmp
function code(x, y) t_0 = Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))) tmp = 0.0 if (x <= 500000.0) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * Float64(x * t_0)))))) * Float64(sin(y) / y)); elseif (x <= 3.6e+48) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * t_0)))) / y) * sin(y)); end return tmp end
function tmp_2 = code(x, y) t_0 = 0.041666666666666664 + (x * (x * 0.001388888888888889)); tmp = 0.0; if (x <= 500000.0) tmp = (1.0 + (x * (x * (0.5 + (x * (x * t_0)))))) * (sin(y) / y); elseif (x <= 3.6e+48) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * t_0)))) / y) * sin(y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000.0], N[(N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+48], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\\
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;\left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot t\_0\right)\right)\right)\right) \cdot \frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+48}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot t\_0\right)}{y} \cdot \sin y\\
\end{array}
\end{array}
if x < 5e5Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 5e5 < x < 3.59999999999999983e48Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
if 3.59999999999999983e48 < x Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(+
1.0
(*
x
(*
x
(+
0.5
(*
x
(*
x
(+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))))))
(/ (sin y) y))))
(if (<= x 500000.0)
t_0
(if (<= x 7.2e+51)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
t_0))))
double code(double x, double y) {
double t_0 = (1.0 + (x * (x * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))))) * (sin(y) / y);
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 7.2e+51) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + (x * (x * (0.5d0 + (x * (x * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))))) * (sin(y) / y)
if (x <= 500000.0d0) then
tmp = t_0
else if (x <= 7.2d+51) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + (x * (x * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))))) * (Math.sin(y) / y);
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 7.2e+51) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + (x * (x * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))))) * (math.sin(y) / y) tmp = 0 if x <= 500000.0: tmp = t_0 elif x <= 7.2e+51: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))))) * Float64(sin(y) / y)) tmp = 0.0 if (x <= 500000.0) tmp = t_0; elseif (x <= 7.2e+51) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + (x * (x * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))))) * (sin(y) / y); tmp = 0.0; if (x <= 500000.0) tmp = t_0; elseif (x <= 7.2e+51) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000.0], t$95$0, If[LessEqual[x, 7.2e+51], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)\right)\right) \cdot \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+51}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 5e5 or 7.20000000000000022e51 < x Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 5e5 < x < 7.20000000000000022e51Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= x 500000.0)
(/
(* (+ 1.0 (* (* x x) (+ 0.5 (* (* x x) 0.041666666666666664)))) (sin y))
y)
(if (<= x 2.5e+77)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
(*
(/ (sin y) y)
(+ 1.0 (* x (* x (+ 0.5 (* x (* x 0.041666666666666664))))))))))
double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * 0.041666666666666664)))) * sin(y)) / y;
} else if (x <= 2.5e+77) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = (sin(y) / y) * (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 <= 500000.0d0) then
tmp = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * 0.041666666666666664d0)))) * sin(y)) / y
else if (x <= 2.5d+77) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = (sin(y) / y) * (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 <= 500000.0) {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * 0.041666666666666664)))) * Math.sin(y)) / y;
} else if (x <= 2.5e+77) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = (Math.sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 500000.0: tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * 0.041666666666666664)))) * math.sin(y)) / y elif x <= 2.5e+77: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = (math.sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 500000.0) tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * 0.041666666666666664)))) * sin(y)) / y); elseif (x <= 2.5e+77) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = Float64(Float64(sin(y) / y) * 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 <= 500000.0) tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * 0.041666666666666664)))) * sin(y)) / y; elseif (x <= 2.5e+77) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = (sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 500000.0], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 2.5e+77], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;\frac{\left(1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot 0.041666666666666664\right)\right) \cdot \sin y}{y}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin y}{y} \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 5e5Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
if 5e5 < x < 2.50000000000000002e77Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
if 2.50000000000000002e77 < x Initial program 100.0%
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(let* ((t_0
(*
(/ (sin y) y)
(+ 1.0 (* x (* x (+ 0.5 (* x (* x 0.041666666666666664)))))))))
(if (<= x 500000.0)
t_0
(if (<= x 2.5e+77)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
t_0))))
double code(double x, double y) {
double t_0 = (sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 2.5e+77) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (sin(y) / y) * (1.0d0 + (x * (x * (0.5d0 + (x * (x * 0.041666666666666664d0))))))
if (x <= 500000.0d0) then
tmp = t_0
else if (x <= 2.5d+77) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (Math.sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 2.5e+77) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (math.sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))) tmp = 0 if x <= 500000.0: tmp = t_0 elif x <= 2.5e+77: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(sin(y) / y) * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))))) tmp = 0.0 if (x <= 500000.0) tmp = t_0; elseif (x <= 2.5e+77) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (sin(y) / y) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))); tmp = 0.0; if (x <= 500000.0) tmp = t_0; elseif (x <= 2.5e+77) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000.0], t$95$0, If[LessEqual[x, 2.5e+77], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{y} \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\right)\\
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 5e5 or 2.50000000000000002e77 < x Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 5e5 < x < 2.50000000000000002e77Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (sin y) (/ y (+ 1.0 (* x (* x 0.5)))))))
(if (<= x 500000.0)
t_0
(if (<= x 3.5e+141)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
t_0))))
double code(double x, double y) {
double t_0 = sin(y) / (y / (1.0 + (x * (x * 0.5))));
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 3.5e+141) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sin(y) / (y / (1.0d0 + (x * (x * 0.5d0))))
if (x <= 500000.0d0) then
tmp = t_0
else if (x <= 3.5d+141) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sin(y) / (y / (1.0 + (x * (x * 0.5))));
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 3.5e+141) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sin(y) / (y / (1.0 + (x * (x * 0.5)))) tmp = 0 if x <= 500000.0: tmp = t_0 elif x <= 3.5e+141: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sin(y) / Float64(y / Float64(1.0 + Float64(x * Float64(x * 0.5))))) tmp = 0.0 if (x <= 500000.0) tmp = t_0; elseif (x <= 3.5e+141) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sin(y) / (y / (1.0 + (x * (x * 0.5)))); tmp = 0.0; if (x <= 500000.0) tmp = t_0; elseif (x <= 3.5e+141) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sin[y], $MachinePrecision] / N[(y / N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000.0], t$95$0, If[LessEqual[x, 3.5e+141], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sin y}{\frac{y}{1 + x \cdot \left(x \cdot 0.5\right)}}\\
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+141}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 5e5 or 3.5e141 < x Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
if 5e5 < x < 3.5e141Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (+ 1.0 (* x (* 0.5 x))) (/ (sin y) y))))
(if (<= x 500000.0)
t_0
(if (<= x 1.85e+154)
(* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))
t_0))))
double code(double x, double y) {
double t_0 = (1.0 + (x * (0.5 * x))) * (sin(y) / y);
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 1.85e+154) {
tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + (x * (0.5d0 * x))) * (sin(y) / y)
if (x <= 500000.0d0) then
tmp = t_0
else if (x <= 1.85d+154) then
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (1.0 + (x * (0.5 * x))) * (Math.sin(y) / y);
double tmp;
if (x <= 500000.0) {
tmp = t_0;
} else if (x <= 1.85e+154) {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (1.0 + (x * (0.5 * x))) * (math.sin(y) / y) tmp = 0 if x <= 500000.0: tmp = t_0 elif x <= 1.85e+154: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(1.0 + Float64(x * Float64(0.5 * x))) * Float64(sin(y) / y)) tmp = 0.0 if (x <= 500000.0) tmp = t_0; elseif (x <= 1.85e+154) tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (1.0 + (x * (0.5 * x))) * (sin(y) / y); tmp = 0.0; if (x <= 500000.0) tmp = t_0; elseif (x <= 1.85e+154) tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 + N[(x * N[(0.5 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 500000.0], t$95$0, If[LessEqual[x, 1.85e+154], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + x \cdot \left(0.5 \cdot x\right)\right) \cdot \frac{\sin y}{y}\\
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+154}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < 5e5 or 1.84999999999999997e154 < x Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 5e5 < x < 1.84999999999999997e154Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= x 500000.0) (/ (sin y) y) (* (cosh x) (+ 1.0 (* -0.16666666666666666 (* y y))))))
double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = sin(y) / y;
} else {
tmp = cosh(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 (x <= 500000.0d0) then
tmp = sin(y) / y
else
tmp = cosh(x) * (1.0d0 + ((-0.16666666666666666d0) * (y * y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = Math.sin(y) / y;
} else {
tmp = Math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 500000.0: tmp = math.sin(y) / y else: tmp = math.cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))) return tmp
function code(x, y) tmp = 0.0 if (x <= 500000.0) tmp = Float64(sin(y) / y); else tmp = Float64(cosh(x) * Float64(1.0 + Float64(-0.16666666666666666 * Float64(y * y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 500000.0) tmp = sin(y) / y; else tmp = cosh(x) * (1.0 + (-0.16666666666666666 * (y * y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 500000.0], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], N[(N[Cosh[x], $MachinePrecision] * N[(1.0 + N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{else}:\\
\;\;\;\;\cosh x \cdot \left(1 + -0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\end{array}
if x < 5e5Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 5e5 < x Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= x 0.34)
(/ (sin y) y)
(if (<= x 6e+44)
(cosh x)
(*
(/
(+
1.0
(*
(* x x)
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))))
y)
(* y (+ 1.0 (* (* y y) -0.16666666666666666)))))))
double code(double x, double y) {
double tmp;
if (x <= 0.34) {
tmp = sin(y) / y;
} else if (x <= 6e+44) {
tmp = cosh(x);
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.34d0) then
tmp = sin(y) / y
else if (x <= 6d+44) then
tmp = cosh(x)
else
tmp = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))) / y) * (y * (1.0d0 + ((y * y) * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.34) {
tmp = Math.sin(y) / y;
} else if (x <= 6e+44) {
tmp = Math.cosh(x);
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.34: tmp = math.sin(y) / y elif x <= 6e+44: tmp = math.cosh(x) else: tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.34) tmp = Float64(sin(y) / y); elseif (x <= 6e+44) tmp = cosh(x); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))) / y) * Float64(y * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.34) tmp = sin(y) / y; elseif (x <= 6e+44) tmp = cosh(x); else tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.34], N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision], If[LessEqual[x, 6e+44], N[Cosh[x], $MachinePrecision], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.34:\\
\;\;\;\;\frac{\sin y}{y}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+44}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)}{y} \cdot \left(y \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < 0.340000000000000024Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
if 0.340000000000000024 < x < 5.99999999999999974e44Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 5.99999999999999974e44 < x Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= x 2.6e+42)
(cosh x)
(*
(/
(+
1.0
(*
(* x x)
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))))
y)
(* y (+ 1.0 (* (* y y) -0.16666666666666666))))))
double code(double x, double y) {
double tmp;
if (x <= 2.6e+42) {
tmp = cosh(x);
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2.6d+42) then
tmp = cosh(x)
else
tmp = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))) / y) * (y * (1.0d0 + ((y * y) * (-0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.6e+42) {
tmp = Math.cosh(x);
} else {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.6e+42: tmp = math.cosh(x) else: tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666))) return tmp
function code(x, y) tmp = 0.0 if (x <= 2.6e+42) tmp = cosh(x); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))) / y) * Float64(y * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.6e+42) tmp = cosh(x); else tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.6e+42], N[Cosh[x], $MachinePrecision], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.6 \cdot 10^{+42}:\\
\;\;\;\;\cosh x\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)}{y} \cdot \left(y \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < 2.5999999999999999e42Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if 2.5999999999999999e42 < x Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= y 60.0)
(/
(/ (+ 1.0 (* (* x x) (+ 0.5 (* x (* x 0.041666666666666664))))) y)
(/ (+ 1.0 (* (* y y) 0.16666666666666666)) y))
(if (<= y 3.2e+50)
(/
-1.0
(-
0.0
(/
1.0
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* 0.001388888888888889 (* x x)))))))))))
(if (<= y 3.3e+100)
(*
(+ 1.0 (* x (* 0.5 x)))
(+
1.0
(*
(* y y)
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333)))))
(* (+ 1.0 (* (* y y) -0.16666666666666666)) (+ 1.0 (* 0.5 (* x x))))))))
double code(double x, double y) {
double tmp;
if (y <= 60.0) {
tmp = ((1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) / y) / ((1.0 + ((y * y) * 0.16666666666666666)) / y);
} else if (y <= 3.2e+50) {
tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x))))))))));
} else if (y <= 3.3e+100) {
tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 60.0d0) then
tmp = ((1.0d0 + ((x * x) * (0.5d0 + (x * (x * 0.041666666666666664d0))))) / y) / ((1.0d0 + ((y * y) * 0.16666666666666666d0)) / y)
else if (y <= 3.2d+50) then
tmp = (-1.0d0) / (0.0d0 - (1.0d0 / (1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (0.001388888888888889d0 * (x * x))))))))))
else if (y <= 3.3d+100) then
tmp = (1.0d0 + (x * (0.5d0 * x))) * (1.0d0 + ((y * y) * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0))))
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + (0.5d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 60.0) {
tmp = ((1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) / y) / ((1.0 + ((y * y) * 0.16666666666666666)) / y);
} else if (y <= 3.2e+50) {
tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x))))))))));
} else if (y <= 3.3e+100) {
tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 60.0: tmp = ((1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) / y) / ((1.0 + ((y * y) * 0.16666666666666666)) / y) elif y <= 3.2e+50: tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x)))))))))) elif y <= 3.3e+100: tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 60.0) tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))) / y) / Float64(Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666)) / y)); elseif (y <= 3.2e+50) tmp = Float64(-1.0 / Float64(0.0 - Float64(1.0 / Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(0.001388888888888889 * Float64(x * x))))))))))); elseif (y <= 3.3e+100) tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 * x))) * Float64(1.0 + Float64(Float64(y * y) * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))); else tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(0.5 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 60.0) tmp = ((1.0 + ((x * x) * (0.5 + (x * (x * 0.041666666666666664))))) / y) / ((1.0 + ((y * y) * 0.16666666666666666)) / y); elseif (y <= 3.2e+50) tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x)))))))))); elseif (y <= 3.3e+100) tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 60.0], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+50], N[(-1.0 / N[(0.0 - N[(1.0 / N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(0.001388888888888889 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+100], N[(N[(1.0 + N[(x * N[(0.5 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 60:\\
\;\;\;\;\frac{\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)}{y}}{\frac{1 + \left(y \cdot y\right) \cdot 0.16666666666666666}{y}}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{-1}{0 - \frac{1}{1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + 0.001388888888888889 \cdot \left(x \cdot x\right)\right)\right)\right)}}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+100}:\\
\;\;\;\;\left(1 + x \cdot \left(0.5 \cdot x\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if y < 60Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 60 < y < 3.19999999999999983e50Initial program 99.7%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
if 3.19999999999999983e50 < y < 3.3000000000000001e100Initial program 99.7%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 3.3000000000000001e100 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= y 1e-157)
(*
(/
(+
1.0
(*
(* x x)
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))))
y)
y)
(if (<= y 200000000000.0)
(*
(+ (* -0.16666666666666666 (* y y)) 1.0)
(+ 1.0 (* x (* x (+ 0.5 (* x (* x 0.041666666666666664)))))))
(if (<= y 3.3e+100)
(*
(+ 1.0 (* x (* 0.5 x)))
(+
1.0
(*
(* y y)
(+ -0.16666666666666666 (* (* y y) 0.008333333333333333)))))
(* (+ 1.0 (* (* y y) -0.16666666666666666)) (+ 1.0 (* 0.5 (* x x))))))))
double code(double x, double y) {
double tmp;
if (y <= 1e-157) {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * y;
} else if (y <= 200000000000.0) {
tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
} else if (y <= 3.3e+100) {
tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1d-157) then
tmp = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))) / y) * y
else if (y <= 200000000000.0d0) then
tmp = (((-0.16666666666666666d0) * (y * y)) + 1.0d0) * (1.0d0 + (x * (x * (0.5d0 + (x * (x * 0.041666666666666664d0))))))
else if (y <= 3.3d+100) then
tmp = (1.0d0 + (x * (0.5d0 * x))) * (1.0d0 + ((y * y) * ((-0.16666666666666666d0) + ((y * y) * 0.008333333333333333d0))))
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + (0.5d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1e-157) {
tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * y;
} else if (y <= 200000000000.0) {
tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
} else if (y <= 3.3e+100) {
tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1e-157: tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * y elif y <= 200000000000.0: tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))) elif y <= 3.3e+100: tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 1e-157) tmp = Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))) / y) * y); elseif (y <= 200000000000.0) tmp = Float64(Float64(Float64(-0.16666666666666666 * Float64(y * y)) + 1.0) * Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * Float64(x * 0.041666666666666664))))))); elseif (y <= 3.3e+100) tmp = Float64(Float64(1.0 + Float64(x * Float64(0.5 * x))) * Float64(1.0 + Float64(Float64(y * y) * Float64(-0.16666666666666666 + Float64(Float64(y * y) * 0.008333333333333333))))); else tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(0.5 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1e-157) tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * y; elseif (y <= 200000000000.0) tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))); elseif (y <= 3.3e+100) tmp = (1.0 + (x * (0.5 * x))) * (1.0 + ((y * y) * (-0.16666666666666666 + ((y * y) * 0.008333333333333333)))); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1e-157], N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 200000000000.0], N[(N[(N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+100], N[(N[(1.0 + N[(x * N[(0.5 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(-0.16666666666666666 + N[(N[(y * y), $MachinePrecision] * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{-157}:\\
\;\;\;\;\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)}{y} \cdot y\\
\mathbf{elif}\;y \leq 200000000000:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right) \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+100}:\\
\;\;\;\;\left(1 + x \cdot \left(0.5 \cdot x\right)\right) \cdot \left(1 + \left(y \cdot y\right) \cdot \left(-0.16666666666666666 + \left(y \cdot y\right) \cdot 0.008333333333333333\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if y < 9.99999999999999943e-158Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 9.99999999999999943e-158 < y < 2e11Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 2e11 < y < 3.3000000000000001e100Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 3.3000000000000001e100 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= x 500000.0)
(/ (+ 1.0 (* x (* x 0.5))) (+ 1.0 (* (* y y) 0.16666666666666666)))
(if (<= x 7.2e+69)
(/
(+ 51.42857142857143 (* (* x x) 25.714285714285715))
(* (* y y) (* y y)))
(if (<= x 2e+177)
(+
1.0
(*
x
(*
x
(+
0.5
(*
(* x x)
(+ 0.041666666666666664 (* 0.001388888888888889 (* x x))))))))
(* (+ 1.0 (* (* y y) -0.16666666666666666)) (+ 1.0 (* 0.5 (* x x))))))))
double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666));
} else if (x <= 7.2e+69) {
tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y));
} else if (x <= 2e+177) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x)))))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (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 <= 500000.0d0) then
tmp = (1.0d0 + (x * (x * 0.5d0))) / (1.0d0 + ((y * y) * 0.16666666666666666d0))
else if (x <= 7.2d+69) then
tmp = (51.42857142857143d0 + ((x * x) * 25.714285714285715d0)) / ((y * y) * (y * y))
else if (x <= 2d+177) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (0.001388888888888889d0 * (x * x)))))))
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + (0.5d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666));
} else if (x <= 7.2e+69) {
tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y));
} else if (x <= 2e+177) {
tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x)))))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 500000.0: tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666)) elif x <= 7.2e+69: tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y)) elif x <= 2e+177: tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x))))))) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 500000.0) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * 0.5))) / Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666))); elseif (x <= 7.2e+69) tmp = Float64(Float64(51.42857142857143 + Float64(Float64(x * x) * 25.714285714285715)) / Float64(Float64(y * y) * Float64(y * y))); elseif (x <= 2e+177) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(0.001388888888888889 * Float64(x * x)))))))); else tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(0.5 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 500000.0) tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666)); elseif (x <= 7.2e+69) tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y)); elseif (x <= 2e+177) tmp = 1.0 + (x * (x * (0.5 + ((x * x) * (0.041666666666666664 + (0.001388888888888889 * (x * x))))))); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 500000.0], N[(N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e+69], N[(N[(51.42857142857143 + N[(N[(x * x), $MachinePrecision] * 25.714285714285715), $MachinePrecision]), $MachinePrecision] / N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+177], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(0.001388888888888889 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;\frac{1 + x \cdot \left(x \cdot 0.5\right)}{1 + \left(y \cdot y\right) \cdot 0.16666666666666666}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+69}:\\
\;\;\;\;\frac{51.42857142857143 + \left(x \cdot x\right) \cdot 25.714285714285715}{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+177}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + 0.001388888888888889 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if x < 5e5Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around 0 0
Simplified0
if 5e5 < x < 7.2000000000000005e69Initial program 100.0%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in y around inf 0
Simplified0
if 7.2000000000000005e69 < x < 2e177Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
if 2e177 < x Initial program 100.0%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= x 500000.0)
(/ (+ 1.0 (* x (* x 0.5))) (+ 1.0 (* (* y y) 0.16666666666666666)))
(if (<= x 3.3e+58)
(/
(+ 51.42857142857143 (* (* x x) 25.714285714285715))
(* (* y y) (* y y)))
(*
(+ (* -0.16666666666666666 (* y y)) 1.0)
(+ 1.0 (* x (* x (+ 0.5 (* x (* x 0.041666666666666664))))))))))
double code(double x, double y) {
double tmp;
if (x <= 500000.0) {
tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666));
} else if (x <= 3.3e+58) {
tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y));
} else {
tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (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 <= 500000.0d0) then
tmp = (1.0d0 + (x * (x * 0.5d0))) / (1.0d0 + ((y * y) * 0.16666666666666666d0))
else if (x <= 3.3d+58) then
tmp = (51.42857142857143d0 + ((x * x) * 25.714285714285715d0)) / ((y * y) * (y * y))
else
tmp = (((-0.16666666666666666d0) * (y * y)) + 1.0d0) * (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 <= 500000.0) {
tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666));
} else if (x <= 3.3e+58) {
tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y));
} else {
tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664))))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 500000.0: tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666)) elif x <= 3.3e+58: tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y)) else: tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))) return tmp
function code(x, y) tmp = 0.0 if (x <= 500000.0) tmp = Float64(Float64(1.0 + Float64(x * Float64(x * 0.5))) / Float64(1.0 + Float64(Float64(y * y) * 0.16666666666666666))); elseif (x <= 3.3e+58) tmp = Float64(Float64(51.42857142857143 + Float64(Float64(x * x) * 25.714285714285715)) / Float64(Float64(y * y) * Float64(y * y))); else tmp = Float64(Float64(Float64(-0.16666666666666666 * Float64(y * y)) + 1.0) * 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 <= 500000.0) tmp = (1.0 + (x * (x * 0.5))) / (1.0 + ((y * y) * 0.16666666666666666)); elseif (x <= 3.3e+58) tmp = (51.42857142857143 + ((x * x) * 25.714285714285715)) / ((y * y) * (y * y)); else tmp = ((-0.16666666666666666 * (y * y)) + 1.0) * (1.0 + (x * (x * (0.5 + (x * (x * 0.041666666666666664)))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 500000.0], N[(N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * y), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+58], N[(N[(51.42857142857143 + N[(N[(x * x), $MachinePrecision] * 25.714285714285715), $MachinePrecision]), $MachinePrecision] / N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 * N[(y * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * N[(x * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 500000:\\
\;\;\;\;\frac{1 + x \cdot \left(x \cdot 0.5\right)}{1 + \left(y \cdot y\right) \cdot 0.16666666666666666}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+58}:\\
\;\;\;\;\frac{51.42857142857143 + \left(x \cdot x\right) \cdot 25.714285714285715}{\left(y \cdot y\right) \cdot \left(y \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-0.16666666666666666 \cdot \left(y \cdot y\right) + 1\right) \cdot \left(1 + x \cdot \left(x \cdot \left(0.5 + x \cdot \left(x \cdot 0.041666666666666664\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < 5e5Initial program 99.9%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around 0 0
Simplified0
if 5e5 < x < 3.29999999999999983e58Initial program 100.0%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in y around inf 0
Simplified0
if 3.29999999999999983e58 < x Initial program 100.0%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(*
(/
(+
1.0
(*
(* x x)
(+
0.5
(* (* x x) (+ 0.041666666666666664 (* x (* x 0.001388888888888889)))))))
y)
(* y (+ 1.0 (* (* y y) -0.16666666666666666)))))
double code(double x, double y) {
return ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((1.0d0 + ((x * x) * (0.5d0 + ((x * x) * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))) / y) * (y * (1.0d0 + ((y * y) * (-0.16666666666666666d0))))
end function
public static double code(double x, double y) {
return ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)));
}
def code(x, y): return ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666)))
function code(x, y) return Float64(Float64(Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(Float64(x * x) * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))) / y) * Float64(y * Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)))) end
function tmp = code(x, y) tmp = ((1.0 + ((x * x) * (0.5 + ((x * x) * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))) / y) * (y * (1.0 + ((y * y) * -0.16666666666666666))); end
code[x_, y_] := N[(N[(N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(N[(x * x), $MachinePrecision] * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * N[(y * N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 + \left(x \cdot x\right) \cdot \left(0.5 + \left(x \cdot x\right) \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)}{y} \cdot \left(y \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\right)
\end{array}
Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(*
(+ 1.0 (* (* y y) -0.16666666666666666))
(+
1.0
(*
(* x x)
(+
0.5
(* x (* x (+ 0.041666666666666664 (* x (* x 0.001388888888888889))))))))))
double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + ((x * x) * (0.5d0 + (x * (x * (0.041666666666666664d0 + (x * (x * 0.001388888888888889d0))))))))
end function
public static double code(double x, double y) {
return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))));
}
def code(x, y): return (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889))))))))
function code(x, y) return Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(Float64(x * x) * Float64(0.5 + Float64(x * Float64(x * Float64(0.041666666666666664 + Float64(x * Float64(x * 0.001388888888888889))))))))) end
function tmp = code(x, y) tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + ((x * x) * (0.5 + (x * (x * (0.041666666666666664 + (x * (x * 0.001388888888888889)))))))); end
code[x_, y_] := N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(x * x), $MachinePrecision] * N[(0.5 + N[(x * N[(x * N[(0.041666666666666664 + N[(x * N[(x * 0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + \left(x \cdot x\right) \cdot \left(0.5 + x \cdot \left(x \cdot \left(0.041666666666666664 + x \cdot \left(x \cdot 0.001388888888888889\right)\right)\right)\right)\right)
\end{array}
Initial program 99.9%
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= y 4.9e+96) (+ 1.0 (* x (* x (+ 0.5 (* (* 0.041666666666666664 x) x))))) (* (+ 1.0 (* (* y y) -0.16666666666666666)) (+ 1.0 (* 0.5 (* x x))))))
double code(double x, double y) {
double tmp;
if (y <= 4.9e+96) {
tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.9d+96) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((0.041666666666666664d0 * x) * x))))
else
tmp = (1.0d0 + ((y * y) * (-0.16666666666666666d0))) * (1.0d0 + (0.5d0 * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.9e+96) {
tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
} else {
tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.9e+96: tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x)))) else: tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.9e+96) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(0.041666666666666664 * x) * x))))); else tmp = Float64(Float64(1.0 + Float64(Float64(y * y) * -0.16666666666666666)) * Float64(1.0 + Float64(0.5 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.9e+96) tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x)))); else tmp = (1.0 + ((y * y) * -0.16666666666666666)) * (1.0 + (0.5 * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.9e+96], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(0.041666666666666664 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * y), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.9 \cdot 10^{+96}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(0.041666666666666664 \cdot x\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right) \cdot \left(1 + 0.5 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if y < 4.8999999999999996e96Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
if 4.8999999999999996e96 < y Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= y 4.9e+96) (+ 1.0 (* x (* x (+ 0.5 (* (* 0.041666666666666664 x) x))))) (/ -1.0 (- 0.0 (/ 1.0 (+ 1.0 (* x (* x 0.5))))))))
double code(double x, double y) {
double tmp;
if (y <= 4.9e+96) {
tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
} else {
tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * 0.5)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.9d+96) then
tmp = 1.0d0 + (x * (x * (0.5d0 + ((0.041666666666666664d0 * x) * x))))
else
tmp = (-1.0d0) / (0.0d0 - (1.0d0 / (1.0d0 + (x * (x * 0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.9e+96) {
tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
} else {
tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * 0.5)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.9e+96: tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x)))) else: tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * 0.5))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.9e+96) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(0.041666666666666664 * x) * x))))); else tmp = Float64(-1.0 / Float64(0.0 - Float64(1.0 / Float64(1.0 + Float64(x * Float64(x * 0.5)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.9e+96) tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x)))); else tmp = -1.0 / (0.0 - (1.0 / (1.0 + (x * (x * 0.5))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.9e+96], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(0.041666666666666664 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(0.0 - N[(1.0 / N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.9 \cdot 10^{+96}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + \left(0.041666666666666664 \cdot x\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{0 - \frac{1}{1 + x \cdot \left(x \cdot 0.5\right)}}\\
\end{array}
\end{array}
if y < 4.8999999999999996e96Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
if 4.8999999999999996e96 < y Initial program 99.8%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y) :precision binary64 (+ 1.0 (* x (* x (+ 0.5 (* (* 0.041666666666666664 x) x))))))
double code(double x, double y) {
return 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (x * (x * (0.5d0 + ((0.041666666666666664d0 * x) * x))))
end function
public static double code(double x, double y) {
return 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))));
}
def code(x, y): return 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x))))
function code(x, y) return Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(Float64(0.041666666666666664 * x) * x))))) end
function tmp = code(x, y) tmp = 1.0 + (x * (x * (0.5 + ((0.041666666666666664 * x) * x)))); end
code[x_, y_] := N[(1.0 + N[(x * N[(x * N[(0.5 + N[(N[(0.041666666666666664 * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + x \cdot \left(x \cdot \left(0.5 + \left(0.041666666666666664 \cdot x\right) \cdot x\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= x 0.00022) 1.0 (* x (* x 0.5))))
double code(double x, double y) {
double tmp;
if (x <= 0.00022) {
tmp = 1.0;
} else {
tmp = x * (x * 0.5);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.00022d0) then
tmp = 1.0d0
else
tmp = x * (x * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.00022) {
tmp = 1.0;
} else {
tmp = x * (x * 0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.00022: tmp = 1.0 else: tmp = x * (x * 0.5) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.00022) tmp = 1.0; else tmp = Float64(x * Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.00022) tmp = 1.0; else tmp = x * (x * 0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.00022], 1.0, N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00022:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < 2.20000000000000008e-4Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
if 2.20000000000000008e-4 < x Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.5 (* x x))))
double code(double x, double y) {
return 1.0 + (0.5 * (x * x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.5d0 * (x * x))
end function
public static double code(double x, double y) {
return 1.0 + (0.5 * (x * x));
}
def code(x, y): return 1.0 + (0.5 * (x * x))
function code(x, y) return Float64(1.0 + Float64(0.5 * Float64(x * x))) end
function tmp = code(x, y) tmp = 1.0 + (0.5 * (x * x)); end
code[x_, y_] := N[(1.0 + N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.5 \cdot \left(x \cdot x\right)
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
(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 99.9%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y) :precision binary64 (/ (* (cosh x) (sin y)) y))
double code(double x, double y) {
return (cosh(x) * sin(y)) / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (cosh(x) * sin(y)) / y
end function
public static double code(double x, double y) {
return (Math.cosh(x) * Math.sin(y)) / y;
}
def code(x, y): return (math.cosh(x) * math.sin(y)) / y
function code(x, y) return Float64(Float64(cosh(x) * sin(y)) / y) end
function tmp = code(x, y) tmp = (cosh(x) * sin(y)) / y; end
code[x_, y_] := N[(N[(N[Cosh[x], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cosh x \cdot \sin y}{y}
\end{array}
herbie shell --seed 2024110
(FPCore (x y)
:name "Linear.Quaternion:$csinh from linear-1.19.1.3"
:precision binary64
:alt
(/ (* (cosh x) (sin y)) y)
(* (cosh x) (/ (sin y) y)))