
(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
(let* ((t_1 (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(t_2 (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
(if (<= (/ (+ t (* y t_2)) t_1) INFINITY)
(* t (+ (/ 1.0 t_1) (* (/ y t) (/ t_2 t_1))))
(+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double tmp;
if (((t + (y * t_2)) / t_1) <= ((double) INFINITY)) {
tmp = t * ((1.0 / t_1) + ((y / t) * (t_2 / t_1)));
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
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 = i + (y * (c + (y * (b + (y * (y + a))))));
double t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double tmp;
if (((t + (y * t_2)) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = t * ((1.0 / t_1) + ((y / t) * (t_2 / t_1)));
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * (c + (y * (b + (y * (y + a)))))) t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))) tmp = 0 if ((t + (y * t_2)) / t_1) <= math.inf: tmp = t * ((1.0 / t_1) + ((y / t) * (t_2 / t_1))) else: tmp = x + ((z / y) - (a * (x / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))) t_2 = Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) tmp = 0.0 if (Float64(Float64(t + Float64(y * t_2)) / t_1) <= Inf) tmp = Float64(t * Float64(Float64(1.0 / t_1) + Float64(Float64(y / t) * Float64(t_2 / t_1)))); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * (c + (y * (b + (y * (y + a)))))); t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))); tmp = 0.0; if (((t + (y * t_2)) / t_1) <= Inf) tmp = t * ((1.0 / t_1) + ((y / t) * (t_2 / t_1))); else tmp = x + ((z / y) - (a * (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(t * N[(N[(1.0 / t$95$1), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
t_2 := 230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\\
\mathbf{if}\;\frac{t + y \cdot t\_2}{t\_1} \leq \infty:\\
\;\;\;\;t \cdot \left(\frac{1}{t\_1} + \frac{y}{t} \cdot \frac{t\_2}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.2%
Taylor expanded in t around inf 83.9%
Simplified91.5%
Taylor expanded in t around inf 83.9%
times-frac91.6%
Simplified91.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) 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 71.6%
associate--l+71.6%
associate-/l*73.6%
Simplified73.6%
Final simplification85.3%
(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 (+ x (- (/ z y) (* a (/ x y)))))))
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 = x + ((z / y) - (a * (x / y)));
}
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 = x + ((z / y) - (a * (x / y)));
}
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 = x + ((z / y) - (a * (x / y))) 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(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); 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 = x + ((z / y) - (a * (x / y))); 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $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}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) 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 71.6%
associate--l+71.6%
associate-/l*73.6%
Simplified73.6%
Final simplification85.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -4.7e+17)
t_2
(if (<= y -4.5e-165)
t_1
(if (<= y 1.25e-227)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)
(if (<= y 3.85e-31)
t_1
(if (<= y 9.5e+42)
(/
(+
t
(*
y
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))))
i)
t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.7e+17) {
tmp = t_2;
} else if (y <= -4.5e-165) {
tmp = t_1;
} else if (y <= 1.25e-227) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else if (y <= 3.85e-31) {
tmp = t_1;
} else if (y <= 9.5e+42) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-4.7d+17)) then
tmp = t_2
else if (y <= (-4.5d-165)) then
tmp = t_1
else if (y <= 1.25d-227) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / i
else if (y <= 3.85d-31) then
tmp = t_1
else if (y <= 9.5d+42) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))))) / i
else
tmp = t_2
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 = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.7e+17) {
tmp = t_2;
} else if (y <= -4.5e-165) {
tmp = t_1;
} else if (y <= 1.25e-227) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else if (y <= 3.85e-31) {
tmp = t_1;
} else if (y <= 9.5e+42) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * (c + (y * (b + (y * (y + a))))))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -4.7e+17: tmp = t_2 elif y <= -4.5e-165: tmp = t_1 elif y <= 1.25e-227: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i elif y <= 3.85e-31: tmp = t_1 elif y <= 9.5e+42: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -4.7e+17) tmp = t_2; elseif (y <= -4.5e-165) tmp = t_1; elseif (y <= 1.25e-227) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / i); elseif (y <= 3.85e-31) tmp = t_1; elseif (y <= 9.5e+42) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))))) / i); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * (c + (y * (b + (y * (y + a))))))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -4.7e+17) tmp = t_2; elseif (y <= -4.5e-165) tmp = t_1; elseif (y <= 1.25e-227) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; elseif (y <= 3.85e-31) tmp = t_1; elseif (y <= 9.5e+42) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))))) / i; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+17], t$95$2, If[LessEqual[y, -4.5e-165], t$95$1, If[LessEqual[y, 1.25e-227], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 3.85e-31], t$95$1, If[LessEqual[y, 9.5e+42], 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], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-227}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
\mathbf{elif}\;y \leq 3.85 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+42}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.7e17 or 9.50000000000000019e42 < y Initial program 5.4%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*68.3%
Simplified68.3%
if -4.7e17 < y < -4.49999999999999992e-165 or 1.2499999999999999e-227 < y < 3.85000000000000006e-31Initial program 98.5%
Taylor expanded in t around inf 75.7%
if -4.49999999999999992e-165 < y < 1.2499999999999999e-227Initial program 99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in i around inf 91.2%
if 3.85000000000000006e-31 < y < 9.50000000000000019e42Initial program 92.7%
Taylor expanded in i around inf 50.4%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i))
(t_2 (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -4.6e+18)
t_3
(if (<= y -2.35e-163)
t_2
(if (<= y 3.3e-227)
t_1
(if (<= y 1.2e-30) t_2 (if (<= y 8.2e+42) t_1 t_3)))))))
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 * z)))))) / i;
double t_2 = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.6e+18) {
tmp = t_3;
} else if (y <= -2.35e-163) {
tmp = t_2;
} else if (y <= 3.3e-227) {
tmp = t_1;
} else if (y <= 1.2e-30) {
tmp = t_2;
} else if (y <= 8.2e+42) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / i
t_2 = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-4.6d+18)) then
tmp = t_3
else if (y <= (-2.35d-163)) then
tmp = t_2
else if (y <= 3.3d-227) then
tmp = t_1
else if (y <= 1.2d-30) then
tmp = t_2
else if (y <= 8.2d+42) then
tmp = t_1
else
tmp = t_3
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 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
double t_2 = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.6e+18) {
tmp = t_3;
} else if (y <= -2.35e-163) {
tmp = t_2;
} else if (y <= 3.3e-227) {
tmp = t_1;
} else if (y <= 1.2e-30) {
tmp = t_2;
} else if (y <= 8.2e+42) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i t_2 = t / (i + (y * (c + (y * (b + (y * (y + a))))))) t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -4.6e+18: tmp = t_3 elif y <= -2.35e-163: tmp = t_2 elif y <= 3.3e-227: tmp = t_1 elif y <= 1.2e-30: tmp = t_2 elif y <= 8.2e+42: tmp = t_1 else: tmp = t_3 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 * z)))))) / i) t_2 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -4.6e+18) tmp = t_3; elseif (y <= -2.35e-163) tmp = t_2; elseif (y <= 3.3e-227) tmp = t_1; elseif (y <= 1.2e-30) tmp = t_2; elseif (y <= 8.2e+42) tmp = t_1; else tmp = t_3; 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 * z)))))) / i; t_2 = t / (i + (y * (c + (y * (b + (y * (y + a))))))); t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -4.6e+18) tmp = t_3; elseif (y <= -2.35e-163) tmp = t_2; elseif (y <= 3.3e-227) tmp = t_1; elseif (y <= 1.2e-30) tmp = t_2; elseif (y <= 8.2e+42) tmp = t_1; else tmp = t_3; 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 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+18], t$95$3, If[LessEqual[y, -2.35e-163], t$95$2, If[LessEqual[y, 3.3e-227], t$95$1, If[LessEqual[y, 1.2e-30], t$95$2, If[LessEqual[y, 8.2e+42], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
t_2 := \frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -4.6e18 or 8.2000000000000001e42 < y Initial program 5.4%
Taylor expanded in y around inf 66.6%
associate--l+66.6%
associate-/l*68.3%
Simplified68.3%
if -4.6e18 < y < -2.35e-163 or 3.2999999999999999e-227 < y < 1.19999999999999992e-30Initial program 98.5%
Taylor expanded in t around inf 75.7%
if -2.35e-163 < y < 3.2999999999999999e-227 or 1.19999999999999992e-30 < y < 8.2000000000000001e42Initial program 98.1%
Taylor expanded in x around 0 91.9%
Taylor expanded in i around inf 80.8%
Final simplification73.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.75e+67) (not (<= y 1.95e+58)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ 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.75e+67) || !(y <= 1.95e+58)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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.75d+67)) .or. (.not. (y <= 1.95d+58))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (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.75e+67) || !(y <= 1.95e+58)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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.75e+67) or not (y <= 1.95e+58): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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.75e+67) || !(y <= 1.95e+58)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else 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)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.75e+67) || ~((y <= 1.95e+58))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (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.75e+67], N[Not[LessEqual[y, 1.95e+58]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+67} \lor \neg \left(y \leq 1.95 \cdot 10^{+58}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if y < -1.75e67 or 1.95000000000000005e58 < y Initial program 2.5%
Taylor expanded in y around inf 70.7%
associate--l+70.7%
associate-/l*72.5%
Simplified72.5%
if -1.75e67 < y < 1.95000000000000005e58Initial program 95.4%
Taylor expanded in x around 0 89.5%
Final simplification82.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.75e+67) (not (<= y 1.7e+58)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.75e+67) || !(y <= 1.7e+58)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
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.75d+67)) .or. (.not. (y <= 1.7d+58))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
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.75e+67) || !(y <= 1.7e+58)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.75e+67) or not (y <= 1.7e+58): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.75e+67) || !(y <= 1.7e+58)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else 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 * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.75e+67) || ~((y <= 1.7e+58))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.75e+67], N[Not[LessEqual[y, 1.7e+58]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+67} \lor \neg \left(y \leq 1.7 \cdot 10^{+58}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.75e67 or 1.7e58 < y Initial program 2.5%
Taylor expanded in y around inf 70.7%
associate--l+70.7%
associate-/l*72.5%
Simplified72.5%
if -1.75e67 < y < 1.7e58Initial program 95.4%
Taylor expanded in x around 0 89.5%
Taylor expanded in y around 0 86.2%
Final simplification80.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.1e+14) (not (<= y 5e+28))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ 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 <= -2.1e+14) || !(y <= 5e+28)) {
tmp = x + ((z / y) - (a * (x / y)));
} 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 <= (-2.1d+14)) .or. (.not. (y <= 5d+28))) then
tmp = x + ((z / y) - (a * (x / y)))
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 <= -2.1e+14) || !(y <= 5e+28)) {
tmp = x + ((z / y) - (a * (x / y)));
} 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 <= -2.1e+14) or not (y <= 5e+28): tmp = x + ((z / y) - (a * (x / y))) 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 <= -2.1e+14) || !(y <= 5e+28)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); 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 <= -2.1e+14) || ~((y <= 5e+28))) tmp = x + ((z / y) - (a * (x / y))); 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, -2.1e+14], N[Not[LessEqual[y, 5e+28]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $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 -2.1 \cdot 10^{+14} \lor \neg \left(y \leq 5 \cdot 10^{+28}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\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 < -2.1e14 or 4.99999999999999957e28 < y Initial program 6.2%
Taylor expanded in y around inf 65.5%
associate--l+65.5%
associate-/l*67.2%
Simplified67.2%
if -2.1e14 < y < 4.99999999999999957e28Initial program 99.0%
Taylor expanded in y around 0 88.5%
*-commutative88.5%
Simplified88.5%
Final simplification79.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.2e-27) (not (<= y 1.15e+15))) (+ x (- (/ z y) (* a (/ x y)))) (/ (* t (+ 1.0 (/ (* y (+ 230661.510616 (* y 27464.7644705))) t))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.2e-27) || !(y <= 1.15e+15)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t * (1.0 + ((y * (230661.510616 + (y * 27464.7644705))) / 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 <= (-5.2d-27)) .or. (.not. (y <= 1.15d+15))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t * (1.0d0 + ((y * (230661.510616d0 + (y * 27464.7644705d0))) / 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 <= -5.2e-27) || !(y <= 1.15e+15)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t * (1.0 + ((y * (230661.510616 + (y * 27464.7644705))) / t))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.2e-27) or not (y <= 1.15e+15): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t * (1.0 + ((y * (230661.510616 + (y * 27464.7644705))) / t))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.2e-27) || !(y <= 1.15e+15)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t * Float64(1.0 + Float64(Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705))) / t))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.2e-27) || ~((y <= 1.15e+15))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t * (1.0 + ((y * (230661.510616 + (y * 27464.7644705))) / t))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.2e-27], N[Not[LessEqual[y, 1.15e+15]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(1.0 + N[(N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-27} \lor \neg \left(y \leq 1.15 \cdot 10^{+15}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(1 + \frac{y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{t}\right)}{i}\\
\end{array}
\end{array}
if y < -5.20000000000000034e-27 or 1.15e15 < y Initial program 12.4%
Taylor expanded in y around inf 60.8%
associate--l+60.8%
associate-/l*62.4%
Simplified62.4%
if -5.20000000000000034e-27 < y < 1.15e15Initial program 99.7%
Taylor expanded in t around inf 93.1%
Simplified99.5%
Taylor expanded in t around inf 93.1%
times-frac99.5%
Simplified99.5%
Taylor expanded in y around 0 91.6%
Taylor expanded in i around inf 68.2%
Final simplification65.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.2e-27) (not (<= y 5.2e+46))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.2e-27) || !(y <= 5.2e+46)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / 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 <= (-5.2d-27)) .or. (.not. (y <= 5.2d+46))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / 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 <= -5.2e-27) || !(y <= 5.2e+46)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.2e-27) or not (y <= 5.2e+46): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.2e-27) || !(y <= 5.2e+46)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.2e-27) || ~((y <= 5.2e+46))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.2e-27], N[Not[LessEqual[y, 5.2e+46]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-27} \lor \neg \left(y \leq 5.2 \cdot 10^{+46}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
\end{array}
\end{array}
if y < -5.20000000000000034e-27 or 5.20000000000000027e46 < y Initial program 10.2%
Taylor expanded in y around inf 62.8%
associate--l+62.8%
associate-/l*64.4%
Simplified64.4%
if -5.20000000000000034e-27 < y < 5.20000000000000027e46Initial program 99.0%
Taylor expanded in x around 0 94.6%
Taylor expanded in i around inf 68.4%
Final simplification66.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -4500.0) (not (<= y 3.9e+32))) (+ x (- (/ z y) (* a (/ x 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 <= -4500.0) || !(y <= 3.9e+32)) {
tmp = x + ((z / y) - (a * (x / 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 <= (-4500.0d0)) .or. (.not. (y <= 3.9d+32))) then
tmp = x + ((z / y) - (a * (x / 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 <= -4500.0) || !(y <= 3.9e+32)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -4500.0) or not (y <= 3.9e+32): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -4500.0) || !(y <= 3.9e+32)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / 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 <= -4500.0) || ~((y <= 3.9e+32))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4500.0], N[Not[LessEqual[y, 3.9e+32]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4500 \lor \neg \left(y \leq 3.9 \cdot 10^{+32}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -4500 or 3.8999999999999999e32 < y Initial program 7.8%
Taylor expanded in y around inf 63.9%
associate--l+63.9%
associate-/l*65.5%
Simplified65.5%
if -4500 < y < 3.8999999999999999e32Initial program 99.6%
Taylor expanded in y around 0 55.8%
Final simplification60.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3800000.0) x (if (<= y 8.8e+24) (/ 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 <= -3800000.0) {
tmp = x;
} else if (y <= 8.8e+24) {
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 <= (-3800000.0d0)) then
tmp = x
else if (y <= 8.8d+24) 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 <= -3800000.0) {
tmp = x;
} else if (y <= 8.8e+24) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3800000.0: tmp = x elif y <= 8.8e+24: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3800000.0) tmp = x; elseif (y <= 8.8e+24) 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 <= -3800000.0) tmp = x; elseif (y <= 8.8e+24) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3800000.0], x, If[LessEqual[y, 8.8e+24], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3800000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+24}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.8e6 or 8.80000000000000007e24 < y Initial program 7.9%
Taylor expanded in y around inf 41.4%
if -3.8e6 < y < 8.80000000000000007e24Initial program 99.0%
Taylor expanded in y around 0 55.4%
Final simplification49.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.3%
Final simplification20.3%
herbie shell --seed 2024067
(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)))