
(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 12 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
(if (<= y -1.7e+160)
(+ (/ z y) (- x (/ a (/ y x))))
(if (or (<= y -2.2e+43) (not (<= y 1.18e+20)))
(/
x
(+
(/ b (* y y))
(+ 1.0 (+ (/ c (pow y 3.0)) (+ (/ i (pow y 4.0)) (/ a y))))))
(/
(+ (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616)) t)
(+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.7e+160) {
tmp = (z / y) + (x - (a / (y / x)));
} else if ((y <= -2.2e+43) || !(y <= 1.18e+20)) {
tmp = x / ((b / (y * y)) + (1.0 + ((c / pow(y, 3.0)) + ((i / pow(y, 4.0)) + (a / y)))));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-1.7d+160)) then
tmp = (z / y) + (x - (a / (y / x)))
else if ((y <= (-2.2d+43)) .or. (.not. (y <= 1.18d+20))) then
tmp = x / ((b / (y * y)) + (1.0d0 + ((c / (y ** 3.0d0)) + ((i / (y ** 4.0d0)) + (a / y)))))
else
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -1.7e+160) {
tmp = (z / y) + (x - (a / (y / x)));
} else if ((y <= -2.2e+43) || !(y <= 1.18e+20)) {
tmp = x / ((b / (y * y)) + (1.0 + ((c / Math.pow(y, 3.0)) + ((i / Math.pow(y, 4.0)) + (a / y)))));
} else {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.7e+160: tmp = (z / y) + (x - (a / (y / x))) elif (y <= -2.2e+43) or not (y <= 1.18e+20): tmp = x / ((b / (y * y)) + (1.0 + ((c / math.pow(y, 3.0)) + ((i / math.pow(y, 4.0)) + (a / y))))) else: tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.7e+160) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); elseif ((y <= -2.2e+43) || !(y <= 1.18e+20)) tmp = Float64(x / Float64(Float64(b / Float64(y * y)) + Float64(1.0 + Float64(Float64(c / (y ^ 3.0)) + Float64(Float64(i / (y ^ 4.0)) + Float64(a / y)))))); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.7e+160) tmp = (z / y) + (x - (a / (y / x))); elseif ((y <= -2.2e+43) || ~((y <= 1.18e+20))) tmp = x / ((b / (y * y)) + (1.0 + ((c / (y ^ 3.0)) + ((i / (y ^ 4.0)) + (a / y))))); else tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.7e+160], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.2e+43], N[Not[LessEqual[y, 1.18e+20]], $MachinePrecision]], N[(x / N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(N[(c / N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(i / N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+160}:\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+43} \lor \neg \left(y \leq 1.18 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{x}{\frac{b}{y \cdot y} + \left(1 + \left(\frac{c}{{y}^{3}} + \left(\frac{i}{{y}^{4}} + \frac{a}{y}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -1.70000000000000015e160Initial program 0.0%
Taylor expanded in y around inf 90.7%
associate--l+90.7%
associate-/l*97.6%
Simplified97.6%
if -1.70000000000000015e160 < y < -2.20000000000000001e43 or 1.18e20 < y Initial program 5.5%
clear-num5.5%
inv-pow5.5%
Applied egg-rr5.5%
unpow-15.5%
fma-udef5.5%
*-commutative5.5%
fma-def5.5%
Simplified5.5%
Taylor expanded in i around 0 5.5%
Taylor expanded in x around inf 74.5%
unpow274.5%
Simplified74.5%
if -2.20000000000000001e43 < y < 1.18e20Initial program 96.8%
Final simplification89.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
t)
(+ 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 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (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 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (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 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (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(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / 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 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (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[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $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{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{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 90.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 75.9%
associate--l+75.9%
associate-/l*80.7%
Simplified80.7%
Final simplification86.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.4e+52) (not (<= y 1.7e+26)))
(+ (/ z y) (- x (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* z (* y y)))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.4e+52) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-2.4d+52)) .or. (.not. (y <= 1.7d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -2.4e+52) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.4e+52) or not (y <= 1.7e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.4e+52) || !(y <= 1.7e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.4e+52) || ~((y <= 1.7e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.4e+52], N[Not[LessEqual[y, 1.7e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+52} \lor \neg \left(y \leq 1.7 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -2.4e52 or 1.7000000000000001e26 < y Initial program 2.9%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*78.2%
Simplified78.2%
if -2.4e52 < y < 1.7000000000000001e26Initial program 94.1%
Taylor expanded in z around inf 88.3%
*-commutative88.3%
unpow288.3%
Simplified88.3%
Final simplification83.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.3e+38) (not (<= y 1.5e+26)))
(+ (/ z y) (- x (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+38) || !(y <= 1.5e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-2.3d+38)) .or. (.not. (y <= 1.5d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -2.3e+38) || !(y <= 1.5e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.3e+38) or not (y <= 1.5e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.3e+38) || !(y <= 1.5e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.3e+38) || ~((y <= 1.5e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.3e+38], N[Not[LessEqual[y, 1.5e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+38} \lor \neg \left(y \leq 1.5 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -2.3000000000000001e38 or 1.49999999999999999e26 < y Initial program 3.7%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*76.3%
Simplified76.3%
if -2.3000000000000001e38 < y < 1.49999999999999999e26Initial program 96.1%
Taylor expanded in y around 0 83.3%
*-commutative83.3%
Simplified83.3%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.2e+57) (not (<= y 1.7e+26)))
(+ (/ z y) (- x (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* z (* y y)))))
(+ i (* y (+ c (* (* y y) (+ y a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.2e+57) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + ((y * y) * (y + a)))));
}
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.2d+57)) .or. (.not. (y <= 1.7d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / (i + (y * (c + ((y * y) * (y + a)))))
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.2e+57) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + ((y * y) * (y + a)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.2e+57) or not (y <= 1.7e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + ((y * y) * (y + a))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.2e+57) || !(y <= 1.7e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(i + Float64(y * Float64(c + Float64(Float64(y * y) * Float64(y + a)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.2e+57) || ~((y <= 1.7e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * (c + ((y * y) * (y + a))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.2e+57], N[Not[LessEqual[y, 1.7e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(N[(y * y), $MachinePrecision] * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+57} \lor \neg \left(y \leq 1.7 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{i + y \cdot \left(c + \left(y \cdot y\right) \cdot \left(y + a\right)\right)}\\
\end{array}
\end{array}
if y < -3.20000000000000029e57 or 1.7000000000000001e26 < y Initial program 2.9%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*78.2%
Simplified78.2%
if -3.20000000000000029e57 < y < 1.7000000000000001e26Initial program 94.1%
Taylor expanded in z around inf 88.3%
*-commutative88.3%
unpow288.3%
Simplified88.3%
Taylor expanded in b around 0 81.6%
*-commutative81.6%
*-commutative81.6%
unpow281.6%
Simplified81.6%
Final simplification80.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.1e+39) (not (<= y 1.7e+26))) (+ (/ z y) (- x (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.1e+39) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-1.1d+39)) .or. (.not. (y <= 1.7d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -1.1e+39) || !(y <= 1.7e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.1e+39) or not (y <= 1.7e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.1e+39) || !(y <= 1.7e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.1e+39) || ~((y <= 1.7e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.1e+39], N[Not[LessEqual[y, 1.7e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+39} \lor \neg \left(y \leq 1.7 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -1.1000000000000001e39 or 1.7000000000000001e26 < y Initial program 3.7%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*76.3%
Simplified76.3%
if -1.1000000000000001e39 < y < 1.7000000000000001e26Initial program 96.1%
Taylor expanded in y around 0 82.6%
*-commutative82.6%
Simplified82.6%
Final simplification79.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.15e+38) (not (<= y 1.35e+26))) (+ (/ z y) (- x (/ a (/ y x)))) (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+38) || !(y <= 1.35e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
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 <= (-1.15d+38)) .or. (.not. (y <= 1.35d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 <= -1.15e+38) || !(y <= 1.35e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.15e+38) or not (y <= 1.35e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.15e+38) || !(y <= 1.35e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.15e+38) || ~((y <= 1.35e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.15e+38], N[Not[LessEqual[y, 1.35e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+38} \lor \neg \left(y \leq 1.35 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -1.1500000000000001e38 or 1.35e26 < y Initial program 3.7%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*76.3%
Simplified76.3%
if -1.1500000000000001e38 < y < 1.35e26Initial program 96.1%
Taylor expanded in t around inf 72.6%
Final simplification74.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.42e+51) (not (<= y 1.35e+26))) (+ (/ z y) (- x (/ a (/ y x)))) (/ (+ t (* y (+ 230661.510616 (* z (* y y))))) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.42e+51) || !(y <= 1.35e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c));
}
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 <= (-1.42d+51)) .or. (.not. (y <= 1.35d+26))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / (i + (y * c))
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 <= -1.42e+51) || !(y <= 1.35e+26)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.42e+51) or not (y <= 1.35e+26): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.42e+51) || !(y <= 1.35e+26)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.42e+51) || ~((y <= 1.35e+26))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (z * (y * y))))) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.42e+51], N[Not[LessEqual[y, 1.35e+26]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{+51} \lor \neg \left(y \leq 1.35 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.41999999999999998e51 or 1.35e26 < y Initial program 2.9%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*78.2%
Simplified78.2%
if -1.41999999999999998e51 < y < 1.35e26Initial program 94.1%
Taylor expanded in z around inf 88.3%
*-commutative88.3%
unpow288.3%
Simplified88.3%
Taylor expanded in y around 0 78.3%
Final simplification78.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -8.5e+37) (not (<= y 0.11))) (+ (/ z y) (- x (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -8.5e+37) || !(y <= 0.11)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / 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 <= (-8.5d+37)) .or. (.not. (y <= 0.11d0))) then
tmp = (z / y) + (x - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / 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 <= -8.5e+37) || !(y <= 0.11)) {
tmp = (z / y) + (x - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -8.5e+37) or not (y <= 0.11): tmp = (z / y) + (x - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -8.5e+37) || !(y <= 0.11)) tmp = Float64(Float64(z / y) + Float64(x - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -8.5e+37) || ~((y <= 0.11))) tmp = (z / y) + (x - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -8.5e+37], N[Not[LessEqual[y, 0.11]], $MachinePrecision]], N[(N[(z / y), $MachinePrecision] + N[(x - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+37} \lor \neg \left(y \leq 0.11\right):\\
\;\;\;\;\frac{z}{y} + \left(x - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -8.4999999999999999e37 or 0.110000000000000001 < y Initial program 7.3%
Taylor expanded in y around inf 68.5%
associate--l+68.5%
associate-/l*72.5%
Simplified72.5%
if -8.4999999999999999e37 < y < 0.110000000000000001Initial program 98.2%
Taylor expanded in y around 0 47.6%
Taylor expanded in i around inf 58.6%
Final simplification65.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.65e+43) x (if (<= y 0.0285) (/ (+ t (* y 230661.510616)) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.65e+43) {
tmp = x;
} else if (y <= 0.0285) {
tmp = (t + (y * 230661.510616)) / 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 <= (-1.65d+43)) then
tmp = x
else if (y <= 0.0285d0) then
tmp = (t + (y * 230661.510616d0)) / 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 <= -1.65e+43) {
tmp = x;
} else if (y <= 0.0285) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.65e+43: tmp = x elif y <= 0.0285: tmp = (t + (y * 230661.510616)) / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.65e+43) tmp = x; elseif (y <= 0.0285) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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 <= -1.65e+43) tmp = x; elseif (y <= 0.0285) tmp = (t + (y * 230661.510616)) / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.65e+43], x, If[LessEqual[y, 0.0285], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.0285:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.6500000000000001e43 or 0.028500000000000001 < y Initial program 6.6%
Taylor expanded in y around inf 59.0%
if -1.6500000000000001e43 < y < 0.028500000000000001Initial program 97.5%
Taylor expanded in y around 0 46.9%
Taylor expanded in i around inf 57.8%
Final simplification58.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.45e+40) x (if (<= y 0.0026) (/ 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 <= -1.45e+40) {
tmp = x;
} else if (y <= 0.0026) {
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 <= (-1.45d+40)) then
tmp = x
else if (y <= 0.0026d0) 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 <= -1.45e+40) {
tmp = x;
} else if (y <= 0.0026) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.45e+40: tmp = x elif y <= 0.0026: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.45e+40) tmp = x; elseif (y <= 0.0026) 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 <= -1.45e+40) tmp = x; elseif (y <= 0.0026) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.45e+40], x, If[LessEqual[y, 0.0026], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.0026:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.45000000000000009e40 or 0.0025999999999999999 < y Initial program 7.4%
Taylor expanded in y around inf 58.6%
if -1.45000000000000009e40 < y < 0.0025999999999999999Initial program 97.5%
Taylor expanded in y around 0 54.9%
Final simplification56.8%
(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 52.1%
Taylor expanded in y around inf 31.4%
Final simplification31.4%
herbie shell --seed 2023257
(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)))