
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(t_2
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(if (<= (/ (+ t t_2) t_1) INFINITY)
(+ (/ t t_1) (/ t_2 t_1))
(+
x
(- (+ (/ 27464.7644705 (pow y 2.0)) (/ z y)) (/ b (/ (pow y 2.0) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t + t_2) / t_1) <= ((double) INFINITY)) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + (((27464.7644705 / pow(y, 2.0)) + (z / y)) - (b / (pow(y, 2.0) / 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 = i + (y * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t + t_2) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = x + (((27464.7644705 / Math.pow(y, 2.0)) + (z / y)) - (b / (Math.pow(y, 2.0) / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)) t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) tmp = 0 if ((t + t_2) / t_1) <= math.inf: tmp = (t / t_1) + (t_2 / t_1) else: tmp = x + (((27464.7644705 / math.pow(y, 2.0)) + (z / y)) - (b / (math.pow(y, 2.0) / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) 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 + t_2) / t_1) <= Inf) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(x + Float64(Float64(Float64(27464.7644705 / (y ^ 2.0)) + Float64(z / y)) - Float64(b / Float64((y ^ 2.0) / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * ((y * ((y * (y + a)) + b)) + c)); t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616); tmp = 0.0; if (((t + t_2) / t_1) <= Inf) tmp = (t / t_1) + (t_2 / t_1); else tmp = x + (((27464.7644705 / (y ^ 2.0)) + (z / y)) - (b / ((y ^ 2.0) / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $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 + 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[(x + N[(N[(N[(27464.7644705 / N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(b / N[(N[Power[y, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
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 + t_2}{t_1} \leq \infty:\\
\;\;\;\;\frac{t}{t_1} + \frac{t_2}{t_1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\left(\frac{27464.7644705}{{y}^{2}} + \frac{z}{y}\right) - \frac{b}{\frac{{y}^{2}}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 90.5%
Taylor expanded in t around 0 90.5%
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 67.2%
associate-+r+67.2%
associate-*r/67.2%
metadata-eval67.2%
+-commutative67.2%
associate-+r+67.2%
associate-/l*67.3%
associate-/l*70.7%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in a around 0 78.0%
associate--l+78.0%
associate-*r/78.0%
metadata-eval78.0%
associate-/l*84.8%
Simplified84.8%
Final simplification88.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(t_2
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(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 * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
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 * ((y * ((y * (y + a)) + b)) + c));
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
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 * ((y * ((y * (y + a)) + b)) + c)) t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) 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(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))) 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 + 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 * ((y * ((y * (y + a)) + b)) + c)); t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616); 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[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $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 + 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(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
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 + 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 90.5%
Taylor expanded in t around 0 90.5%
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 76.7%
Final simplification85.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
(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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) 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(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) 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 * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); 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[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $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(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\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 90.5%
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 76.7%
Final simplification85.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.6e+72)
t_1
(if (<= y -2.7e-34)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(* y (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y 3.25e+56)
(/
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)))
(+ 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.6e+72) {
tmp = t_1;
} else if (y <= -2.7e-34) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (y * ((y * ((y * (y + a)) + b)) + c));
} else if (y <= 3.25e+56) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (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.6d+72)) then
tmp = t_1
else if (y <= (-2.7d-34)) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (y * ((y * ((y * (y + a)) + b)) + c))
else if (y <= 3.25d+56) then
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0))) / (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.6e+72) {
tmp = t_1;
} else if (y <= -2.7e-34) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (y * ((y * ((y * (y + a)) + b)) + c));
} else if (y <= 3.25e+56) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (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.6e+72: tmp = t_1 elif y <= -2.7e-34: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (y * ((y * ((y * (y + a)) + b)) + c)) elif y <= 3.25e+56: tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (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.6e+72) tmp = t_1; elseif (y <= -2.7e-34) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c))); elseif (y <= 3.25e+56) tmp = Float64(Float64(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) / 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.6e+72) tmp = t_1; elseif (y <= -2.7e-34) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (y * ((y * ((y * (y + a)) + b)) + c)); elseif (y <= 3.25e+56) tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (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.6e+72], t$95$1, If[LessEqual[y, -2.7e-34], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.25e+56], N[(N[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.6 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-34}:\\
\;\;\;\;\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)}\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{+56}:\\
\;\;\;\;\frac{t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.6000000000000001e72 or 3.25e56 < y Initial program 3.6%
Taylor expanded in y around inf 73.0%
if -1.6000000000000001e72 < y < -2.70000000000000017e-34Initial program 74.6%
Taylor expanded in i around 0 69.9%
Taylor expanded in x around 0 66.1%
if -2.70000000000000017e-34 < y < 3.25e56Initial program 96.9%
Taylor expanded in y around 0 89.7%
*-commutative81.9%
Simplified89.7%
Final simplification81.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.6e+72) (not (<= y 1.2e+74)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.6e+72) || !(y <= 1.2e+74)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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.6d+72)) .or. (.not. (y <= 1.2d+74))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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.6e+72) || !(y <= 1.2e+74)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.6e+72) or not (y <= 1.2e+74): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.6e+72) || !(y <= 1.2e+74)) 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(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.6e+72) || ~((y <= 1.2e+74))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.6e+72], N[Not[LessEqual[y, 1.2e+74]], $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[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+72} \lor \neg \left(y \leq 1.2 \cdot 10^{+74}\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(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -1.6000000000000001e72 or 1.20000000000000004e74 < y Initial program 1.4%
Taylor expanded in y around inf 74.8%
if -1.6000000000000001e72 < y < 1.20000000000000004e74Initial program 92.4%
Taylor expanded in x around 0 87.8%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* y (+ (* y (+ (* y (+ y a)) b)) c)))
(t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.6e+72)
t_2
(if (<= y -8.5e-35)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1)
(if (<= y 1.05e+52)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i t_1))
t_2)))))
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);
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.6e+72) {
tmp = t_2;
} else if (y <= -8.5e-35) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.05e+52) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((y * ((y * (y + a)) + b)) + c)
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.6d+72)) then
tmp = t_2
else if (y <= (-8.5d-35)) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
else if (y <= 1.05d+52) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = y * ((y * ((y * (y + a)) + b)) + c);
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.6e+72) {
tmp = t_2;
} else if (y <= -8.5e-35) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.05e+52) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = y * ((y * ((y * (y + a)) + b)) + c) t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.6e+72: tmp = t_2 elif y <= -8.5e-35: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 elif y <= 1.05e+52: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.6e+72) tmp = t_2; elseif (y <= -8.5e-35) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1); elseif (y <= 1.05e+52) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + t_1)); else tmp = t_2; 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); t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.6e+72) tmp = t_2; elseif (y <= -8.5e-35) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; elseif (y <= 1.05e+52) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+72], t$95$2, If[LessEqual[y, -8.5e-35], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 1.05e+52], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t_1}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+52}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.6000000000000001e72 or 1.05e52 < y Initial program 4.6%
Taylor expanded in y around inf 71.7%
if -1.6000000000000001e72 < y < -8.5000000000000001e-35Initial program 74.6%
Taylor expanded in i around 0 69.9%
Taylor expanded in x around 0 66.1%
if -8.5000000000000001e-35 < y < 1.05e52Initial program 97.6%
Taylor expanded in y around 0 89.6%
*-commutative89.6%
Simplified89.6%
Final simplification80.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y)))
(t_2 (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(if (<= y -1.9e+72)
t_1
(if (<= y -9e-35)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) t_2)
(if (<= y -1e-51)
(/
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)))
i)
(if (<= y 3.1e+38) (/ (+ t (* y 230661.510616)) (+ i t_2)) 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 t_2 = y * ((y * ((y * (y + a)) + b)) + c);
double tmp;
if (y <= -1.9e+72) {
tmp = t_1;
} else if (y <= -9e-35) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_2;
} else if (y <= -1e-51) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / i;
} else if (y <= 3.1e+38) {
tmp = (t + (y * 230661.510616)) / (i + t_2);
} 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) :: t_2
real(8) :: tmp
t_1 = (x + (z / y)) - ((x * a) / y)
t_2 = y * ((y * ((y * (y + a)) + b)) + c)
if (y <= (-1.9d+72)) then
tmp = t_1
else if (y <= (-9d-35)) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / t_2
else if (y <= (-1d-51)) then
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0))) / i
else if (y <= 3.1d+38) then
tmp = (t + (y * 230661.510616d0)) / (i + t_2)
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 t_2 = y * ((y * ((y * (y + a)) + b)) + c);
double tmp;
if (y <= -1.9e+72) {
tmp = t_1;
} else if (y <= -9e-35) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_2;
} else if (y <= -1e-51) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / i;
} else if (y <= 3.1e+38) {
tmp = (t + (y * 230661.510616)) / (i + t_2);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + (z / y)) - ((x * a) / y) t_2 = y * ((y * ((y * (y + a)) + b)) + c) tmp = 0 if y <= -1.9e+72: tmp = t_1 elif y <= -9e-35: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_2 elif y <= -1e-51: tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / i elif y <= 3.1e+38: tmp = (t + (y * 230661.510616)) / (i + t_2) 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)) t_2 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) tmp = 0.0 if (y <= -1.9e+72) tmp = t_1; elseif (y <= -9e-35) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / t_2); elseif (y <= -1e-51) tmp = Float64(Float64(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) / i); elseif (y <= 3.1e+38) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + t_2)); 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); t_2 = y * ((y * ((y * (y + a)) + b)) + c); tmp = 0.0; if (y <= -1.9e+72) tmp = t_1; elseif (y <= -9e-35) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_2; elseif (y <= -1e-51) tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / i; elseif (y <= 3.1e+38) tmp = (t + (y * 230661.510616)) / (i + t_2); 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]}, Block[{t$95$2 = N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+72], t$95$1, If[LessEqual[y, -9e-35], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, -1e-51], N[(N[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 3.1e+38], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-35}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{t_2}\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-51}:\\
\;\;\;\;\frac{t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{i}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.90000000000000003e72 or 3.10000000000000018e38 < y Initial program 5.6%
Taylor expanded in y around inf 71.0%
if -1.90000000000000003e72 < y < -9.0000000000000002e-35Initial program 74.6%
Taylor expanded in i around 0 69.9%
Taylor expanded in y around 0 46.0%
*-commutative46.0%
Simplified46.0%
if -9.0000000000000002e-35 < y < -1e-51Initial program 99.4%
Taylor expanded in i around inf 99.4%
if -1e-51 < y < 3.10000000000000018e38Initial program 97.5%
Taylor expanded in y around 0 87.5%
*-commutative87.5%
Simplified87.5%
Final simplification77.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.6e+72) (not (<= y 2.95e+47)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.6e+72) || !(y <= 2.95e+47)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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.6d+72)) .or. (.not. (y <= 2.95d+47))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * ((y * ((y * (y + a)) + b)) + 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.6e+72) || !(y <= 2.95e+47)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.6e+72) or not (y <= 2.95e+47): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.6e+72) || !(y <= 2.95e+47)) 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(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.6e+72) || ~((y <= 2.95e+47))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.6e+72], N[Not[LessEqual[y, 2.95e+47]], $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[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+72} \lor \neg \left(y \leq 2.95 \cdot 10^{+47}\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(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -1.6000000000000001e72 or 2.95000000000000017e47 < y Initial program 4.6%
Taylor expanded in y around inf 71.7%
if -1.6000000000000001e72 < y < 2.95000000000000017e47Initial program 94.5%
Taylor expanded in y around 0 83.8%
*-commutative83.8%
Simplified83.8%
Final simplification79.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5400000.0) (not (<= y 1.08e+36))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5400000.0) || !(y <= 1.08e+36)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + 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 <= (-5400000.0d0)) .or. (.not. (y <= 1.08d+36))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * ((y * ((y * (y + a)) + b)) + 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 <= -5400000.0) || !(y <= 1.08e+36)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5400000.0) or not (y <= 1.08e+36): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5400000.0) || !(y <= 1.08e+36)) 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(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5400000.0) || ~((y <= 1.08e+36))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5400000.0], N[Not[LessEqual[y, 1.08e+36]], $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[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5400000 \lor \neg \left(y \leq 1.08 \cdot 10^{+36}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -5.4e6 or 1.08000000000000001e36 < y Initial program 13.3%
Taylor expanded in y around inf 64.2%
if -5.4e6 < y < 1.08000000000000001e36Initial program 97.6%
Taylor expanded in y around 0 85.9%
*-commutative85.9%
Simplified85.9%
Final simplification76.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (* y 230661.510616)))
(t_2 (/ t_1 i))
(t_3 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -2700000.0)
t_3
(if (<= y 2.4e-164)
t_2
(if (<= y 3.5e-71) (/ t_1 (* y c)) (if (<= y 6.3e+25) t_2 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);
double t_2 = t_1 / i;
double t_3 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -2700000.0) {
tmp = t_3;
} else if (y <= 2.4e-164) {
tmp = t_2;
} else if (y <= 3.5e-71) {
tmp = t_1 / (y * c);
} else if (y <= 6.3e+25) {
tmp = t_2;
} 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)
t_2 = t_1 / i
t_3 = (x + (z / y)) - ((x * a) / y)
if (y <= (-2700000.0d0)) then
tmp = t_3
else if (y <= 2.4d-164) then
tmp = t_2
else if (y <= 3.5d-71) then
tmp = t_1 / (y * c)
else if (y <= 6.3d+25) then
tmp = t_2
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);
double t_2 = t_1 / i;
double t_3 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -2700000.0) {
tmp = t_3;
} else if (y <= 2.4e-164) {
tmp = t_2;
} else if (y <= 3.5e-71) {
tmp = t_1 / (y * c);
} else if (y <= 6.3e+25) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t + (y * 230661.510616) t_2 = t_1 / i t_3 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -2700000.0: tmp = t_3 elif y <= 2.4e-164: tmp = t_2 elif y <= 3.5e-71: tmp = t_1 / (y * c) elif y <= 6.3e+25: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(y * 230661.510616)) t_2 = Float64(t_1 / i) t_3 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -2700000.0) tmp = t_3; elseif (y <= 2.4e-164) tmp = t_2; elseif (y <= 3.5e-71) tmp = Float64(t_1 / Float64(y * c)); elseif (y <= 6.3e+25) tmp = t_2; 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); t_2 = t_1 / i; t_3 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -2700000.0) tmp = t_3; elseif (y <= 2.4e-164) tmp = t_2; elseif (y <= 3.5e-71) tmp = t_1 / (y * c); elseif (y <= 6.3e+25) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / i), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2700000.0], t$95$3, If[LessEqual[y, 2.4e-164], t$95$2, If[LessEqual[y, 3.5e-71], N[(t$95$1 / N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.3e+25], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + y \cdot 230661.510616\\
t_2 := \frac{t_1}{i}\\
t_3 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -2700000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-164}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-71}:\\
\;\;\;\;\frac{t_1}{y \cdot c}\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{+25}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -2.7e6 or 6.29999999999999973e25 < y Initial program 16.8%
Taylor expanded in y around inf 61.2%
if -2.7e6 < y < 2.39999999999999983e-164 or 3.4999999999999999e-71 < y < 6.29999999999999973e25Initial program 98.0%
Taylor expanded in y around 0 45.6%
fma-def45.6%
associate-*r/45.6%
metadata-eval45.6%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in i around inf 64.9%
if 2.39999999999999983e-164 < y < 3.4999999999999999e-71Initial program 99.5%
Taylor expanded in y around 0 94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in c around inf 61.5%
Final simplification62.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5400000.0) (not (<= y 1.08e+36))) (- (+ 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 <= -5400000.0) || !(y <= 1.08e+36)) {
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 <= (-5400000.0d0)) .or. (.not. (y <= 1.08d+36))) 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 <= -5400000.0) || !(y <= 1.08e+36)) {
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 <= -5400000.0) or not (y <= 1.08e+36): 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 <= -5400000.0) || !(y <= 1.08e+36)) 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 <= -5400000.0) || ~((y <= 1.08e+36))) 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, -5400000.0], N[Not[LessEqual[y, 1.08e+36]], $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 -5400000 \lor \neg \left(y \leq 1.08 \cdot 10^{+36}\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 < -5.4e6 or 1.08000000000000001e36 < y Initial program 13.3%
Taylor expanded in y around inf 64.2%
if -5.4e6 < y < 1.08000000000000001e36Initial program 97.6%
Taylor expanded in y around 0 85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around 0 81.7%
*-commutative81.7%
Simplified81.7%
Final simplification73.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (* y 230661.510616))) (t_2 (/ t_1 i)))
(if (<= y -2.6e-32)
x
(if (<= y 2.4e-164)
t_2
(if (<= y 3e-69) (/ t_1 (* y c)) (if (<= y 8e+23) t_2 x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t + (y * 230661.510616);
double t_2 = t_1 / i;
double tmp;
if (y <= -2.6e-32) {
tmp = x;
} else if (y <= 2.4e-164) {
tmp = t_2;
} else if (y <= 3e-69) {
tmp = t_1 / (y * c);
} else if (y <= 8e+23) {
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 = t + (y * 230661.510616d0)
t_2 = t_1 / i
if (y <= (-2.6d-32)) then
tmp = x
else if (y <= 2.4d-164) then
tmp = t_2
else if (y <= 3d-69) then
tmp = t_1 / (y * c)
else if (y <= 8d+23) 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 = t + (y * 230661.510616);
double t_2 = t_1 / i;
double tmp;
if (y <= -2.6e-32) {
tmp = x;
} else if (y <= 2.4e-164) {
tmp = t_2;
} else if (y <= 3e-69) {
tmp = t_1 / (y * c);
} else if (y <= 8e+23) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t + (y * 230661.510616) t_2 = t_1 / i tmp = 0 if y <= -2.6e-32: tmp = x elif y <= 2.4e-164: tmp = t_2 elif y <= 3e-69: tmp = t_1 / (y * c) elif y <= 8e+23: tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(y * 230661.510616)) t_2 = Float64(t_1 / i) tmp = 0.0 if (y <= -2.6e-32) tmp = x; elseif (y <= 2.4e-164) tmp = t_2; elseif (y <= 3e-69) tmp = Float64(t_1 / Float64(y * c)); elseif (y <= 8e+23) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t + (y * 230661.510616); t_2 = t_1 / i; tmp = 0.0; if (y <= -2.6e-32) tmp = x; elseif (y <= 2.4e-164) tmp = t_2; elseif (y <= 3e-69) tmp = t_1 / (y * c); elseif (y <= 8e+23) 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[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / i), $MachinePrecision]}, If[LessEqual[y, -2.6e-32], x, If[LessEqual[y, 2.4e-164], t$95$2, If[LessEqual[y, 3e-69], N[(t$95$1 / N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+23], t$95$2, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + y \cdot 230661.510616\\
t_2 := \frac{t_1}{i}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-164}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-69}:\\
\;\;\;\;\frac{t_1}{y \cdot c}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+23}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.5999999999999997e-32 or 7.9999999999999993e23 < y Initial program 19.9%
Taylor expanded in y around inf 44.5%
if -2.5999999999999997e-32 < y < 2.39999999999999983e-164 or 2.99999999999999989e-69 < y < 7.9999999999999993e23Initial program 98.8%
Taylor expanded in y around 0 47.8%
fma-def47.8%
associate-*r/47.8%
metadata-eval47.8%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in i around inf 68.2%
if 2.39999999999999983e-164 < y < 2.99999999999999989e-69Initial program 99.5%
Taylor expanded in y around 0 94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in c around inf 61.5%
Final simplification55.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.6e-32) (not (<= y 126000000.0))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ 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 <= -2.6e-32) || !(y <= 126000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} 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 <= (-2.6d-32)) .or. (.not. (y <= 126000000.0d0))) then
tmp = (x + (z / y)) - ((x * a) / y)
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 <= -2.6e-32) || !(y <= 126000000.0)) {
tmp = (x + (z / y)) - ((x * a) / y);
} 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 <= -2.6e-32) or not (y <= 126000000.0): tmp = (x + (z / y)) - ((x * a) / y) 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 <= -2.6e-32) || !(y <= 126000000.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 * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.6e-32) || ~((y <= 126000000.0))) tmp = (x + (z / y)) - ((x * a) / y); 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, -2.6e-32], N[Not[LessEqual[y, 126000000.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 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-32} \lor \neg \left(y \leq 126000000\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -2.5999999999999997e-32 or 1.26e8 < y Initial program 20.4%
Taylor expanded in y around inf 57.7%
if -2.5999999999999997e-32 < y < 1.26e8Initial program 99.7%
Taylor expanded in y around 0 92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in y around 0 84.2%
Final simplification70.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.6e-32) x (if (<= y 2.85e+23) (/ (+ 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 <= -2.6e-32) {
tmp = x;
} else if (y <= 2.85e+23) {
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 <= (-2.6d-32)) then
tmp = x
else if (y <= 2.85d+23) 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 <= -2.6e-32) {
tmp = x;
} else if (y <= 2.85e+23) {
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 <= -2.6e-32: tmp = x elif y <= 2.85e+23: 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 <= -2.6e-32) tmp = x; elseif (y <= 2.85e+23) 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 <= -2.6e-32) tmp = x; elseif (y <= 2.85e+23) 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, -2.6e-32], x, If[LessEqual[y, 2.85e+23], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{+23}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.5999999999999997e-32 or 2.85e23 < y Initial program 19.9%
Taylor expanded in y around inf 44.5%
if -2.5999999999999997e-32 < y < 2.85e23Initial program 98.9%
Taylor expanded in y around 0 43.0%
fma-def43.0%
associate-*r/43.0%
metadata-eval43.0%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in i around inf 62.5%
Final simplification53.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -6.6e+100) x (if (<= y 7.2e+23) (/ 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 <= -6.6e+100) {
tmp = x;
} else if (y <= 7.2e+23) {
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 <= (-6.6d+100)) then
tmp = x
else if (y <= 7.2d+23) 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 <= -6.6e+100) {
tmp = x;
} else if (y <= 7.2e+23) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -6.6e+100: tmp = x elif y <= 7.2e+23: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -6.6e+100) tmp = x; elseif (y <= 7.2e+23) 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 <= -6.6e+100) tmp = x; elseif (y <= 7.2e+23) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -6.6e+100], x, If[LessEqual[y, 7.2e+23], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+100}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.6000000000000002e100 or 7.1999999999999997e23 < y Initial program 9.4%
Taylor expanded in y around inf 53.9%
if -6.6000000000000002e100 < y < 7.1999999999999997e23Initial program 93.1%
Taylor expanded in y around 0 45.2%
Final simplification48.6%
(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.7%
Taylor expanded in y around inf 23.8%
Final simplification23.8%
herbie shell --seed 2023310
(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)))