
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 INFINITY) t_1 (+ (/ z y) (- x (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (z / y) + (x - (a / (y / x)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (z / y) + (x - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (z / y) + (x - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (z / y) + (x - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 63.5%
+-commutative63.5%
associate--l+63.5%
associate-/l*69.3%
Simplified69.3%
Final simplification83.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a)))))))
(if (<= y -8.4e+86)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y -6.9e-25)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_1)
(if (<= y -1.6e-54)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 2.95e+66)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
(+ i (* y (+ c (* y b)))))
(+ x (/ z y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -8.4e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= -1.6e-54) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.95e+66) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * b))));
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
if (y <= (-8.4d+86)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= (-6.9d-25)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_1
else if (y <= (-1.6d-54)) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 2.95d+66) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * b))))
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -8.4e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= -1.6e-54) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.95e+66) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * b))));
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) tmp = 0 if y <= -8.4e+86: tmp = (z / y) + (x - (a / (y / x))) elif y <= -6.9e-25: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1 elif y <= -1.6e-54: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 2.95e+66: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * b)))) else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) tmp = 0.0 if (y <= -8.4e+86) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= -6.9e-25) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_1); elseif (y <= -1.6e-54) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 2.95e+66) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); tmp = 0.0; if (y <= -8.4e+86) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= -6.9e-25) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1; elseif (y <= -1.6e-54) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 2.95e+66) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (i + (y * (c + (y * b)))); else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.4e+86], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.9e-25], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -1.6e-54], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+66], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
\mathbf{if}\;y \leq -8.4 \cdot 10^{+86}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -6.9 \cdot 10^{-25}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t_1}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-54}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t_1}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+66}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -8.3999999999999996e86Initial program 2.6%
Taylor expanded in y around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-/l*74.4%
Simplified74.4%
if -8.3999999999999996e86 < y < -6.89999999999999975e-25Initial program 53.3%
Taylor expanded in i around 0 52.8%
Taylor expanded in x around 0 42.9%
Taylor expanded in t around 0 57.3%
if -6.89999999999999975e-25 < y < -1.59999999999999999e-54Initial program 99.3%
Taylor expanded in y around 0 90.4%
*-commutative90.4%
Simplified90.4%
if -1.59999999999999999e-54 < y < 2.94999999999999994e66Initial program 94.1%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
Simplified91.2%
if 2.94999999999999994e66 < y Initial program 2.5%
Taylor expanded in y around inf 64.0%
+-commutative64.0%
associate--l+64.0%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in a around 0 70.6%
Final simplification82.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a)))))))
(if (<= y -2.4e+87)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y -6.9e-25)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_1)
(if (<= y 9.2e-46)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 1.56e+41)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
(* y (+ c (* y b))))
(if (<= y 3.2e+113) (+ x (/ z y)) (/ x (+ 1.0 (/ a y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -2.4e+87) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 9.2e-46) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 1.56e+41) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (y * (c + (y * b)));
} else if (y <= 3.2e+113) {
tmp = x + (z / y);
} else {
tmp = x / (1.0 + (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
if (y <= (-2.4d+87)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= (-6.9d-25)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_1
else if (y <= 9.2d-46) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 1.56d+41) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / (y * (c + (y * b)))
else if (y <= 3.2d+113) then
tmp = x + (z / y)
else
tmp = x / (1.0d0 + (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -2.4e+87) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 9.2e-46) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 1.56e+41) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (y * (c + (y * b)));
} else if (y <= 3.2e+113) {
tmp = x + (z / y);
} else {
tmp = x / (1.0 + (a / y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) tmp = 0 if y <= -2.4e+87: tmp = (z / y) + (x - (a / (y / x))) elif y <= -6.9e-25: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1 elif y <= 9.2e-46: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 1.56e+41: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (y * (c + (y * b))) elif y <= 3.2e+113: tmp = x + (z / y) else: tmp = x / (1.0 + (a / y)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) tmp = 0.0 if (y <= -2.4e+87) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= -6.9e-25) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_1); elseif (y <= 9.2e-46) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 1.56e+41) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / Float64(y * Float64(c + Float64(y * b)))); elseif (y <= 3.2e+113) tmp = Float64(x + Float64(z / y)); else tmp = Float64(x / Float64(1.0 + Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); tmp = 0.0; if (y <= -2.4e+87) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= -6.9e-25) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1; elseif (y <= 9.2e-46) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 1.56e+41) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / (y * (c + (y * b))); elseif (y <= 3.2e+113) tmp = x + (z / y); else tmp = x / (1.0 + (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+87], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.9e-25], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 9.2e-46], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.56e+41], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+113], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+87}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -6.9 \cdot 10^{-25}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t_1}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t_1}\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{+41}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+113}:\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\end{array}
\end{array}
if y < -2.39999999999999981e87Initial program 2.6%
Taylor expanded in y around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-/l*74.4%
Simplified74.4%
if -2.39999999999999981e87 < y < -6.89999999999999975e-25Initial program 53.3%
Taylor expanded in i around 0 52.8%
Taylor expanded in x around 0 42.9%
Taylor expanded in t around 0 57.3%
if -6.89999999999999975e-25 < y < 9.1999999999999997e-46Initial program 99.7%
Taylor expanded in y around 0 95.2%
*-commutative95.2%
Simplified95.2%
if 9.1999999999999997e-46 < y < 1.56e41Initial program 78.6%
Taylor expanded in i around 0 51.8%
Taylor expanded in y around 0 44.5%
*-commutative44.5%
Simplified44.5%
if 1.56e41 < y < 3.1999999999999998e113Initial program 21.0%
Taylor expanded in y around inf 21.7%
+-commutative21.7%
associate--l+21.7%
associate-/l*28.0%
Simplified28.0%
Taylor expanded in a around 0 28.2%
if 3.1999999999999998e113 < y Initial program 2.8%
Taylor expanded in i around 0 2.8%
Taylor expanded in x around inf 0.0%
associate-/l*0.0%
+-commutative0.0%
fma-udef0.0%
+-commutative0.0%
+-commutative0.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in y around inf 83.9%
Final simplification80.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a)))))))
(if (<= y -7.8e+86)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y -5.4e-33)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_1)
(if (<= y 6.5e-63)
(/ t (+ i (* y t_1)))
(if (<= y 4.2e+50)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
i)
(+ x (/ z y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -7.8e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -5.4e-33) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 6.5e-63) {
tmp = t / (i + (y * t_1));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
if (y <= (-7.8d+86)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= (-5.4d-33)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_1
else if (y <= 6.5d-63) then
tmp = t / (i + (y * t_1))
else if (y <= 4.2d+50) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / i
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -7.8e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -5.4e-33) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 6.5e-63) {
tmp = t / (i + (y * t_1));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) tmp = 0 if y <= -7.8e+86: tmp = (z / y) + (x - (a / (y / x))) elif y <= -5.4e-33: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1 elif y <= 6.5e-63: tmp = t / (i + (y * t_1)) elif y <= 4.2e+50: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) tmp = 0.0 if (y <= -7.8e+86) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= -5.4e-33) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_1); elseif (y <= 6.5e-63) tmp = Float64(t / Float64(i + Float64(y * t_1))); elseif (y <= 4.2e+50) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / i); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); tmp = 0.0; if (y <= -7.8e+86) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= -5.4e-33) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1; elseif (y <= 6.5e-63) tmp = t / (i + (y * t_1)); elseif (y <= 4.2e+50) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i; else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+86], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.4e-33], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 6.5e-63], N[(t / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+50], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+86}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-33}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t_1}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{i + y \cdot t_1}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -7.8000000000000004e86Initial program 2.6%
Taylor expanded in y around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-/l*74.4%
Simplified74.4%
if -7.8000000000000004e86 < y < -5.4000000000000002e-33Initial program 59.6%
Taylor expanded in i around 0 54.8%
Taylor expanded in x around 0 42.2%
Taylor expanded in t around 0 54.5%
if -5.4000000000000002e-33 < y < 6.4999999999999998e-63Initial program 99.7%
Taylor expanded in t around inf 80.8%
if 6.4999999999999998e-63 < y < 4.1999999999999999e50Initial program 74.0%
Taylor expanded in i around inf 38.5%
if 4.1999999999999999e50 < y Initial program 4.8%
Taylor expanded in y around inf 58.8%
+-commutative58.8%
associate--l+58.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in a around 0 66.9%
Final simplification71.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a)))))))
(if (<= y -7.8e+86)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y -6.9e-25)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_1)
(if (<= y 5e-56)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 4.2e+50)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
i)
(+ x (/ z y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -7.8e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 5e-56) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
if (y <= (-7.8d+86)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= (-6.9d-25)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_1
else if (y <= 5d-56) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 4.2d+50) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / i
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double tmp;
if (y <= -7.8e+86) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= -6.9e-25) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1;
} else if (y <= 5e-56) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) tmp = 0 if y <= -7.8e+86: tmp = (z / y) + (x - (a / (y / x))) elif y <= -6.9e-25: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1 elif y <= 5e-56: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 4.2e+50: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) tmp = 0.0 if (y <= -7.8e+86) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= -6.9e-25) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_1); elseif (y <= 5e-56) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 4.2e+50) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / i); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); tmp = 0.0; if (y <= -7.8e+86) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= -6.9e-25) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_1; elseif (y <= 5e-56) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 4.2e+50) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i; else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+86], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.9e-25], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 5e-56], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+50], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+86}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -6.9 \cdot 10^{-25}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t_1}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-56}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t_1}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -7.8000000000000004e86Initial program 2.6%
Taylor expanded in y around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-/l*74.4%
Simplified74.4%
if -7.8000000000000004e86 < y < -6.89999999999999975e-25Initial program 53.3%
Taylor expanded in i around 0 52.8%
Taylor expanded in x around 0 42.9%
Taylor expanded in t around 0 57.3%
if -6.89999999999999975e-25 < y < 4.99999999999999997e-56Initial program 99.7%
Taylor expanded in y around 0 95.9%
*-commutative95.9%
Simplified95.9%
if 4.99999999999999997e-56 < y < 4.1999999999999999e50Initial program 74.0%
Taylor expanded in i around inf 38.5%
if 4.1999999999999999e50 < y Initial program 4.8%
Taylor expanded in y around inf 58.8%
+-commutative58.8%
associate--l+58.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in a around 0 66.9%
Final simplification79.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -5.4e+30)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y 2.6e+52)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.4e+30) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 2.6e+52) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-5.4d+30)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= 2.6d+52) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.4e+30) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 2.6e+52) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.4e+30: tmp = (z / y) + (x - (a / (y / x))) elif y <= 2.6e+52: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.4e+30) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= 2.6e+52) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -5.4e+30) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= 2.6e+52) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.4e+30], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+52], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+30}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+52}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -5.3999999999999997e30Initial program 7.7%
Taylor expanded in y around inf 62.5%
+-commutative62.5%
associate--l+62.5%
associate-/l*67.0%
Simplified67.0%
if -5.3999999999999997e30 < y < 2.6e52Initial program 95.2%
Taylor expanded in x around 0 89.7%
if 2.6e52 < y Initial program 4.8%
Taylor expanded in y around inf 58.8%
+-commutative58.8%
associate--l+58.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in a around 0 66.9%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -3.8e+22)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y 9e-58)
(/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 4.2e+50)
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
i)
(+ x (/ z y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.8e+22) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 9e-58) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-3.8d+22)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= 9d-58) then
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 4.2d+50) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / i
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.8e+22) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 9e-58) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 4.2e+50) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.8e+22: tmp = (z / y) + (x - (a / (y / x))) elif y <= 9e-58: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 4.2e+50: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.8e+22) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= 9e-58) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); elseif (y <= 4.2e+50) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / i); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3.8e+22) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= 9e-58) tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 4.2e+50) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i; else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.8e+22], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-58], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+50], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+22}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -3.8000000000000004e22Initial program 10.7%
Taylor expanded in y around inf 59.0%
+-commutative59.0%
associate--l+59.0%
associate-/l*63.2%
Simplified63.2%
if -3.8000000000000004e22 < y < 9.0000000000000006e-58Initial program 99.6%
Taylor expanded in t around inf 76.8%
if 9.0000000000000006e-58 < y < 4.1999999999999999e50Initial program 74.0%
Taylor expanded in i around inf 38.5%
if 4.1999999999999999e50 < y Initial program 4.8%
Taylor expanded in y around inf 58.8%
+-commutative58.8%
associate--l+58.8%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in a around 0 66.9%
Final simplification68.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2700000000.0)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y 5.8e-129)
(/ t i)
(if (<= y 7.5e+28)
(/ t (* y (+ c (* y (+ b (* y (+ y a)))))))
(+ x (/ z y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2700000000.0) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 5.8e-129) {
tmp = t / i;
} else if (y <= 7.5e+28) {
tmp = t / (y * (c + (y * (b + (y * (y + a))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2700000000.0d0)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= 5.8d-129) then
tmp = t / i
else if (y <= 7.5d+28) then
tmp = t / (y * (c + (y * (b + (y * (y + a))))))
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2700000000.0) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 5.8e-129) {
tmp = t / i;
} else if (y <= 7.5e+28) {
tmp = t / (y * (c + (y * (b + (y * (y + a))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2700000000.0: tmp = (z / y) + (x - (a / (y / x))) elif y <= 5.8e-129: tmp = t / i elif y <= 7.5e+28: tmp = t / (y * (c + (y * (b + (y * (y + a)))))) else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2700000000.0) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= 5.8e-129) tmp = Float64(t / i); elseif (y <= 7.5e+28) tmp = Float64(t / Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2700000000.0) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= 5.8e-129) tmp = t / i; elseif (y <= 7.5e+28) tmp = t / (y * (c + (y * (b + (y * (y + a)))))); else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2700000000.0], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-129], N[(t / i), $MachinePrecision], If[LessEqual[y, 7.5e+28], N[(t / N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2700000000:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -2.7e9Initial program 10.7%
Taylor expanded in y around inf 59.0%
+-commutative59.0%
associate--l+59.0%
associate-/l*63.2%
Simplified63.2%
if -2.7e9 < y < 5.80000000000000034e-129Initial program 99.6%
Taylor expanded in y around 0 58.2%
if 5.80000000000000034e-129 < y < 7.4999999999999998e28Initial program 92.7%
Taylor expanded in i around 0 62.3%
Taylor expanded in x around 0 55.9%
Taylor expanded in t around inf 36.0%
if 7.4999999999999998e28 < y Initial program 11.5%
Taylor expanded in y around inf 53.4%
+-commutative53.4%
associate--l+53.4%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in a around 0 60.6%
Final simplification57.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8.8e+21)
(+ (/ z y) (- x (/ a (/ y x))))
(if (<= y 2.95e+66)
(/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8.8e+21) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 2.95e+66) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-8.8d+21)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= 2.95d+66) then
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8.8e+21) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 2.95e+66) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8.8e+21: tmp = (z / y) + (x - (a / (y / x))) elif y <= 2.95e+66: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8.8e+21) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= 2.95e+66) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8.8e+21) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= 2.95e+66) tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8.8e+21], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+66], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+66}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -8.8e21Initial program 10.7%
Taylor expanded in y around inf 59.0%
+-commutative59.0%
associate--l+59.0%
associate-/l*63.2%
Simplified63.2%
if -8.8e21 < y < 2.94999999999999994e66Initial program 94.6%
Taylor expanded in t around inf 67.9%
if 2.94999999999999994e66 < y Initial program 2.5%
Taylor expanded in y around inf 64.0%
+-commutative64.0%
associate--l+64.0%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in a around 0 70.6%
Final simplification67.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -8e+21) (+ (/ z y) (- x (/ a (/ y x)))) (if (<= y 4.4e+29) (/ t i) (+ x (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+21) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 4.4e+29) {
tmp = t / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-8d+21)) then
tmp = (z / y) + (x - (a / (y / x)))
else if (y <= 4.4d+29) then
tmp = t / i
else
tmp = x + (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+21) {
tmp = (z / y) + (x - (a / (y / x)));
} else if (y <= 4.4e+29) {
tmp = t / i;
} else {
tmp = x + (z / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8e+21: tmp = (z / y) + (x - (a / (y / x))) elif y <= 4.4e+29: tmp = t / i else: tmp = x + (z / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8e+21) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif (y <= 4.4e+29) tmp = Float64(t / i); else tmp = Float64(x + Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8e+21) tmp = (z / y) + (x - (a / (y / x))); elseif (y <= 4.4e+29) tmp = t / i; else tmp = x + (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8e+21], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+29], N[(t / i), $MachinePrecision], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+21}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+29}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{y}\\
\end{array}
\end{array}
if y < -8e21Initial program 10.7%
Taylor expanded in y around inf 59.0%
+-commutative59.0%
associate--l+59.0%
associate-/l*63.2%
Simplified63.2%
if -8e21 < y < 4.4000000000000003e29Initial program 97.6%
Taylor expanded in y around 0 48.8%
if 4.4000000000000003e29 < y Initial program 11.7%
Taylor expanded in y around inf 54.4%
+-commutative54.4%
associate--l+54.4%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in a around 0 61.6%
Final simplification54.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -0.22) (not (<= y 1.18e+30))) (+ x (/ z y)) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -0.22) || !(y <= 1.18e+30)) {
tmp = x + (z / y);
} else {
tmp = t / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-0.22d0)) .or. (.not. (y <= 1.18d+30))) then
tmp = x + (z / y)
else
tmp = t / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -0.22) || !(y <= 1.18e+30)) {
tmp = x + (z / y);
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -0.22) or not (y <= 1.18e+30): tmp = x + (z / y) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -0.22) || !(y <= 1.18e+30)) tmp = Float64(x + Float64(z / y)); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -0.22) || ~((y <= 1.18e+30))) tmp = x + (z / y); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -0.22], N[Not[LessEqual[y, 1.18e+30]], $MachinePrecision]], N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.22 \lor \neg \left(y \leq 1.18 \cdot 10^{+30}\right):\\
\;\;\;\;x + \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -0.220000000000000001 or 1.18e30 < y Initial program 11.9%
Taylor expanded in y around inf 56.3%
+-commutative56.3%
associate--l+56.3%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in a around 0 61.7%
if -0.220000000000000001 < y < 1.18e30Initial program 97.6%
Taylor expanded in y around 0 49.1%
Final simplification54.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1850.0) x (if (<= y 4.5e+50) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1850.0) {
tmp = x;
} else if (y <= 4.5e+50) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1850.0d0)) then
tmp = x
else if (y <= 4.5d+50) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1850.0) {
tmp = x;
} else if (y <= 4.5e+50) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1850.0: tmp = x elif y <= 4.5e+50: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1850.0) tmp = x; elseif (y <= 4.5e+50) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1850.0) tmp = x; elseif (y <= 4.5e+50) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1850.0], x, If[LessEqual[y, 4.5e+50], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1850:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1850 or 4.50000000000000014e50 < y Initial program 8.9%
Taylor expanded in y around inf 44.1%
if -1850 < y < 4.50000000000000014e50Initial program 96.3%
Taylor expanded in y around 0 47.9%
Final simplification46.3%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 59.1%
Taylor expanded in y around inf 20.7%
Final simplification20.7%
herbie shell --seed 2024018
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))