
(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 13 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
(if (or (<= y -3.9e+48) (not (<= y 9e+66)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ c (* y (+ b (* y (+ y a)))))) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.9e+48) || !(y <= 9e+66)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= (-3.9d+48)) .or. (.not. (y <= 9d+66))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= -3.9e+48) || !(y <= 9e+66)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * (c + (y * (b + (y * (y + a)))))) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.9e+48) or not (y <= 9e+66): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * (c + (y * (b + (y * (y + a)))))) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.9e+48) || !(y <= 9e+66)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.9e+48) || ~((y <= 9e+66))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * (c + (y * (b + (y * (y + a)))))) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.9e+48], N[Not[LessEqual[y, 9e+66]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+48} \lor \neg \left(y \leq 9 \cdot 10^{+66}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right) + i}\\
\end{array}
\end{array}
if y < -3.9000000000000001e48 or 8.9999999999999997e66 < y Initial program 2.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*77.6%
Simplified77.6%
if -3.9000000000000001e48 < y < 8.9999999999999997e66Initial program 87.6%
Taylor expanded in x around 0 86.8%
Final simplification83.0%
(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 (+ c (* y (+ b (* y (+ y a)))))) i))))
(if (<= t_1 INFINITY) 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 * (c + (y * (b + (y * (y + a)))))) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / 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 * (c + (y * (b + (y * (y + a)))))) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
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 * (c + (y * (b + (y * (y + a)))))) + i) tmp = 0 if t_1 <= math.inf: 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(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) + i)) tmp = 0.0 if (t_1 <= Inf) 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 * (c + (y * (b + (y * (y + a)))))) + i); tmp = 0.0; if (t_1 <= Inf) 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[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], 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(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;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)) < +inf.0Initial program 87.3%
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 69.3%
associate--l+69.3%
associate-/l*75.9%
Simplified75.9%
Final simplification82.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* y (+ c (* y (+ b (* y (+ y a)))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.9e+48)
t_2
(if (<= y 3.3e-27)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ t_1 i))
(if (<= y 2.05e+67)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) 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 * (c + (y * (b + (y * (y + a)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.9e+48) {
tmp = t_2;
} else if (y <= 3.3e-27) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (t_1 + i);
} else if (y <= 2.05e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / 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 * (c + (y * (b + (y * (y + a)))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.9d+48)) then
tmp = t_2
else if (y <= 3.3d-27) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (t_1 + i)
else if (y <= 2.05d+67) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / 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 * (c + (y * (b + (y * (y + a)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.9e+48) {
tmp = t_2;
} else if (y <= 3.3e-27) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (t_1 + i);
} else if (y <= 2.05e+67) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = y * (c + (y * (b + (y * (y + a))))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.9e+48: tmp = t_2 elif y <= 3.3e-27: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (t_1 + i) elif y <= 2.05e+67: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.9e+48) tmp = t_2; elseif (y <= 3.3e-27) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(t_1 + i)); elseif (y <= 2.05e+67) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / 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 * (c + (y * (b + (y * (y + a))))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.9e+48) tmp = t_2; elseif (y <= 3.3e-27) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (t_1 + i); elseif (y <= 2.05e+67) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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, -1.9e+48], t$95$2, If[LessEqual[y, 3.3e-27], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+67], 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], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{t\_1 + i}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+67}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.9e48 or 2.0499999999999999e67 < y Initial program 2.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*77.6%
Simplified77.6%
if -1.9e48 < y < 3.29999999999999998e-27Initial program 93.7%
Taylor expanded in y around 0 89.0%
*-commutative89.0%
Simplified89.0%
if 3.29999999999999998e-27 < y < 2.0499999999999999e67Initial program 52.0%
Taylor expanded in x around 0 47.1%
Taylor expanded in i around 0 43.1%
Final simplification80.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.8e+48) (not (<= y 7e+68)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ c (* y (+ b (* y (+ y a)))))) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.8e+48) || !(y <= 7e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= (-3.8d+48)) .or. (.not. (y <= 7d+68))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= -3.8e+48) || !(y <= 7e+68)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * (c + (y * (b + (y * (y + a)))))) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.8e+48) or not (y <= 7e+68): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * (c + (y * (b + (y * (y + a)))))) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.8e+48) || !(y <= 7e+68)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.8e+48) || ~((y <= 7e+68))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * (c + (y * (b + (y * (y + a)))))) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.8e+48], N[Not[LessEqual[y, 7e+68]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+48} \lor \neg \left(y \leq 7 \cdot 10^{+68}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right) + i}\\
\end{array}
\end{array}
if y < -3.8e48 or 6.99999999999999955e68 < y Initial program 2.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*77.6%
Simplified77.6%
if -3.8e48 < y < 6.99999999999999955e68Initial program 87.6%
Taylor expanded in y around 0 78.9%
*-commutative78.9%
Simplified78.9%
Final simplification78.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2e+48) (not (<= y 9e+66))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ (* y (+ c (* y (+ b (* y (+ y a)))))) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2e+48) || !(y <= 9e+66)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= (-2d+48)) .or. (.not. (y <= 9d+66))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / ((y * (c + (y * (b + (y * (y + a)))))) + 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 <= -2e+48) || !(y <= 9e+66)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * (c + (y * (b + (y * (y + a)))))) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2e+48) or not (y <= 9e+66): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / ((y * (c + (y * (b + (y * (y + a)))))) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2e+48) || !(y <= 9e+66)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2e+48) || ~((y <= 9e+66))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / ((y * (c + (y * (b + (y * (y + a)))))) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2e+48], N[Not[LessEqual[y, 9e+66]], $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[(N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+48} \lor \neg \left(y \leq 9 \cdot 10^{+66}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right) + i}\\
\end{array}
\end{array}
if y < -2.00000000000000009e48 or 8.9999999999999997e66 < y Initial program 2.2%
Taylor expanded in y around inf 71.2%
associate--l+71.2%
associate-/l*77.6%
Simplified77.6%
if -2.00000000000000009e48 < y < 8.9999999999999997e66Initial program 87.6%
Taylor expanded in y around 0 78.1%
*-commutative78.1%
Simplified78.1%
Final simplification77.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.9e+48) (not (<= y 180000.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ 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 <= -1.9e+48) || !(y <= 180000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (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 <= (-1.9d+48)) .or. (.not. (y <= 180000.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (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 <= -1.9e+48) || !(y <= 180000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.9e+48) or not (y <= 180000.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.9e+48) || !(y <= 180000.0)) 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 * 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 <= -1.9e+48) || ~((y <= 180000.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (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, -1.9e+48], N[Not[LessEqual[y, 180000.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] / 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 -1.9 \cdot 10^{+48} \lor \neg \left(y \leq 180000\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 \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -1.9e48 or 1.8e5 < y Initial program 7.8%
Taylor expanded in y around inf 62.4%
associate--l+62.4%
associate-/l*67.9%
Simplified67.9%
if -1.9e48 < y < 1.8e5Initial program 93.9%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y around 0 86.1%
Final simplification77.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.2e+48) (not (<= y 65000.0))) (+ 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 <= -2.2e+48) || !(y <= 65000.0)) {
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 <= (-2.2d+48)) .or. (.not. (y <= 65000.0d0))) 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 <= -2.2e+48) || !(y <= 65000.0)) {
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 <= -2.2e+48) or not (y <= 65000.0): 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 <= -2.2e+48) || !(y <= 65000.0)) 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 <= -2.2e+48) || ~((y <= 65000.0))) 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, -2.2e+48], N[Not[LessEqual[y, 65000.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] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+48} \lor \neg \left(y \leq 65000\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 < -2.1999999999999999e48 or 65000 < y Initial program 7.8%
Taylor expanded in y around inf 62.4%
associate--l+62.4%
associate-/l*67.9%
Simplified67.9%
if -2.1999999999999999e48 < y < 65000Initial program 93.9%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y around 0 82.4%
Final simplification75.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.9e+48) (not (<= y 32500.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 <= -1.9e+48) || !(y <= 32500.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 <= (-1.9d+48)) .or. (.not. (y <= 32500.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 <= -1.9e+48) || !(y <= 32500.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 <= -1.9e+48) or not (y <= 32500.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 <= -1.9e+48) || !(y <= 32500.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 <= -1.9e+48) || ~((y <= 32500.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, -1.9e+48], N[Not[LessEqual[y, 32500.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 -1.9 \cdot 10^{+48} \lor \neg \left(y \leq 32500\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 < -1.9e48 or 32500 < y Initial program 7.8%
Taylor expanded in y around inf 62.4%
associate--l+62.4%
associate-/l*67.9%
Simplified67.9%
if -1.9e48 < y < 32500Initial program 93.9%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in i around inf 61.7%
Final simplification64.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.8e+48) (not (<= y 30000.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.8e+48) || !(y <= 30000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / 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 <= (-3.8d+48)) .or. (.not. (y <= 30000.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / 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 <= -3.8e+48) || !(y <= 30000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.8e+48) or not (y <= 30000.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.8e+48) || !(y <= 30000.0)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.8e+48) || ~((y <= 30000.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.8e+48], N[Not[LessEqual[y, 30000.0]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+48} \lor \neg \left(y \leq 30000\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i}\\
\end{array}
\end{array}
if y < -3.8e48 or 3e4 < y Initial program 7.8%
Taylor expanded in y around inf 62.4%
associate--l+62.4%
associate-/l*67.9%
Simplified67.9%
if -3.8e48 < y < 3e4Initial program 93.9%
Taylor expanded in y around 0 87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in i around inf 61.9%
Final simplification64.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.9e+48) (not (<= y 205000.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.9e+48) || !(y <= 205000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.9d+48)) .or. (.not. (y <= 205000.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.9e+48) || !(y <= 205000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.9e+48) or not (y <= 205000.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.9e+48) || !(y <= 205000.0)) 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 * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.9e+48) || ~((y <= 205000.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.9e+48], N[Not[LessEqual[y, 205000.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] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+48} \lor \neg \left(y \leq 205000\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.9e48 or 205000 < y Initial program 7.8%
Taylor expanded in y around inf 62.4%
associate--l+62.4%
associate-/l*67.9%
Simplified67.9%
if -1.9e48 < y < 205000Initial program 93.9%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in y around 0 77.1%
Final simplification72.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.9e+48) x (if (<= y 2.1e+48) (/ (+ 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 <= -1.9e+48) {
tmp = x;
} else if (y <= 2.1e+48) {
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 <= (-1.9d+48)) then
tmp = x
else if (y <= 2.1d+48) 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 <= -1.9e+48) {
tmp = x;
} else if (y <= 2.1e+48) {
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 <= -1.9e+48: tmp = x elif y <= 2.1e+48: 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 <= -1.9e+48) tmp = x; elseif (y <= 2.1e+48) 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 <= -1.9e+48) tmp = x; elseif (y <= 2.1e+48) 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, -1.9e+48], x, If[LessEqual[y, 2.1e+48], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+48}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9e48 or 2.0999999999999998e48 < y Initial program 4.8%
Taylor expanded in y around inf 57.6%
if -1.9e48 < y < 2.0999999999999998e48Initial program 89.6%
Taylor expanded in y around 0 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in i around inf 57.2%
Final simplification57.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.9e+48) x (if (<= y 2.1e+48) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.9e+48) {
tmp = x;
} else if (y <= 2.1e+48) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1.9d+48)) then
tmp = x
else if (y <= 2.1d+48) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.9e+48) {
tmp = x;
} else if (y <= 2.1e+48) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.9e+48: tmp = x elif y <= 2.1e+48: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.9e+48) tmp = x; elseif (y <= 2.1e+48) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.9e+48) tmp = x; elseif (y <= 2.1e+48) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.9e+48], x, If[LessEqual[y, 2.1e+48], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+48}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9e48 or 2.0999999999999998e48 < y Initial program 4.8%
Taylor expanded in y around inf 57.6%
if -1.9e48 < y < 2.0999999999999998e48Initial program 89.6%
Taylor expanded in y around 0 52.5%
Final simplification54.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 51.9%
Taylor expanded in y around inf 27.5%
Final simplification27.5%
herbie shell --seed 2024115
(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)))