
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(if (<= (/ (+ t_2 t) t_1) INFINITY)
(+ (/ t t_1) (/ t_2 t_1))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= ((double) INFINITY)) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = (x + (z / y)) - ((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 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
double tmp;
if (((t_2 + t) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = (t / t_1) + (t_2 / t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) tmp = 0 if ((t_2 + t) / t_1) <= math.inf: tmp = (t / t_1) + (t_2 / t_1) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) tmp = 0.0 if (Float64(Float64(t_2 + t) / t_1) <= Inf) tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1)); else tmp = Float64(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 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616); tmp = 0.0; if (((t_2 + t) / t_1) <= Inf) tmp = (t / t_1) + (t_2 / t_1); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\
\mathbf{if}\;\frac{t\_2 + t}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\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) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.5%
Taylor expanded in t around 0 91.5%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 77.8%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\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) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 91.5%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 77.8%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -2.26e+48)
t_2
(if (<= y 2.4e-38)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1)
(if (<= y 4.8e+30)
(/
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
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)) + i;
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -2.26e+48) {
tmp = t_2;
} else if (y <= 2.4e-38) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 4.8e+30) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / 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)) + i
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-2.26d+48)) then
tmp = t_2
else if (y <= 2.4d-38) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
else if (y <= 4.8d+30) then
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) / 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)) + i;
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -2.26e+48) {
tmp = t_2;
} else if (y <= 2.4e-38) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 4.8e+30) {
tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / 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)) + i t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -2.26e+48: tmp = t_2 elif y <= 2.4e-38: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 elif y <= 4.8e+30: tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -2.26e+48) tmp = t_2; elseif (y <= 2.4e-38) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1); elseif (y <= 4.8e+30) tmp = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) / 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)) + i; t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -2.26e+48) tmp = t_2; elseif (y <= 2.4e-38) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; elseif (y <= 4.8e+30) tmp = (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) / 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[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.26e+48], t$95$2, If[LessEqual[y, 2.4e-38], 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, 4.8e+30], N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] / t$95$1), $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) + i\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -2.26 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.26000000000000005e48 or 4.7999999999999999e30 < y Initial program 1.3%
Taylor expanded in y around inf 76.7%
if -2.26000000000000005e48 < y < 2.40000000000000022e-38Initial program 96.0%
Taylor expanded in x around 0 93.1%
if 2.40000000000000022e-38 < y < 4.7999999999999999e30Initial program 83.8%
Taylor expanded in t around 0 72.7%
Final simplification84.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.45e+48)
t_1
(if (<= y 4.1e-19)
(/
(+ t (* y 230661.510616))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 2.2e+28)
(*
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.45e+48) {
tmp = t_1;
} else if (y <= 4.1e-19) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 2.2e+28) {
tmp = 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.45d+48)) then
tmp = t_1
else if (y <= 4.1d-19) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 2.2d+28) then
tmp = 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.45e+48) {
tmp = t_1;
} else if (y <= 4.1e-19) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 2.2e+28) {
tmp = 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.45e+48: tmp = t_1 elif y <= 4.1e-19: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 2.2e+28: tmp = 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.45e+48) tmp = t_1; elseif (y <= 4.1e-19) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 2.2e+28) tmp = Float64(y * Float64(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.45e+48) tmp = t_1; elseif (y <= 4.1e-19) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 2.2e+28) tmp = 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.45e+48], t$95$1, If[LessEqual[y, 4.1e-19], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+28], N[(y * N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $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.45 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-19}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+28}:\\
\;\;\;\;y \cdot \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.4499999999999999e48 or 2.19999999999999986e28 < y Initial program 2.2%
Taylor expanded in y around inf 76.1%
if -1.4499999999999999e48 < y < 4.09999999999999985e-19Initial program 96.0%
Taylor expanded in y around 0 84.7%
*-commutative78.6%
Simplified84.7%
if 4.09999999999999985e-19 < y < 2.19999999999999986e28Initial program 81.1%
Taylor expanded in y around 0 56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in t around inf 48.1%
Taylor expanded in t around 0 52.0%
associate-/l*52.2%
Simplified52.2%
Final simplification79.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -3.3e+48)
t_1
(if (<= y 1.76e-22)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 7.4e+24)
(*
y
(/
(+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)
(+ i (* y (+ c (* y b))))))
(if (<= y 3.2e+88) (* y (+ (/ z b) (* x (/ 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 <= -3.3e+48) {
tmp = t_1;
} else if (y <= 1.76e-22) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 7.4e+24) {
tmp = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
} else if (y <= 3.2e+88) {
tmp = y * ((z / b) + (x * (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 <= (-3.3d+48)) then
tmp = t_1
else if (y <= 1.76d-22) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 7.4d+24) then
tmp = y * (((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0) / (i + (y * (c + (y * b)))))
else if (y <= 3.2d+88) then
tmp = y * ((z / b) + (x * (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 <= -3.3e+48) {
tmp = t_1;
} else if (y <= 1.76e-22) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 7.4e+24) {
tmp = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
} else if (y <= 3.2e+88) {
tmp = y * ((z / b) + (x * (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 <= -3.3e+48: tmp = t_1 elif y <= 1.76e-22: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 7.4e+24: tmp = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))) elif y <= 3.2e+88: tmp = y * ((z / b) + (x * (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 <= -3.3e+48) tmp = t_1; elseif (y <= 1.76e-22) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 7.4e+24) tmp = Float64(y * Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616) / Float64(i + Float64(y * Float64(c + Float64(y * b)))))); elseif (y <= 3.2e+88) tmp = Float64(y * Float64(Float64(z / b) + Float64(x * 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 <= -3.3e+48) tmp = t_1; elseif (y <= 1.76e-22) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 7.4e+24) tmp = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))); elseif (y <= 3.2e+88) tmp = y * ((z / b) + (x * (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, -3.3e+48], t$95$1, If[LessEqual[y, 1.76e-22], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.4e+24], N[(y * N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+88], N[(y * N[(N[(z / b), $MachinePrecision] + N[(x * N[(y / b), $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 -3.3 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.76 \cdot 10^{-22}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+88}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + x \cdot \frac{y}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.30000000000000023e48 or 3.1999999999999999e88 < y Initial program 1.2%
Taylor expanded in y around inf 81.4%
if -3.30000000000000023e48 < y < 1.76e-22Initial program 96.0%
Taylor expanded in y around 0 85.2%
*-commutative79.0%
Simplified85.2%
if 1.76e-22 < y < 7.39999999999999998e24Initial program 79.4%
Taylor expanded in y around 0 61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in t around inf 52.6%
Taylor expanded in t around 0 56.9%
associate-/l*57.0%
Simplified57.0%
if 7.39999999999999998e24 < y < 3.1999999999999999e88Initial program 22.3%
Taylor expanded in b around inf 3.3%
Taylor expanded in y around inf 13.2%
Taylor expanded in y around 0 32.0%
associate-/l*32.2%
Simplified32.2%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.62e+48) (not (<= y 4.8e+30)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.62e+48) || !(y <= 4.8e+30)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.62d+48)) .or. (.not. (y <= 4.8d+30))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.62e+48) || !(y <= 4.8e+30)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.62e+48) or not (y <= 4.8e+30): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.62e+48) || !(y <= 4.8e+30)) 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(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.62e+48) || ~((y <= 4.8e+30))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.62e+48], N[Not[LessEqual[y, 4.8e+30]], $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[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+48} \lor \neg \left(y \leq 4.8 \cdot 10^{+30}\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)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.61999999999999989e48 or 4.7999999999999999e30 < y Initial program 1.3%
Taylor expanded in y around inf 76.7%
if -1.61999999999999989e48 < y < 4.7999999999999999e30Initial program 94.9%
Taylor expanded in x around 0 88.4%
Final simplification83.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.55e+48) (not (<= y 1.65e+28)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)) 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 <= -1.55e+48) || !(y <= 1.65e+28)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + 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 <= (-1.55d+48)) .or. (.not. (y <= 1.65d+28))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + 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 <= -1.55e+48) || !(y <= 1.65e+28)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.55e+48) or not (y <= 1.65e+28): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.55e+48) || !(y <= 1.65e+28)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + 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 <= -1.55e+48) || ~((y <= 1.65e+28))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.55e+48], N[Not[LessEqual[y, 1.65e+28]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+48} \lor \neg \left(y \leq 1.65 \cdot 10^{+28}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.55000000000000003e48 or 1.65e28 < y Initial program 2.2%
Taylor expanded in y around inf 76.1%
if -1.55000000000000003e48 < y < 1.65e28Initial program 94.9%
Taylor expanded in y around 0 84.0%
*-commutative84.0%
Simplified84.0%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y c)))) (t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -0.21)
t_2
(if (<= y 5.6e-212)
t_1
(if (<= y 1.9e-94)
(* t (/ (+ 1.0 (/ (* y 230661.510616) t)) i))
(if (<= y 1.3e+22) 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 = t / (i + (y * c));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -0.21) {
tmp = t_2;
} else if (y <= 5.6e-212) {
tmp = t_1;
} else if (y <= 1.9e-94) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 1.3e+22) {
tmp = 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 = t / (i + (y * c))
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-0.21d0)) then
tmp = t_2
else if (y <= 5.6d-212) then
tmp = t_1
else if (y <= 1.9d-94) then
tmp = t * ((1.0d0 + ((y * 230661.510616d0) / t)) / i)
else if (y <= 1.3d+22) then
tmp = 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 = t / (i + (y * c));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -0.21) {
tmp = t_2;
} else if (y <= 5.6e-212) {
tmp = t_1;
} else if (y <= 1.9e-94) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 1.3e+22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * c)) t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -0.21: tmp = t_2 elif y <= 5.6e-212: tmp = t_1 elif y <= 1.9e-94: tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i) elif y <= 1.3e+22: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * c))) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -0.21) tmp = t_2; elseif (y <= 5.6e-212) tmp = t_1; elseif (y <= 1.9e-94) tmp = Float64(t * Float64(Float64(1.0 + Float64(Float64(y * 230661.510616) / t)) / i)); elseif (y <= 1.3e+22) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * c)); t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -0.21) tmp = t_2; elseif (y <= 5.6e-212) tmp = t_1; elseif (y <= 1.9e-94) tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i); elseif (y <= 1.3e+22) tmp = 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[(t / N[(i + N[(y * c), $MachinePrecision]), $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, -0.21], t$95$2, If[LessEqual[y, 5.6e-212], t$95$1, If[LessEqual[y, 1.9e-94], N[(t * N[(N[(1.0 + N[(N[(y * 230661.510616), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+22], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot c}\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -0.21:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-94}:\\
\;\;\;\;t \cdot \frac{1 + \frac{y \cdot 230661.510616}{t}}{i}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -0.209999999999999992 or 1.3e22 < y Initial program 7.0%
Taylor expanded in y around inf 70.1%
if -0.209999999999999992 < y < 5.60000000000000027e-212 or 1.9e-94 < y < 1.3e22Initial program 97.7%
Taylor expanded in y around 0 88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in t around inf 83.6%
Taylor expanded in b around 0 76.4%
Taylor expanded in t around inf 60.1%
if 5.60000000000000027e-212 < y < 1.9e-94Initial program 99.7%
Taylor expanded in y around 0 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 80.3%
Taylor expanded in y around 0 68.5%
Taylor expanded in i around inf 78.5%
associate-/l*74.5%
associate-*r/74.4%
Simplified74.4%
Final simplification66.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y (+ c (* y b))))))
(t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.45e+48)
t_2
(if (<= y 6.4e-208)
t_1
(if (<= y 8.8e-77)
(* t (/ (+ 1.0 (/ (* y 230661.510616) t)) i))
(if (<= y 2.6e+23) 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 = t / (i + (y * (c + (y * b))));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.45e+48) {
tmp = t_2;
} else if (y <= 6.4e-208) {
tmp = t_1;
} else if (y <= 8.8e-77) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 2.6e+23) {
tmp = 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 = t / (i + (y * (c + (y * b))))
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.45d+48)) then
tmp = t_2
else if (y <= 6.4d-208) then
tmp = t_1
else if (y <= 8.8d-77) then
tmp = t * ((1.0d0 + ((y * 230661.510616d0) / t)) / i)
else if (y <= 2.6d+23) then
tmp = 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 = t / (i + (y * (c + (y * b))));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.45e+48) {
tmp = t_2;
} else if (y <= 6.4e-208) {
tmp = t_1;
} else if (y <= 8.8e-77) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 2.6e+23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * (c + (y * b)))) t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.45e+48: tmp = t_2 elif y <= 6.4e-208: tmp = t_1 elif y <= 8.8e-77: tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i) elif y <= 2.6e+23: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.45e+48) tmp = t_2; elseif (y <= 6.4e-208) tmp = t_1; elseif (y <= 8.8e-77) tmp = Float64(t * Float64(Float64(1.0 + Float64(Float64(y * 230661.510616) / t)) / i)); elseif (y <= 2.6e+23) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * (c + (y * b)))); t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.45e+48) tmp = t_2; elseif (y <= 6.4e-208) tmp = t_1; elseif (y <= 8.8e-77) tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i); elseif (y <= 2.6e+23) tmp = 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[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.45e+48], t$95$2, If[LessEqual[y, 6.4e-208], t$95$1, If[LessEqual[y, 8.8e-77], N[(t * N[(N[(1.0 + N[(N[(y * 230661.510616), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+23], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-77}:\\
\;\;\;\;t \cdot \frac{1 + \frac{y \cdot 230661.510616}{t}}{i}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.4499999999999999e48 or 2.59999999999999992e23 < y Initial program 3.0%
Taylor expanded in y around inf 75.4%
if -1.4499999999999999e48 < y < 6.4000000000000003e-208 or 8.80000000000000028e-77 < y < 2.59999999999999992e23Initial program 93.6%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in t around inf 59.1%
if 6.4000000000000003e-208 < y < 8.80000000000000028e-77Initial program 99.6%
Taylor expanded in y around 0 94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in t around inf 83.4%
Taylor expanded in y around 0 61.1%
Taylor expanded in i around inf 69.5%
associate-/l*66.2%
associate-*r/66.1%
Simplified66.1%
Final simplification67.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y (+ c (* y b))))))
(t_2 (- (+ x (/ z y)) (/ (* x a) y))))
(if (<= y -1.45e+48)
t_2
(if (<= y 1.45e-206)
t_1
(if (<= y 5.3e-76)
(/ (* t (+ 1.0 (* 230661.510616 (/ y t)))) i)
(if (<= y 2.05e+27) 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 = t / (i + (y * (c + (y * b))));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.45e+48) {
tmp = t_2;
} else if (y <= 1.45e-206) {
tmp = t_1;
} else if (y <= 5.3e-76) {
tmp = (t * (1.0 + (230661.510616 * (y / t)))) / i;
} else if (y <= 2.05e+27) {
tmp = 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 = t / (i + (y * (c + (y * b))))
t_2 = (x + (z / y)) - ((x * a) / y)
if (y <= (-1.45d+48)) then
tmp = t_2
else if (y <= 1.45d-206) then
tmp = t_1
else if (y <= 5.3d-76) then
tmp = (t * (1.0d0 + (230661.510616d0 * (y / t)))) / i
else if (y <= 2.05d+27) then
tmp = 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 = t / (i + (y * (c + (y * b))));
double t_2 = (x + (z / y)) - ((x * a) / y);
double tmp;
if (y <= -1.45e+48) {
tmp = t_2;
} else if (y <= 1.45e-206) {
tmp = t_1;
} else if (y <= 5.3e-76) {
tmp = (t * (1.0 + (230661.510616 * (y / t)))) / i;
} else if (y <= 2.05e+27) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * (c + (y * b)))) t_2 = (x + (z / y)) - ((x * a) / y) tmp = 0 if y <= -1.45e+48: tmp = t_2 elif y <= 1.45e-206: tmp = t_1 elif y <= 5.3e-76: tmp = (t * (1.0 + (230661.510616 * (y / t)))) / i elif y <= 2.05e+27: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))) t_2 = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.45e+48) tmp = t_2; elseif (y <= 1.45e-206) tmp = t_1; elseif (y <= 5.3e-76) tmp = Float64(Float64(t * Float64(1.0 + Float64(230661.510616 * Float64(y / t)))) / i); elseif (y <= 2.05e+27) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * (c + (y * b)))); t_2 = (x + (z / y)) - ((x * a) / y); tmp = 0.0; if (y <= -1.45e+48) tmp = t_2; elseif (y <= 1.45e-206) tmp = t_1; elseif (y <= 5.3e-76) tmp = (t * (1.0 + (230661.510616 * (y / t)))) / i; elseif (y <= 2.05e+27) tmp = 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[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.45e+48], t$95$2, If[LessEqual[y, 1.45e-206], t$95$1, If[LessEqual[y, 5.3e-76], N[(N[(t * N[(1.0 + N[(230661.510616 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 2.05e+27], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := \left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-76}:\\
\;\;\;\;\frac{t \cdot \left(1 + 230661.510616 \cdot \frac{y}{t}\right)}{i}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.4499999999999999e48 or 2.0500000000000001e27 < y Initial program 3.0%
Taylor expanded in y around inf 75.4%
if -1.4499999999999999e48 < y < 1.4500000000000001e-206 or 5.3e-76 < y < 2.0500000000000001e27Initial program 93.6%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in t around inf 59.1%
if 1.4500000000000001e-206 < y < 5.3e-76Initial program 99.6%
Taylor expanded in y around 0 94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in t around inf 83.4%
Taylor expanded in y around 0 61.1%
Taylor expanded in i around inf 69.5%
Final simplification67.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6e+48) (not (<= y 2.5e+29))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6e+48) || !(y <= 2.5e+29)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-6d+48)) .or. (.not. (y <= 2.5d+29))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6e+48) || !(y <= 2.5e+29)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6e+48) or not (y <= 2.5e+29): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6e+48) || !(y <= 2.5e+29)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -6e+48) || ~((y <= 2.5e+29))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6e+48], N[Not[LessEqual[y, 2.5e+29]], $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[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+48} \lor \neg \left(y \leq 2.5 \cdot 10^{+29}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -5.9999999999999999e48 or 2.5e29 < y Initial program 1.3%
Taylor expanded in y around inf 76.7%
if -5.9999999999999999e48 < y < 2.5e29Initial program 94.9%
Taylor expanded in y around 0 78.8%
*-commutative72.6%
Simplified78.8%
Final simplification77.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.45e+48) (not (<= y 2.2e+26)))
(- (+ 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 <= -1.45e+48) || !(y <= 2.2e+26)) {
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 <= (-1.45d+48)) .or. (.not. (y <= 2.2d+26))) 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 <= -1.45e+48) || !(y <= 2.2e+26)) {
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 <= -1.45e+48) or not (y <= 2.2e+26): 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 <= -1.45e+48) || !(y <= 2.2e+26)) 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 <= -1.45e+48) || ~((y <= 2.2e+26))) 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, -1.45e+48], N[Not[LessEqual[y, 2.2e+26]], $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 -1.45 \cdot 10^{+48} \lor \neg \left(y \leq 2.2 \cdot 10^{+26}\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 < -1.4499999999999999e48 or 2.20000000000000007e26 < y Initial program 3.0%
Taylor expanded in y around inf 75.4%
if -1.4499999999999999e48 < y < 2.20000000000000007e26Initial program 94.8%
Taylor expanded in y around 0 84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in y around 0 74.4%
*-commutative74.4%
Simplified74.4%
Final simplification74.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y c)))))
(if (<= y -2.3e-15)
x
(if (<= y 3.4e-206)
t_1
(if (<= y 9.5e-95)
(* t (/ (+ 1.0 (/ (* y 230661.510616) t)) i))
(if (<= y 2.4e-38) t_1 x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t / (i + (y * c));
double tmp;
if (y <= -2.3e-15) {
tmp = x;
} else if (y <= 3.4e-206) {
tmp = t_1;
} else if (y <= 9.5e-95) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 2.4e-38) {
tmp = t_1;
} 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) :: tmp
t_1 = t / (i + (y * c))
if (y <= (-2.3d-15)) then
tmp = x
else if (y <= 3.4d-206) then
tmp = t_1
else if (y <= 9.5d-95) then
tmp = t * ((1.0d0 + ((y * 230661.510616d0) / t)) / i)
else if (y <= 2.4d-38) then
tmp = t_1
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 / (i + (y * c));
double tmp;
if (y <= -2.3e-15) {
tmp = x;
} else if (y <= 3.4e-206) {
tmp = t_1;
} else if (y <= 9.5e-95) {
tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i);
} else if (y <= 2.4e-38) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * c)) tmp = 0 if y <= -2.3e-15: tmp = x elif y <= 3.4e-206: tmp = t_1 elif y <= 9.5e-95: tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i) elif y <= 2.4e-38: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * c))) tmp = 0.0 if (y <= -2.3e-15) tmp = x; elseif (y <= 3.4e-206) tmp = t_1; elseif (y <= 9.5e-95) tmp = Float64(t * Float64(Float64(1.0 + Float64(Float64(y * 230661.510616) / t)) / i)); elseif (y <= 2.4e-38) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * c)); tmp = 0.0; if (y <= -2.3e-15) tmp = x; elseif (y <= 3.4e-206) tmp = t_1; elseif (y <= 9.5e-95) tmp = t * ((1.0 + ((y * 230661.510616) / t)) / i); elseif (y <= 2.4e-38) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e-15], x, If[LessEqual[y, 3.4e-206], t$95$1, If[LessEqual[y, 9.5e-95], N[(t * N[(N[(1.0 + N[(N[(y * 230661.510616), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-38], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot c}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-95}:\\
\;\;\;\;t \cdot \frac{1 + \frac{y \cdot 230661.510616}{t}}{i}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.2999999999999999e-15 or 2.40000000000000022e-38 < y Initial program 15.5%
Taylor expanded in y around inf 50.7%
if -2.2999999999999999e-15 < y < 3.39999999999999985e-206 or 9.49999999999999998e-95 < y < 2.40000000000000022e-38Initial program 99.7%
Taylor expanded in y around 0 92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in t around inf 89.6%
Taylor expanded in b around 0 85.4%
Taylor expanded in t around inf 69.3%
if 3.39999999999999985e-206 < y < 9.49999999999999998e-95Initial program 99.7%
Taylor expanded in y around 0 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 80.3%
Taylor expanded in y around 0 68.5%
Taylor expanded in i around inf 78.5%
associate-/l*74.5%
associate-*r/74.4%
Simplified74.4%
Final simplification59.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.5e+48) (not (<= y 7.2e+24))) (- (+ 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 <= -1.5e+48) || !(y <= 7.2e+24)) {
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 <= (-1.5d+48)) .or. (.not. (y <= 7.2d+24))) 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 <= -1.5e+48) || !(y <= 7.2e+24)) {
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 <= -1.5e+48) or not (y <= 7.2e+24): 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 <= -1.5e+48) || !(y <= 7.2e+24)) 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 <= -1.5e+48) || ~((y <= 7.2e+24))) 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, -1.5e+48], N[Not[LessEqual[y, 7.2e+24]], $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 -1.5 \cdot 10^{+48} \lor \neg \left(y \leq 7.2 \cdot 10^{+24}\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 < -1.5e48 or 7.19999999999999966e24 < y Initial program 3.0%
Taylor expanded in y around inf 75.4%
if -1.5e48 < y < 7.19999999999999966e24Initial program 94.8%
Taylor expanded in y around 0 84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in y around 0 73.6%
*-commutative73.6%
Simplified73.6%
Final simplification74.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3e-15) x (if (<= y 2.4e-38) (/ t (+ i (* y c))) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3e-15) {
tmp = x;
} else if (y <= 2.4e-38) {
tmp = t / (i + (y * c));
} 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 <= (-3d-15)) then
tmp = x
else if (y <= 2.4d-38) then
tmp = t / (i + (y * c))
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 <= -3e-15) {
tmp = x;
} else if (y <= 2.4e-38) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3e-15: tmp = x elif y <= 2.4e-38: tmp = t / (i + (y * c)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3e-15) tmp = x; elseif (y <= 2.4e-38) tmp = Float64(t / Float64(i + Float64(y * c))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3e-15) tmp = x; elseif (y <= 2.4e-38) tmp = t / (i + (y * c)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3e-15], x, If[LessEqual[y, 2.4e-38], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3e-15 or 2.40000000000000022e-38 < y Initial program 15.5%
Taylor expanded in y around inf 50.7%
if -3e-15 < y < 2.40000000000000022e-38Initial program 99.7%
Taylor expanded in y around 0 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in t around inf 87.6%
Taylor expanded in b around 0 83.4%
Taylor expanded in t around inf 66.8%
Final simplification58.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.9e-15) x (if (<= y 2.4e-38) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.9e-15) {
tmp = x;
} else if (y <= 2.4e-38) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2.9d-15)) then
tmp = x
else if (y <= 2.4d-38) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.9e-15) {
tmp = x;
} else if (y <= 2.4e-38) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.9e-15: tmp = x elif y <= 2.4e-38: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.9e-15) tmp = x; elseif (y <= 2.4e-38) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.9e-15) tmp = x; elseif (y <= 2.4e-38) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.9e-15], x, If[LessEqual[y, 2.4e-38], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.90000000000000019e-15 or 2.40000000000000022e-38 < y Initial program 15.5%
Taylor expanded in y around inf 50.7%
if -2.90000000000000019e-15 < y < 2.40000000000000022e-38Initial program 99.7%
Taylor expanded in y around 0 54.0%
Final simplification52.2%
(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.0%
Taylor expanded in y around inf 29.0%
Final simplification29.0%
herbie shell --seed 2024059
(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)))