
(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 14 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 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(if (<= (/ (+ t_2 t) t_1) INFINITY)
(+ (/ t t_1) (/ t_2 t_1))
(+ x (- (/ z y) (/ 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 * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= ((double) INFINITY)) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (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 * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) tmp = 0 if ((t_2 + t) / t_1) <= math.inf: tmp = (t / t_1) + (t_2 / t_1) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) tmp = 0.0 if (Float64(Float64(t_2 + t) / t_1) <= Inf) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(x + Float64(Float64(z / y) - 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 * (y + a)) + b)) + c)) + i; t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616); tmp = 0.0; if (((t_2 + t) / t_1) <= Inf) tmp = (t / t_1) + (t_2 / t_1); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\
\mathbf{if}\;\frac{t_2 + t}{t_1} \leq \infty:\\
\;\;\;\;\frac{t}{t_1} + \frac{t_2}{t_1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \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 92.8%
Taylor expanded in t around 0 92.8%
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 70.6%
associate--l+70.6%
associate-/l*74.6%
Simplified74.6%
Final simplification86.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (+ x (- (/ z y) (/ 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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + ((z / y) - (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(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - 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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + ((z / y) - (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[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - 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(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \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 92.8%
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 70.6%
associate--l+70.6%
associate-/l*74.6%
Simplified74.6%
Final simplification86.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.9e+57) (not (<= y 1.35e+56)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (+ (* y (* y (+ 27464.7644705 (* y z)))) (* y 230661.510616)))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.9e+57) || !(y <= 1.35e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + ((y * (y * (27464.7644705 + (y * z)))) + (y * 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= (-1.9d+57)) .or. (.not. (y <= 1.35d+56))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + ((y * (y * (27464.7644705d0 + (y * z)))) + (y * 230661.510616d0))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= -1.9e+57) || !(y <= 1.35e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + ((y * (y * (27464.7644705 + (y * z)))) + (y * 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.9e+57) or not (y <= 1.35e+56): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + ((y * (y * (27464.7644705 + (y * z)))) + (y * 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.9e+57) || !(y <= 1.35e+56)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(Float64(y * Float64(y * Float64(27464.7644705 + Float64(y * z)))) + Float64(y * 230661.510616))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.9e+57) || ~((y <= 1.35e+56))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + ((y * (y * (27464.7644705 + (y * z)))) + (y * 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.9e+57], N[Not[LessEqual[y, 1.35e+56]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(N[(y * N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+57} \lor \neg \left(y \leq 1.35 \cdot 10^{+56}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + \left(y \cdot \left(y \cdot \left(27464.7644705 + y \cdot z\right)\right) + y \cdot 230661.510616\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.8999999999999999e57 or 1.35000000000000005e56 < y Initial program 3.2%
Taylor expanded in y around inf 69.1%
associate--l+69.1%
associate-/l*72.9%
Simplified72.9%
if -1.8999999999999999e57 < y < 1.35000000000000005e56Initial program 94.9%
*-commutative94.9%
distribute-rgt-in94.9%
*-commutative94.9%
*-commutative94.9%
fma-def94.9%
fma-def94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 90.7%
Final simplification83.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.05e+58) (not (<= y 2.5e+56)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.05e+58) || !(y <= 2.5e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= (-1.05d+58)) .or. (.not. (y <= 2.5d+56))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= -1.05e+58) || !(y <= 2.5e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.05e+58) or not (y <= 2.5e+56): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.05e+58) || !(y <= 2.5e+56)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.05e+58) || ~((y <= 2.5e+56))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.05e+58], N[Not[LessEqual[y, 2.5e+56]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $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[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+58} \lor \neg \left(y \leq 2.5 \cdot 10^{+56}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.05000000000000006e58 or 2.50000000000000012e56 < y Initial program 3.2%
Taylor expanded in y around inf 69.1%
associate--l+69.1%
associate-/l*72.9%
Simplified72.9%
if -1.05000000000000006e58 < y < 2.50000000000000012e56Initial program 94.9%
Taylor expanded in x around 0 90.7%
Final simplification83.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (+ t (* y 230661.510616)) (* y c)))
(t_2 (+ (* 230661.510616 (/ y i)) (/ t i)))
(t_3 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -4.5e-13)
t_3
(if (<= y -4.8e-92)
t_2
(if (<= y -1.65e-113)
t_1
(if (<= y 1.35e-95) t_2 (if (<= y 2200.0) 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 * c);
double t_2 = (230661.510616 * (y / i)) + (t / i);
double t_3 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.5e-13) {
tmp = t_3;
} else if (y <= -4.8e-92) {
tmp = t_2;
} else if (y <= -1.65e-113) {
tmp = t_1;
} else if (y <= 1.35e-95) {
tmp = t_2;
} else if (y <= 2200.0) {
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 * c)
t_2 = (230661.510616d0 * (y / i)) + (t / i)
t_3 = x + ((z / y) - (a / (y / x)))
if (y <= (-4.5d-13)) then
tmp = t_3
else if (y <= (-4.8d-92)) then
tmp = t_2
else if (y <= (-1.65d-113)) then
tmp = t_1
else if (y <= 1.35d-95) then
tmp = t_2
else if (y <= 2200.0d0) 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 * c);
double t_2 = (230661.510616 * (y / i)) + (t / i);
double t_3 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.5e-13) {
tmp = t_3;
} else if (y <= -4.8e-92) {
tmp = t_2;
} else if (y <= -1.65e-113) {
tmp = t_1;
} else if (y <= 1.35e-95) {
tmp = t_2;
} else if (y <= 2200.0) {
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 * c) t_2 = (230661.510616 * (y / i)) + (t / i) t_3 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -4.5e-13: tmp = t_3 elif y <= -4.8e-92: tmp = t_2 elif y <= -1.65e-113: tmp = t_1 elif y <= 1.35e-95: tmp = t_2 elif y <= 2200.0: 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 * 230661.510616)) / Float64(y * c)) t_2 = Float64(Float64(230661.510616 * Float64(y / i)) + Float64(t / i)) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -4.5e-13) tmp = t_3; elseif (y <= -4.8e-92) tmp = t_2; elseif (y <= -1.65e-113) tmp = t_1; elseif (y <= 1.35e-95) tmp = t_2; elseif (y <= 2200.0) 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 * c); t_2 = (230661.510616 * (y / i)) + (t / i); t_3 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -4.5e-13) tmp = t_3; elseif (y <= -4.8e-92) tmp = t_2; elseif (y <= -1.65e-113) tmp = t_1; elseif (y <= 1.35e-95) tmp = t_2; elseif (y <= 2200.0) 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 * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 * N[(y / i), $MachinePrecision]), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e-13], t$95$3, If[LessEqual[y, -4.8e-92], t$95$2, If[LessEqual[y, -1.65e-113], t$95$1, If[LessEqual[y, 1.35e-95], t$95$2, If[LessEqual[y, 2200.0], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot 230661.510616}{y \cdot c}\\
t_2 := 230661.510616 \cdot \frac{y}{i} + \frac{t}{i}\\
t_3 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-13}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2200:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -4.5e-13 or 2200 < y Initial program 13.9%
Taylor expanded in y around inf 58.4%
associate--l+58.4%
associate-/l*61.5%
Simplified61.5%
if -4.5e-13 < y < -4.8000000000000002e-92 or -1.6500000000000001e-113 < y < 1.35e-95Initial program 99.8%
Taylor expanded in y around 0 67.3%
Taylor expanded in c around 0 79.2%
if -4.8000000000000002e-92 < y < -1.6500000000000001e-113 or 1.35e-95 < y < 2200Initial program 99.2%
Taylor expanded in y around 0 75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in c around inf 50.8%
Final simplification67.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.8e+39) (not (<= y 1.6e+56)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.8e+39) || !(y <= 1.6e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= (-1.8d+39)) .or. (.not. (y <= 1.6d+56))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= -1.8e+39) || !(y <= 1.6e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.8e+39) or not (y <= 1.6e+56): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.8e+39) || !(y <= 1.6e+56)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.8e+39) || ~((y <= 1.6e+56))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.8e+39], N[Not[LessEqual[y, 1.6e+56]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - 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[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+39} \lor \neg \left(y \leq 1.6 \cdot 10^{+56}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.79999999999999992e39 or 1.60000000000000002e56 < y Initial program 4.4%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*71.2%
Simplified71.2%
if -1.79999999999999992e39 < y < 1.60000000000000002e56Initial program 96.5%
Taylor expanded in y around 0 85.4%
*-commutative85.4%
Simplified85.4%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* 230661.510616 (/ y i)) (/ t i)))
(t_2 (/ (+ t (* y 230661.510616)) (* y c))))
(if (<= y -7.2e-13)
x
(if (<= y -5.1e-92)
t_1
(if (<= y -1.65e-113)
t_2
(if (<= y 1.15e-95) t_1 (if (<= y 1050000.0) t_2 x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (230661.510616 * (y / i)) + (t / i);
double t_2 = (t + (y * 230661.510616)) / (y * c);
double tmp;
if (y <= -7.2e-13) {
tmp = x;
} else if (y <= -5.1e-92) {
tmp = t_1;
} else if (y <= -1.65e-113) {
tmp = t_2;
} else if (y <= 1.15e-95) {
tmp = t_1;
} else if (y <= 1050000.0) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (230661.510616d0 * (y / i)) + (t / i)
t_2 = (t + (y * 230661.510616d0)) / (y * c)
if (y <= (-7.2d-13)) then
tmp = x
else if (y <= (-5.1d-92)) then
tmp = t_1
else if (y <= (-1.65d-113)) then
tmp = t_2
else if (y <= 1.15d-95) then
tmp = t_1
else if (y <= 1050000.0d0) then
tmp = t_2
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 t_1 = (230661.510616 * (y / i)) + (t / i);
double t_2 = (t + (y * 230661.510616)) / (y * c);
double tmp;
if (y <= -7.2e-13) {
tmp = x;
} else if (y <= -5.1e-92) {
tmp = t_1;
} else if (y <= -1.65e-113) {
tmp = t_2;
} else if (y <= 1.15e-95) {
tmp = t_1;
} else if (y <= 1050000.0) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (230661.510616 * (y / i)) + (t / i) t_2 = (t + (y * 230661.510616)) / (y * c) tmp = 0 if y <= -7.2e-13: tmp = x elif y <= -5.1e-92: tmp = t_1 elif y <= -1.65e-113: tmp = t_2 elif y <= 1.15e-95: tmp = t_1 elif y <= 1050000.0: tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(230661.510616 * Float64(y / i)) + Float64(t / i)) t_2 = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c)) tmp = 0.0 if (y <= -7.2e-13) tmp = x; elseif (y <= -5.1e-92) tmp = t_1; elseif (y <= -1.65e-113) tmp = t_2; elseif (y <= 1.15e-95) tmp = t_1; elseif (y <= 1050000.0) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (230661.510616 * (y / i)) + (t / i); t_2 = (t + (y * 230661.510616)) / (y * c); tmp = 0.0; if (y <= -7.2e-13) tmp = x; elseif (y <= -5.1e-92) tmp = t_1; elseif (y <= -1.65e-113) tmp = t_2; elseif (y <= 1.15e-95) tmp = t_1; elseif (y <= 1050000.0) tmp = t_2; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(230661.510616 * N[(y / i), $MachinePrecision]), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e-13], x, If[LessEqual[y, -5.1e-92], t$95$1, If[LessEqual[y, -1.65e-113], t$95$2, If[LessEqual[y, 1.15e-95], t$95$1, If[LessEqual[y, 1050000.0], t$95$2, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 230661.510616 \cdot \frac{y}{i} + \frac{t}{i}\\
t_2 := \frac{t + y \cdot 230661.510616}{y \cdot c}\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1050000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.1999999999999996e-13 or 1.05e6 < y Initial program 13.2%
Taylor expanded in y around inf 50.6%
if -7.1999999999999996e-13 < y < -5.09999999999999972e-92 or -1.6500000000000001e-113 < y < 1.15e-95Initial program 99.8%
Taylor expanded in y around 0 66.6%
Taylor expanded in c around 0 78.5%
if -5.09999999999999972e-92 < y < -1.6500000000000001e-113 or 1.15e-95 < y < 1.05e6Initial program 99.2%
Taylor expanded in y around 0 75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in c around inf 50.8%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.15e+43) (not (<= y 3.4e+56))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+43) || !(y <= 3.4e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= (-1.15d+43)) .or. (.not. (y <= 3.4d+56))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= -1.15e+43) || !(y <= 3.4e+56)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.15e+43) or not (y <= 3.4e+56): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.15e+43) || !(y <= 3.4e+56)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.15e+43) || ~((y <= 3.4e+56))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.15e+43], N[Not[LessEqual[y, 3.4e+56]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+43} \lor \neg \left(y \leq 3.4 \cdot 10^{+56}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.1500000000000001e43 or 3.40000000000000001e56 < y Initial program 4.4%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*71.2%
Simplified71.2%
if -1.1500000000000001e43 < y < 3.40000000000000001e56Initial program 96.5%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
Simplified83.1%
Final simplification78.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.2e+31) (not (<= y 8.5e+55))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ 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 <= -3.2e+31) || !(y <= 8.5e+55)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (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 <= (-3.2d+31)) .or. (.not. (y <= 8.5d+55))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / (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 <= -3.2e+31) || !(y <= 8.5e+55)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.2e+31) or not (y <= 8.5e+55): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.2e+31) || !(y <= 8.5e+55)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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 <= -3.2e+31) || ~((y <= 8.5e+55))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.2e+31], N[Not[LessEqual[y, 8.5e+55]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - 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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+31} \lor \neg \left(y \leq 8.5 \cdot 10^{+55}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -3.2000000000000001e31 or 8.50000000000000002e55 < y Initial program 4.4%
Taylor expanded in y around inf 67.6%
associate--l+67.6%
associate-/l*71.2%
Simplified71.2%
if -3.2000000000000001e31 < y < 8.50000000000000002e55Initial program 96.5%
Taylor expanded in y around 0 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 80.6%
*-commutative80.6%
Simplified80.6%
Final simplification76.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.4e+14) (not (<= y 2.6e+19))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ 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.4e+14) || !(y <= 2.6e+19)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (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.4d+14)) .or. (.not. (y <= 2.6d+19))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / (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.4e+14) || !(y <= 2.6e+19)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.4e+14) or not (y <= 2.6e+19): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.4e+14) || !(y <= 2.6e+19)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / 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.4e+14) || ~((y <= 2.6e+19))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.4e+14], N[Not[LessEqual[y, 2.6e+19]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+14} \lor \neg \left(y \leq 2.6 \cdot 10^{+19}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.4e14 or 2.6e19 < y Initial program 9.4%
Taylor expanded in y around inf 61.3%
associate--l+61.3%
associate-/l*64.6%
Simplified64.6%
if -1.4e14 < y < 2.6e19Initial program 99.6%
Taylor expanded in y around 0 87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y around 0 82.7%
Final simplification74.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -7.2e-13) x (if (<= y 3e-38) (+ (* 230661.510616 (/ y i)) (/ 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 <= -7.2e-13) {
tmp = x;
} else if (y <= 3e-38) {
tmp = (230661.510616 * (y / i)) + (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 <= (-7.2d-13)) then
tmp = x
else if (y <= 3d-38) then
tmp = (230661.510616d0 * (y / i)) + (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 <= -7.2e-13) {
tmp = x;
} else if (y <= 3e-38) {
tmp = (230661.510616 * (y / i)) + (t / i);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.2e-13: tmp = x elif y <= 3e-38: tmp = (230661.510616 * (y / i)) + (t / i) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.2e-13) tmp = x; elseif (y <= 3e-38) tmp = Float64(Float64(230661.510616 * Float64(y / i)) + 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 <= -7.2e-13) tmp = x; elseif (y <= 3e-38) tmp = (230661.510616 * (y / i)) + (t / i); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.2e-13], x, If[LessEqual[y, 3e-38], N[(N[(230661.510616 * N[(y / i), $MachinePrecision]), $MachinePrecision] + N[(t / i), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-38}:\\
\;\;\;\;230661.510616 \cdot \frac{y}{i} + \frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.1999999999999996e-13 or 2.99999999999999989e-38 < y Initial program 19.9%
Taylor expanded in y around inf 47.0%
if -7.1999999999999996e-13 < y < 2.99999999999999989e-38Initial program 99.7%
Taylor expanded in y around 0 60.5%
Taylor expanded in c around 0 70.2%
Final simplification58.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -7.6e-13) x (if (<= y 3e-38) (/ (+ 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 <= -7.6e-13) {
tmp = x;
} else if (y <= 3e-38) {
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 <= (-7.6d-13)) then
tmp = x
else if (y <= 3d-38) 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 <= -7.6e-13) {
tmp = x;
} else if (y <= 3e-38) {
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 <= -7.6e-13: tmp = x elif y <= 3e-38: 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 <= -7.6e-13) tmp = x; elseif (y <= 3e-38) 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 <= -7.6e-13) tmp = x; elseif (y <= 3e-38) 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, -7.6e-13], x, If[LessEqual[y, 3e-38], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-38}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.5999999999999999e-13 or 2.99999999999999989e-38 < y Initial program 19.9%
Taylor expanded in y around inf 47.0%
if -7.5999999999999999e-13 < y < 2.99999999999999989e-38Initial program 99.7%
Taylor expanded in y around 0 60.5%
Taylor expanded in i around inf 70.2%
Final simplification58.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.9e-46) x (if (<= y 3e-38) (/ 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.9e-46) {
tmp = x;
} else if (y <= 3e-38) {
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.9d-46)) then
tmp = x
else if (y <= 3d-38) 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.9e-46) {
tmp = x;
} else if (y <= 3e-38) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.9e-46: tmp = x elif y <= 3e-38: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.9e-46) tmp = x; elseif (y <= 3e-38) 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.9e-46) tmp = x; elseif (y <= 3e-38) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.9e-46], x, If[LessEqual[y, 3e-38], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.8999999999999998e-46 or 2.99999999999999989e-38 < y Initial program 24.6%
Taylor expanded in y around inf 44.6%
if -1.8999999999999998e-46 < y < 2.99999999999999989e-38Initial program 99.7%
Taylor expanded in y around 0 68.5%
Final simplification55.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 59.8%
Taylor expanded in y around inf 25.2%
Final simplification25.2%
herbie shell --seed 2024021
(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)))