
(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
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 1e+289) t_1 (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 1e+289) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
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 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
if (t_1 <= 1d+289) then
tmp = t_1
else
tmp = x + ((z / y) - (a * (x / y)))
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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= 1e+289) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= 1e+289: tmp = t_1 else: tmp = x + ((z / y) - (a * (x / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(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 <= 1e+289) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((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 <= 1e+289) tmp = t_1; else tmp = x + ((z / y) - (a * (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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, 1e+289], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{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 10^{+289}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 1.0000000000000001e289Initial program 95.7%
if 1.0000000000000001e289 < (/.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 3.4%
Taylor expanded in y around inf 65.5%
associate--l+65.5%
associate-/l*71.6%
Simplified71.6%
Final simplification86.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.95e+50) (not (<= y 1.1e+47)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)) t)
(+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.95e+50) || !(y <= 1.1e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.95d+50)) .or. (.not. (y <= 1.1d+47))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.95e+50) || !(y <= 1.1e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.95e+50) or not (y <= 1.1e+47): tmp = x + ((z / y) - (a * (x / y))) else: tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.95e+50) || !(y <= 1.1e+47)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / 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 * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.95e+50) || ~((y <= 1.1e+47))) tmp = x + ((z / y) - (a * (x / y))); else tmp = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.95e+50], N[Not[LessEqual[y, 1.1e+47]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $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 * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{+50} \lor \neg \left(y \leq 1.1 \cdot 10^{+47}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\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 \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -2.9499999999999999e50 or 1.1e47 < y Initial program 3.6%
Taylor expanded in y around inf 66.1%
associate--l+66.1%
associate-/l*72.4%
Simplified72.4%
if -2.9499999999999999e50 < y < 1.1e47Initial program 94.4%
Taylor expanded in y around 0 92.5%
*-commutative92.5%
Simplified92.5%
Final simplification85.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -5.5e+73)
t_1
(if (<= y 1.15e+26)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -5.5e+73) {
tmp = t_1;
} else if (y <= 1.15e+26) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-5.5d+73)) then
tmp = t_1
else if (y <= 1.15d+26) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -5.5e+73) {
tmp = t_1;
} else if (y <= 1.15e+26) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -5.5e+73: tmp = t_1 elif y <= 1.15e+26: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -5.5e+73) tmp = t_1; elseif (y <= 1.15e+26) 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)); elseif (y <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -5.5e+73) tmp = t_1; elseif (y <= 1.15e+26) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+73], t$95$1, If[LessEqual[y, 1.15e+26], 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], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+26}:\\
\;\;\;\;\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}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.5000000000000003e73 or 6.20000000000000033e104 < y Initial program 1.4%
Taylor expanded in y around inf 72.3%
associate--l+72.3%
associate-/l*79.4%
Simplified79.4%
if -5.5000000000000003e73 < y < 1.15e26Initial program 96.1%
Taylor expanded in x around 0 91.8%
if 1.15e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification85.6%
(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) (* a (/ x y))))))
(if (<= y -5.5e+73)
t_2
(if (<= y -1.3e-40)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) t_1)
(if (<= y 1.1e+26)
(/ (+ t (* y 230661.510616)) (+ t_1 i))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 b)))
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) - (a * (x / y)));
double tmp;
if (y <= -5.5e+73) {
tmp = t_2;
} else if (y <= -1.3e-40) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.1e+26) {
tmp = (t + (y * 230661.510616)) / (t_1 + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} 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) - (a * (x / y)))
if (y <= (-5.5d+73)) then
tmp = t_2
else if (y <= (-1.3d-40)) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / t_1
else if (y <= 1.1d+26) then
tmp = (t + (y * 230661.510616d0)) / (t_1 + i)
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / b))
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) - (a * (x / y)));
double tmp;
if (y <= -5.5e+73) {
tmp = t_2;
} else if (y <= -1.3e-40) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else if (y <= 1.1e+26) {
tmp = (t + (y * 230661.510616)) / (t_1 + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} 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) - (a * (x / y))) tmp = 0 if y <= -5.5e+73: tmp = t_2 elif y <= -1.3e-40: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 elif y <= 1.1e+26: tmp = (t + (y * 230661.510616)) / (t_1 + i) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) 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(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -5.5e+73) tmp = t_2; elseif (y <= -1.3e-40) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / t_1); elseif (y <= 1.1e+26) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(t_1 + i)); elseif (y <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / b))); 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) - (a * (x / y))); tmp = 0.0; if (y <= -5.5e+73) tmp = t_2; elseif (y <= -1.3e-40) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; elseif (y <= 1.1e+26) tmp = (t + (y * 230661.510616)) / (t_1 + i); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+73], t$95$2, If[LessEqual[y, -1.3e-40], 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.1e+26], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $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 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-40}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+26}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{t\_1 + i}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.5000000000000003e73 or 6.20000000000000033e104 < y Initial program 1.4%
Taylor expanded in y around inf 72.3%
associate--l+72.3%
associate-/l*79.4%
Simplified79.4%
if -5.5000000000000003e73 < y < -1.3000000000000001e-40Initial program 81.7%
Taylor expanded in x around 0 65.8%
Taylor expanded in i around 0 54.9%
if -1.3000000000000001e-40 < y < 1.10000000000000004e26Initial program 99.0%
Taylor expanded in y around 0 91.5%
*-commutative91.5%
Simplified91.5%
if 1.10000000000000004e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification81.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -6e+47)
t_1
(if (<= y 7.5e+26)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y a)))))))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -6e+47) {
tmp = t_1;
} else if (y <= 7.5e+26) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-6d+47)) then
tmp = t_1
else if (y <= 7.5d+26) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))))
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -6e+47) {
tmp = t_1;
} else if (y <= 7.5e+26) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -6e+47: tmp = t_1 elif y <= 7.5e+26: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -6e+47) tmp = t_1; elseif (y <= 7.5e+26) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); elseif (y <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -6e+47) tmp = t_1; elseif (y <= 7.5e+26) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+47], t$95$1, If[LessEqual[y, 7.5e+26], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.0000000000000003e47 or 6.20000000000000033e104 < y Initial program 3.7%
Taylor expanded in y around inf 69.4%
associate--l+69.4%
associate-/l*76.2%
Simplified76.2%
if -6.0000000000000003e47 < y < 7.49999999999999941e26Initial program 97.9%
Taylor expanded in y around 0 95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in x around 0 91.4%
if 7.49999999999999941e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification84.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.4e+19)
t_1
(if (<= y 4.6e+26)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -2.4e+19) {
tmp = t_1;
} else if (y <= 4.6e+26) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-2.4d+19)) then
tmp = t_1
else if (y <= 4.6d+26) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -2.4e+19) {
tmp = t_1;
} else if (y <= 4.6e+26) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.4e+19: tmp = t_1 elif y <= 4.6e+26: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.4e+19) tmp = t_1; elseif (y <= 4.6e+26) 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 <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -2.4e+19) tmp = t_1; elseif (y <= 4.6e+26) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+19], t$95$1, If[LessEqual[y, 4.6e+26], 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, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+26}:\\
\;\;\;\;\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 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.4e19 or 6.20000000000000033e104 < y Initial program 6.9%
Taylor expanded in y around inf 66.8%
associate--l+66.8%
associate-/l*73.1%
Simplified73.1%
if -2.4e19 < y < 4.6000000000000001e26Initial program 99.1%
Taylor expanded in y around 0 86.4%
*-commutative86.4%
Simplified86.4%
if 4.6000000000000001e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.4e+19)
t_1
(if (<= y 2.4e+26)
(/
(+ t (* y 230661.510616))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -2.4e+19) {
tmp = t_1;
} else if (y <= 2.4e+26) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-2.4d+19)) then
tmp = t_1
else if (y <= 2.4d+26) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -2.4e+19) {
tmp = t_1;
} else if (y <= 2.4e+26) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.4e+19: tmp = t_1 elif y <= 2.4e+26: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.4e+19) tmp = t_1; elseif (y <= 2.4e+26) 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 <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -2.4e+19) tmp = t_1; elseif (y <= 2.4e+26) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+19], t$95$1, If[LessEqual[y, 2.4e+26], 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, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+26}:\\
\;\;\;\;\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 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.4e19 or 6.20000000000000033e104 < y Initial program 6.9%
Taylor expanded in y around inf 66.8%
associate--l+66.8%
associate-/l*73.1%
Simplified73.1%
if -2.4e19 < y < 2.40000000000000005e26Initial program 99.1%
Taylor expanded in y around 0 85.7%
*-commutative85.7%
Simplified85.7%
if 2.40000000000000005e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification79.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.3e+19)
t_1
(if (<= y 2e+26)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y a)))))))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -2.3e+19) {
tmp = t_1;
} else if (y <= 2e+26) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-2.3d+19)) then
tmp = t_1
else if (y <= 2d+26) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * a))))))
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -2.3e+19) {
tmp = t_1;
} else if (y <= 2e+26) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.3e+19: tmp = t_1 elif y <= 2e+26: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.3e+19) tmp = t_1; elseif (y <= 2e+26) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); elseif (y <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -2.3e+19) tmp = t_1; elseif (y <= 2e+26) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e+19], t$95$1, If[LessEqual[y, 2e+26], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+26}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.3e19 or 6.20000000000000033e104 < y Initial program 6.9%
Taylor expanded in y around inf 66.8%
associate--l+66.8%
associate-/l*73.1%
Simplified73.1%
if -2.3e19 < y < 2.0000000000000001e26Initial program 99.1%
Taylor expanded in y around 0 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in y around 0 84.4%
*-commutative85.7%
Simplified84.4%
if 2.0000000000000001e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification78.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -5000000000.0)
t_1
(if (<= y 1.25e+26)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
(if (<= y 6.2e+104)
(+ (* y (+ (/ z b) (/ (* x y) b))) (* 27464.7644705 (/ 1.0 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) - (a * (x / y)));
double tmp;
if (y <= -5000000000.0) {
tmp = t_1;
} else if (y <= 1.25e+26) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / 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) - (a * (x / y)))
if (y <= (-5000000000.0d0)) then
tmp = t_1
else if (y <= 1.25d+26) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
else if (y <= 6.2d+104) then
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705d0 * (1.0d0 / 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) - (a * (x / y)));
double tmp;
if (y <= -5000000000.0) {
tmp = t_1;
} else if (y <= 1.25e+26) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else if (y <= 6.2e+104) {
tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -5000000000.0: tmp = t_1 elif y <= 1.25e+26: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) elif y <= 6.2e+104: tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -5000000000.0) tmp = t_1; elseif (y <= 1.25e+26) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); elseif (y <= 6.2e+104) tmp = Float64(Float64(y * Float64(Float64(z / b) + Float64(Float64(x * y) / b))) + Float64(27464.7644705 * Float64(1.0 / 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) - (a * (x / y))); tmp = 0.0; if (y <= -5000000000.0) tmp = t_1; elseif (y <= 1.25e+26) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); elseif (y <= 6.2e+104) tmp = (y * ((z / b) + ((x * y) / b))) + (27464.7644705 * (1.0 / b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5000000000.0], t$95$1, If[LessEqual[y, 1.25e+26], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+104], N[(N[(y * N[(N[(z / b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(27464.7644705 * N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+26}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(\frac{z}{b} + \frac{x \cdot y}{b}\right) + 27464.7644705 \cdot \frac{1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5e9 or 6.20000000000000033e104 < y Initial program 9.8%
Taylor expanded in y around inf 64.9%
associate--l+64.9%
associate-/l*71.1%
Simplified71.1%
if -5e9 < y < 1.25e26Initial program 99.1%
Taylor expanded in y around 0 90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in y around 0 81.6%
*-commutative86.7%
Simplified81.6%
if 1.25e26 < y < 6.20000000000000033e104Initial program 16.7%
Taylor expanded in b around inf 9.9%
Taylor expanded in y around -inf 51.6%
Taylor expanded in y around 0 49.7%
Final simplification76.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5000000000.0) (not (<= y 3.55e+21))) (+ x (- (/ z y) (* a (/ x 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 <= -5000000000.0) || !(y <= 3.55e+21)) {
tmp = x + ((z / y) - (a * (x / 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 <= (-5000000000.0d0)) .or. (.not. (y <= 3.55d+21))) then
tmp = x + ((z / y) - (a * (x / 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 <= -5000000000.0) || !(y <= 3.55e+21)) {
tmp = x + ((z / y) - (a * (x / 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 <= -5000000000.0) or not (y <= 3.55e+21): tmp = x + ((z / y) - (a * (x / 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 <= -5000000000.0) || !(y <= 3.55e+21)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5000000000.0) || ~((y <= 3.55e+21))) tmp = x + ((z / y) - (a * (x / 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, -5000000000.0], N[Not[LessEqual[y, 3.55e+21]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5000000000 \lor \neg \left(y \leq 3.55 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -5e9 or 3.55e21 < y Initial program 11.5%
Taylor expanded in y around inf 58.0%
associate--l+58.0%
associate-/l*63.3%
Simplified63.3%
if -5e9 < y < 3.55e21Initial program 99.1%
Taylor expanded in y around 0 90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 82.2%
*-commutative87.3%
Simplified82.2%
Final simplification74.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.35e+19) (not (<= y 6.9e+25))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.35e+19) || !(y <= 6.9e+25)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.35d+19)) .or. (.not. (y <= 6.9d+25))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.35e+19) || !(y <= 6.9e+25)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.35e+19) or not (y <= 6.9e+25): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.35e+19) || !(y <= 6.9e+25)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.35e+19) || ~((y <= 6.9e+25))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.35e+19], N[Not[LessEqual[y, 6.9e+25]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+19} \lor \neg \left(y \leq 6.9 \cdot 10^{+25}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -2.35e19 or 6.8999999999999998e25 < y Initial program 9.0%
Taylor expanded in y around inf 59.4%
associate--l+59.4%
associate-/l*64.8%
Simplified64.8%
if -2.35e19 < y < 6.8999999999999998e25Initial program 99.1%
Taylor expanded in y around 0 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in t around inf 69.7%
Final simplification67.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -820000000.0) (not (<= y 2.05e+25))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -820000000.0) || !(y <= 2.05e+25)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-820000000.0d0)) .or. (.not. (y <= 2.05d+25))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -820000000.0) || !(y <= 2.05e+25)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -820000000.0) or not (y <= 2.05e+25): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -820000000.0) || !(y <= 2.05e+25)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -820000000.0) || ~((y <= 2.05e+25))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -820000000.0], N[Not[LessEqual[y, 2.05e+25]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -820000000 \lor \neg \left(y \leq 2.05 \cdot 10^{+25}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -8.2e8 or 2.04999999999999983e25 < y Initial program 11.5%
Taylor expanded in y around inf 58.0%
associate--l+58.0%
associate-/l*63.3%
Simplified63.3%
if -8.2e8 < y < 2.04999999999999983e25Initial program 99.1%
Taylor expanded in y around 0 90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in t around inf 67.4%
Final simplification65.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -7.5e-5) (not (<= y 30000000000000.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.5e-5) || !(y <= 30000000000000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-7.5d-5)) .or. (.not. (y <= 30000000000000.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.5e-5) || !(y <= 30000000000000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -7.5e-5) or not (y <= 30000000000000.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -7.5e-5) || !(y <= 30000000000000.0)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -7.5e-5) || ~((y <= 30000000000000.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -7.5e-5], N[Not[LessEqual[y, 30000000000000.0]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-5} \lor \neg \left(y \leq 30000000000000\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -7.49999999999999934e-5 or 3e13 < y Initial program 14.6%
Taylor expanded in y around inf 56.0%
associate--l+56.0%
associate-/l*61.1%
Simplified61.1%
if -7.49999999999999934e-5 < y < 3e13Initial program 99.1%
Taylor expanded in i around inf 63.4%
Taylor expanded in y around 0 60.4%
Final simplification60.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.1e-9) x (if (<= y 1650000000000.0) (/ (+ 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.1e-9) {
tmp = x;
} else if (y <= 1650000000000.0) {
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.1d-9)) then
tmp = x
else if (y <= 1650000000000.0d0) 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.1e-9) {
tmp = x;
} else if (y <= 1650000000000.0) {
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.1e-9: tmp = x elif y <= 1650000000000.0: 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.1e-9) tmp = x; elseif (y <= 1650000000000.0) 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.1e-9) tmp = x; elseif (y <= 1650000000000.0) 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.1e-9], x, If[LessEqual[y, 1650000000000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1650000000000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.10000000000000019e-9 or 1.65e12 < y Initial program 16.8%
Taylor expanded in y around inf 45.1%
if -2.10000000000000019e-9 < y < 1.65e12Initial program 99.1%
Taylor expanded in i around inf 64.7%
Taylor expanded in y around 0 61.6%
Final simplification54.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.1e-5) x (if (<= y 4.8e+17) (/ 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.1e-5) {
tmp = x;
} else if (y <= 4.8e+17) {
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.1d-5)) then
tmp = x
else if (y <= 4.8d+17) 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.1e-5) {
tmp = x;
} else if (y <= 4.8e+17) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.1e-5: tmp = x elif y <= 4.8e+17: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.1e-5) tmp = x; elseif (y <= 4.8e+17) 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.1e-5) tmp = x; elseif (y <= 4.8e+17) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.1e-5], x, If[LessEqual[y, 4.8e+17], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+17}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.09999999999999988e-5 or 4.8e17 < y Initial program 14.6%
Taylor expanded in y around inf 46.2%
if -2.09999999999999988e-5 < y < 4.8e17Initial program 99.1%
Taylor expanded in y around 0 53.8%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 61.8%
Taylor expanded in y around inf 22.4%
herbie shell --seed 2024089
(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)))