
(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 15 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 (/ (* x a) y)) (t_2 (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(if (<= y -9.5e+54)
(+
x
(+
(+ (/ z y) (/ 27464.7644705 (pow y 2.0)))
(-
(- (/ (* a (- (* x a) z)) (pow y 2.0)) (/ b (/ (pow y 2.0) x)))
t_1)))
(if (<= y 1.96e+15)
(+
(/ t t_2)
(/
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))
t_2))
(- (+ x (/ z y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * a) / y;
double t_2 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -9.5e+54) {
tmp = x + (((z / y) + (27464.7644705 / pow(y, 2.0))) + ((((a * ((x * a) - z)) / pow(y, 2.0)) - (b / (pow(y, 2.0) / x))) - t_1));
} else if (y <= 1.96e+15) {
tmp = (t / t_2) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_2);
} else {
tmp = (x + (z / y)) - t_1;
}
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 = (x * a) / y
t_2 = i + (y * (c + (y * (b + (y * (y + a))))))
if (y <= (-9.5d+54)) then
tmp = x + (((z / y) + (27464.7644705d0 / (y ** 2.0d0))) + ((((a * ((x * a) - z)) / (y ** 2.0d0)) - (b / ((y ** 2.0d0) / x))) - t_1))
else if (y <= 1.96d+15) then
tmp = (t / t_2) + ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x))))))) / t_2)
else
tmp = (x + (z / y)) - t_1
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 = (x * a) / y;
double t_2 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -9.5e+54) {
tmp = x + (((z / y) + (27464.7644705 / Math.pow(y, 2.0))) + ((((a * ((x * a) - z)) / Math.pow(y, 2.0)) - (b / (Math.pow(y, 2.0) / x))) - t_1));
} else if (y <= 1.96e+15) {
tmp = (t / t_2) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_2);
} else {
tmp = (x + (z / y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * a) / y t_2 = i + (y * (c + (y * (b + (y * (y + a)))))) tmp = 0 if y <= -9.5e+54: tmp = x + (((z / y) + (27464.7644705 / math.pow(y, 2.0))) + ((((a * ((x * a) - z)) / math.pow(y, 2.0)) - (b / (math.pow(y, 2.0) / x))) - t_1)) elif y <= 1.96e+15: tmp = (t / t_2) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_2) else: tmp = (x + (z / y)) - t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * a) / y) t_2 = Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))) tmp = 0.0 if (y <= -9.5e+54) tmp = Float64(x + Float64(Float64(Float64(z / y) + Float64(27464.7644705 / (y ^ 2.0))) + Float64(Float64(Float64(Float64(a * Float64(Float64(x * a) - z)) / (y ^ 2.0)) - Float64(b / Float64((y ^ 2.0) / x))) - t_1))); elseif (y <= 1.96e+15) tmp = Float64(Float64(t / t_2) + Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x))))))) / t_2)); else tmp = Float64(Float64(x + Float64(z / y)) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * a) / y; t_2 = i + (y * (c + (y * (b + (y * (y + a)))))); tmp = 0.0; if (y <= -9.5e+54) tmp = x + (((z / y) + (27464.7644705 / (y ^ 2.0))) + ((((a * ((x * a) - z)) / (y ^ 2.0)) - (b / ((y ^ 2.0) / x))) - t_1)); elseif (y <= 1.96e+15) tmp = (t / t_2) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_2); else tmp = (x + (z / y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+54], N[(x + N[(N[(N[(z / y), $MachinePrecision] + N[(27464.7644705 / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(a * N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] - N[(b / N[(N[Power[y, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.96e+15], N[(N[(t / t$95$2), $MachinePrecision] + N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot a}{y}\\
t_2 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+54}:\\
\;\;\;\;x + \left(\left(\frac{z}{y} + \frac{27464.7644705}{{y}^{2}}\right) + \left(\left(\frac{a \cdot \left(x \cdot a - z\right)}{{y}^{2}} - \frac{b}{\frac{{y}^{2}}{x}}\right) - t\_1\right)\right)\\
\mathbf{elif}\;y \leq 1.96 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{t\_2} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - t\_1\\
\end{array}
\end{array}
if y < -9.4999999999999999e54Initial program 0.3%
Taylor expanded in y around inf 64.3%
associate--l+64.3%
+-commutative64.3%
associate-*r/64.2%
metadata-eval64.2%
associate-/l*74.7%
Simplified74.7%
if -9.4999999999999999e54 < y < 1.96e15Initial program 97.0%
Taylor expanded in t around 0 97.0%
if 1.96e15 < y Initial program 3.5%
Taylor expanded in y around inf 70.9%
Final simplification86.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(t_2
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))))
(if (<= (/ (+ t t_2) t_1) INFINITY)
(+ (/ t t_1) (/ t_2 t_1))
(- (+ x (/ z y)) (/ (* x a) 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 = y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))));
double tmp;
if (((t + t_2) / t_1) <= ((double) INFINITY)) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / 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 = y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))));
double tmp;
if (((t + t_2) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / 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 = y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) tmp = 0 if ((t + t_2) / t_1) <= math.inf: tmp = (t / t_1) + (t_2 / t_1) else: tmp = (x + (z / y)) - ((x * a) / 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(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x))))))) tmp = 0.0 if (Float64(Float64(t + t_2) / t_1) <= Inf) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 = y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))); tmp = 0.0; if (((t + t_2) / t_1) <= Inf) tmp = (t / t_1) + (t_2 / t_1); else tmp = (x + (z / y)) - ((x * a) / 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[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 := y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)\\
\mathbf{if}\;\frac{t + t\_2}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.6%
Taylor expanded in t around 0 91.6%
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 72.9%
Final simplification84.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 INFINITY) t_1 (- (+ x (/ z y)) (/ (* x a) 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 * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((x * a) / 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 * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x + (z / y)) - ((x * a) / 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(z + Float64(y * x)))))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x + (z / y)) - ((x * a) / 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[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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(z + y \cdot x\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}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.6%
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 72.9%
Final simplification84.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.15e+37) (not (<= y 1.96e+15)))
(- (+ x (/ z y)) (/ (* x a) 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.15e+37) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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.15d+37)) .or. (.not. (y <= 1.96d+15))) then
tmp = (x + (z / y)) - ((x * a) / 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.15e+37) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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.15e+37) or not (y <= 1.96e+15): tmp = (x + (z / y)) - ((x * a) / 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.15e+37) || !(y <= 1.96e+15)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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.15e+37) || ~((y <= 1.96e+15))) tmp = (x + (z / y)) - ((x * a) / 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.15e+37], N[Not[LessEqual[y, 1.96e+15]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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.15 \cdot 10^{+37} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\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.15000000000000001e37 or 1.96e15 < y Initial program 3.0%
Taylor expanded in y around inf 68.7%
if -1.15000000000000001e37 < y < 1.96e15Initial program 99.0%
Taylor expanded in x around 0 94.1%
Final simplification82.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.15e+54) (not (<= y 1.96e+15)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ 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 <= -2.15e+54) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (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 <= (-2.15d+54)) .or. (.not. (y <= 1.96d+15))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (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 <= -2.15e+54) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.15e+54) or not (y <= 1.96e+15): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.15e+54) || !(y <= 1.96e+15)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / 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 <= -2.15e+54) || ~((y <= 1.96e+15))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.15e+54], N[Not[LessEqual[y, 1.96e+15]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $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 -2.15 \cdot 10^{+54} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.14999999999999988e54 or 1.96e15 < y Initial program 2.2%
Taylor expanded in y around inf 70.9%
if -2.14999999999999988e54 < y < 1.96e15Initial program 97.0%
Taylor expanded in y around 0 90.2%
*-commutative90.2%
Simplified90.2%
Final simplification81.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.06e+37) (not (<= y 1.96e+15)))
(- (+ x (/ z y)) (/ (* x a) 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.06e+37) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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.06d+37)) .or. (.not. (y <= 1.96d+15))) then
tmp = (x + (z / y)) - ((x * a) / 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.06e+37) || !(y <= 1.96e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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.06e+37) or not (y <= 1.96e+15): tmp = (x + (z / y)) - ((x * a) / 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.06e+37) || !(y <= 1.96e+15)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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.06e+37) || ~((y <= 1.96e+15))) tmp = (x + (z / y)) - ((x * a) / 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.06e+37], N[Not[LessEqual[y, 1.96e+15]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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.06 \cdot 10^{+37} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\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.06e37 or 1.96e15 < y Initial program 3.0%
Taylor expanded in y around inf 68.7%
if -1.06e37 < y < 1.96e15Initial program 99.0%
Taylor expanded in x around 0 94.1%
Taylor expanded in y around 0 88.7%
*-commutative92.0%
Simplified88.7%
Final simplification79.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -4.8e+33) (not (<= y 4.8e+14))) (- (+ x (/ z y)) (/ (* x a) 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 <= -4.8e+33) || !(y <= 4.8e+14)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-4.8d+33)) .or. (.not. (y <= 4.8d+14))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -4.8e+33) || !(y <= 4.8e+14)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -4.8e+33) or not (y <= 4.8e+14): tmp = (x + (z / y)) - ((x * a) / 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 <= -4.8e+33) || !(y <= 4.8e+14)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -4.8e+33) || ~((y <= 4.8e+14))) tmp = (x + (z / y)) - ((x * a) / 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, -4.8e+33], N[Not[LessEqual[y, 4.8e+14]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 -4.8 \cdot 10^{+33} \lor \neg \left(y \leq 4.8 \cdot 10^{+14}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\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 < -4.8e33 or 4.8e14 < y Initial program 3.0%
Taylor expanded in y around inf 68.7%
if -4.8e33 < y < 4.8e14Initial program 99.0%
Taylor expanded in y around 0 85.4%
*-commutative85.4%
Simplified85.4%
Final simplification77.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.9e+56) (not (<= y 24000000000000.0)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ 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 <= -2.9e+56) || !(y <= 24000000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (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 <= (-2.9d+56)) .or. (.not. (y <= 24000000000000.0d0))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (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 <= -2.9e+56) || !(y <= 24000000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.9e+56) or not (y <= 24000000000000.0): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.9e+56) || !(y <= 24000000000000.0)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / 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 <= -2.9e+56) || ~((y <= 24000000000000.0))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.9e+56], N[Not[LessEqual[y, 24000000000000.0]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+56} \lor \neg \left(y \leq 24000000000000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.90000000000000007e56 or 2.4e13 < y Initial program 2.2%
Taylor expanded in y around inf 71.6%
if -2.90000000000000007e56 < y < 2.4e13Initial program 96.3%
Taylor expanded in y around 0 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in y around 0 79.7%
*-commutative79.7%
Simplified79.7%
Final simplification76.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.55e+37)
t_1
(if (<= y 1.15e-229)
(/ (+ t (* y 230661.510616)) (+ i (* y c)))
(if (<= y 27000000000000.0) (/ t (+ i (* y (+ c (* y b))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.55e+37) {
tmp = t_1;
} else if (y <= 1.15e-229) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else if (y <= 27000000000000.0) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.55d+37)) then
tmp = t_1
else if (y <= 1.15d-229) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
else if (y <= 27000000000000.0d0) then
tmp = t / (i + (y * (c + (y * b))))
else
tmp = t_1
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 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.55e+37) {
tmp = t_1;
} else if (y <= 1.15e-229) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else if (y <= 27000000000000.0) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.55e+37: tmp = t_1 elif y <= 1.15e-229: tmp = (t + (y * 230661.510616)) / (i + (y * c)) elif y <= 27000000000000.0: tmp = t / (i + (y * (c + (y * b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.55e+37) tmp = t_1; elseif (y <= 1.15e-229) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); elseif (y <= 27000000000000.0) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.55e+37) tmp = t_1; elseif (y <= 1.15e-229) tmp = (t + (y * 230661.510616)) / (i + (y * c)); elseif (y <= 27000000000000.0) tmp = t / (i + (y * (c + (y * b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+37], t$95$1, If[LessEqual[y, 1.15e-229], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 27000000000000.0], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-229}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 27000000000000:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5500000000000001e37 or 2.7e13 < y Initial program 3.0%
Taylor expanded in y around inf 69.2%
if -1.5500000000000001e37 < y < 1.14999999999999998e-229Initial program 97.5%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 79.3%
*-commutative79.3%
Simplified79.3%
if 1.14999999999999998e-229 < y < 2.7e13Initial program 99.6%
Taylor expanded in y around 0 90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in t around inf 71.1%
Final simplification73.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -8e+33) (not (<= y 57000000000000.0))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ 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 <= -8e+33) || !(y <= 57000000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} 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 <= (-8d+33)) .or. (.not. (y <= 57000000000000.0d0))) then
tmp = (x + (z / y)) - ((x * a) / y)
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 <= -8e+33) || !(y <= 57000000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} 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 <= -8e+33) or not (y <= 57000000000000.0): tmp = (x + (z / y)) - ((x * a) / y) 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 <= -8e+33) || !(y <= 57000000000000.0)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); 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 <= -8e+33) || ~((y <= 57000000000000.0))) tmp = (x + (z / y)) - ((x * a) / y); 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, -8e+33], N[Not[LessEqual[y, 57000000000000.0]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 -8 \cdot 10^{+33} \lor \neg \left(y \leq 57000000000000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -7.9999999999999996e33 or 5.7e13 < y Initial program 3.0%
Taylor expanded in y around inf 68.7%
if -7.9999999999999996e33 < y < 5.7e13Initial program 99.0%
Taylor expanded in y around 0 92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in y around 0 81.8%
*-commutative85.4%
Simplified81.8%
Final simplification75.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+37) (not (<= y 220000000000.0))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+37) || !(y <= 220000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+37)) .or. (.not. (y <= 220000000000.0d0))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+37) || !(y <= 220000000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+37) or not (y <= 220000000000.0): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+37) || !(y <= 220000000000.0)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+37) || ~((y <= 220000000000.0))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+37], N[Not[LessEqual[y, 220000000000.0]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+37} \lor \neg \left(y \leq 220000000000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -1.2e37 or 2.2e11 < y Initial program 3.0%
Taylor expanded in y around inf 69.2%
if -1.2e37 < y < 2.2e11Initial program 98.3%
Taylor expanded in y around 0 84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in i around inf 59.5%
Final simplification64.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6.8e+36) (not (<= y 9e+14))) (- (+ x (/ z y)) (/ (* x a) y)) (/ t (+ 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 <= -6.8e+36) || !(y <= 9e+14)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = t / (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 <= (-6.8d+36)) .or. (.not. (y <= 9d+14))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = t / (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 <= -6.8e+36) || !(y <= 9e+14)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6.8e+36) or not (y <= 9e+14): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6.8e+36) || !(y <= 9e+14)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(t / 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 <= -6.8e+36) || ~((y <= 9e+14))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6.8e+36], N[Not[LessEqual[y, 9e+14]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+36} \lor \neg \left(y \leq 9 \cdot 10^{+14}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -6.7999999999999996e36 or 9e14 < y Initial program 3.0%
Taylor expanded in y around inf 68.7%
if -6.7999999999999996e36 < y < 9e14Initial program 99.0%
Taylor expanded in y around 0 92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in t around inf 73.6%
Final simplification71.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -9.8e-20) x (if (<= y 1.75e+14) (/ (+ 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 <= -9.8e-20) {
tmp = x;
} else if (y <= 1.75e+14) {
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 <= (-9.8d-20)) then
tmp = x
else if (y <= 1.75d+14) 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 <= -9.8e-20) {
tmp = x;
} else if (y <= 1.75e+14) {
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 <= -9.8e-20: tmp = x elif y <= 1.75e+14: 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 <= -9.8e-20) tmp = x; elseif (y <= 1.75e+14) 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 <= -9.8e-20) tmp = x; elseif (y <= 1.75e+14) 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, -9.8e-20], x, If[LessEqual[y, 1.75e+14], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+14}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.8000000000000003e-20 or 1.75e14 < y Initial program 9.9%
Taylor expanded in y around inf 57.2%
if -9.8000000000000003e-20 < y < 1.75e14Initial program 99.7%
Taylor expanded in y around 0 88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in i around inf 64.3%
Final simplification60.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.8e-20) x (if (<= y 29000000000000.0) (/ 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.8e-20) {
tmp = x;
} else if (y <= 29000000000000.0) {
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.8d-20)) then
tmp = x
else if (y <= 29000000000000.0d0) 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.8e-20) {
tmp = x;
} else if (y <= 29000000000000.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.8e-20: tmp = x elif y <= 29000000000000.0: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.8e-20) tmp = x; elseif (y <= 29000000000000.0) 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.8e-20) tmp = x; elseif (y <= 29000000000000.0) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.8e-20], x, If[LessEqual[y, 29000000000000.0], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 29000000000000:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.79999999999999987e-20 or 2.9e13 < y Initial program 9.9%
Taylor expanded in y around inf 57.2%
if -1.79999999999999987e-20 < y < 2.9e13Initial program 99.7%
Taylor expanded in y around 0 58.5%
Final simplification57.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 54.8%
Taylor expanded in y around inf 30.2%
Final simplification30.2%
herbie shell --seed 2024096
(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)))