
(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 14 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 (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c)))))
(t_2 (fma y (fma y (fma y (+ y a) b) c) i)))
(if (<= t_1 (- INFINITY))
(*
x
(+
(/
(+
(/ t t_2)
(* y (/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_2)))
x)
(/ (pow y 4.0) t_2)))
(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 * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
double t_2 = fma(y, fma(y, fma(y, (y + a), b), c), i);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x * ((((t / t_2) + (y * ((230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2))) / x) + (pow(y, 4.0) / t_2));
} else if (t_1 <= ((double) INFINITY)) {
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(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) t_2 = fma(y, fma(y, fma(y, Float64(y + a), b), c), i) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(Float64(Float64(t / t_2) + Float64(y * Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_2))) / x) + Float64((y ^ 4.0) / t_2))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x * N[(N[(N[(N[(t / t$95$2), $MachinePrecision] + N[(y * N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[Power[y, 4.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $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(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
t_2 := \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \left(\frac{\frac{t}{t\_2} + y \cdot \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_2}}{x} + \frac{{y}^{4}}{t\_2}\right)\\
\mathbf{elif}\;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 34.1%
Taylor expanded in x around -inf 61.8%
Simplified80.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)) < +inf.0Initial program 92.6%
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 61.4%
associate--l+61.4%
associate-/l*65.7%
Simplified65.7%
Final simplification83.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
(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 * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
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 * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
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 * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) 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(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(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 * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); 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[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(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(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;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 89.1%
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 61.4%
associate--l+61.4%
associate-/l*65.7%
Simplified65.7%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (+ t (* y 230661.510616)) (* y c)))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.85e-20)
t_2
(if (<= y -1.2e-152)
t_1
(if (<= y 3.5e-120)
(/ t i)
(if (<= y 8e-112)
t_1
(if (<= y 1.95e+38)
(/
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))
c)
t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / (y * c);
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.85e-20) {
tmp = t_2;
} else if (y <= -1.2e-152) {
tmp = t_1;
} else if (y <= 3.5e-120) {
tmp = t / i;
} else if (y <= 8e-112) {
tmp = t_1;
} else if (y <= 1.95e+38) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t + (y * 230661.510616d0)) / (y * c)
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.85d-20)) then
tmp = t_2
else if (y <= (-1.2d-152)) then
tmp = t_1
else if (y <= 3.5d-120) then
tmp = t / i
else if (y <= 8d-112) then
tmp = t_1
else if (y <= 1.95d+38) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / c
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / (y * c);
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.85e-20) {
tmp = t_2;
} else if (y <= -1.2e-152) {
tmp = t_1;
} else if (y <= 3.5e-120) {
tmp = t / i;
} else if (y <= 8e-112) {
tmp = t_1;
} else if (y <= 1.95e+38) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * 230661.510616)) / (y * c) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.85e-20: tmp = t_2 elif y <= -1.2e-152: tmp = t_1 elif y <= 3.5e-120: tmp = t / i elif y <= 8e-112: tmp = t_1 elif y <= 1.95e+38: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.85e-20) tmp = t_2; elseif (y <= -1.2e-152) tmp = t_1; elseif (y <= 3.5e-120) tmp = Float64(t / i); elseif (y <= 8e-112) tmp = t_1; elseif (y <= 1.95e+38) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / c); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * 230661.510616)) / (y * c); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.85e-20) tmp = t_2; elseif (y <= -1.2e-152) tmp = t_1; elseif (y <= 3.5e-120) tmp = t / i; elseif (y <= 8e-112) tmp = t_1; elseif (y <= 1.95e+38) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / c; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * 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, -1.85e-20], t$95$2, If[LessEqual[y, -1.2e-152], t$95$1, If[LessEqual[y, 3.5e-120], N[(t / i), $MachinePrecision], If[LessEqual[y, 8e-112], t$95$1, If[LessEqual[y, 1.95e+38], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot 230661.510616}{y \cdot c}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-120}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+38}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.85e-20 or 1.95000000000000012e38 < y Initial program 12.8%
Taylor expanded in y around inf 50.3%
associate--l+50.3%
associate-/l*53.5%
Simplified53.5%
if -1.85e-20 < y < -1.2e-152 or 3.5e-120 < y < 7.9999999999999996e-112Initial program 99.5%
Taylor expanded in c around inf 50.8%
Taylor expanded in y around 0 43.9%
if -1.2e-152 < y < 3.5e-120Initial program 99.9%
Taylor expanded in y around 0 80.3%
if 7.9999999999999996e-112 < y < 1.95000000000000012e38Initial program 90.6%
Taylor expanded in t around 0 57.2%
Taylor expanded in c around inf 24.4%
Final simplification54.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y)))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -5.6e+103)
t_1
(if (<= y 2.05e-27)
(/ (+ t (* y 230661.510616)) (+ i (* y t_2)))
(if (<= y 5.4e+88)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))) t_2)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.05e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 5.4e+88) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
t_2 = (y * ((y * (y + a)) + b)) + c
if (y <= (-5.6d+103)) then
tmp = t_1
else if (y <= 2.05d-27) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_2))
else if (y <= 5.4d+88) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.05e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 5.4e+88) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) t_2 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -5.6e+103: tmp = t_1 elif y <= 2.05e-27: tmp = (t + (y * 230661.510616)) / (i + (y * t_2)) elif y <= 5.4e+88: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2 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)))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.05e-27) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_2))); elseif (y <= 5.4e+88) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); t_2 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.05e-27) tmp = (t + (y * 230661.510616)) / (i + (y * t_2)); elseif (y <= 5.4e+88) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -5.6e+103], t$95$1, If[LessEqual[y, 2.05e-27], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+88], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-27}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+88}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 5.40000000000000031e88 < y Initial program 0.2%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*70.9%
Simplified70.9%
if -5.60000000000000017e103 < y < 2.0499999999999999e-27Initial program 91.9%
Taylor expanded in y around 0 82.4%
*-commutative82.4%
Simplified82.4%
if 2.0499999999999999e-27 < y < 5.40000000000000031e88Initial program 55.5%
Taylor expanded in t around 0 40.6%
Taylor expanded in i around 0 46.1%
Final simplification75.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -5.6e+103)
t_2
(if (<= y 2e-27)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y t_1)))
(if (<= y 1.08e+83)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x 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 * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -5.6e+103) {
tmp = t_2;
} else if (y <= 2e-27) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 1.08e+83) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * 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 * ((y * (y + a)) + b)) + c
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-5.6d+103)) then
tmp = t_2
else if (y <= 2d-27) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * t_1))
else if (y <= 1.08d+83) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * 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 * ((y * (y + a)) + b)) + c;
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -5.6e+103) {
tmp = t_2;
} else if (y <= 2e-27) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 1.08e+83) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -5.6e+103: tmp = t_2 elif y <= 2e-27: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)) elif y <= 1.08e+83: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -5.6e+103) tmp = t_2; elseif (y <= 2e-27) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * t_1))); elseif (y <= 1.08e+83) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * 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 * ((y * (y + a)) + b)) + c; t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -5.6e+103) tmp = t_2; elseif (y <= 2e-27) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)); elseif (y <= 1.08e+83) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * 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[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $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.6e+103], t$95$2, If[LessEqual[y, 2e-27], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+83], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-27}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+83}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 1.08e83 < y Initial program 0.2%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*70.9%
Simplified70.9%
if -5.60000000000000017e103 < y < 2.0000000000000001e-27Initial program 91.9%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
Simplified83.0%
if 2.0000000000000001e-27 < y < 1.08e83Initial program 55.5%
Taylor expanded in t around 0 40.6%
Taylor expanded in i around 0 46.1%
Final simplification75.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.15e+89) (not (<= y 2.65e+47)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.15e+89) || !(y <= 2.65e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.15d+89)) .or. (.not. (y <= 2.65d+47))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.15e+89) || !(y <= 2.65e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.15e+89) or not (y <= 2.65e+47): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.15e+89) || !(y <= 2.65e+47)) 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(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.15e+89) || ~((y <= 2.65e+47))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.15e+89], N[Not[LessEqual[y, 2.65e+47]], $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[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+89} \lor \neg \left(y \leq 2.65 \cdot 10^{+47}\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)}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -2.1500000000000001e89 or 2.65e47 < y Initial program 1.6%
Taylor expanded in y around inf 62.5%
associate--l+62.5%
associate-/l*66.7%
Simplified66.7%
if -2.1500000000000001e89 < y < 2.65e47Initial program 89.3%
Taylor expanded in x around 0 85.3%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -5.6e+103)
t_1
(if (<= y 2.1e-27)
(/
(+ t (* y 230661.510616))
(+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))
(if (<= y 2.25e+82)
(/
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))
(+ c (* y (+ b (* y a)))))
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.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
} else if (y <= 2.25e+82) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / (c + (y * (b + (y * a))));
} 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.6d+103)) then
tmp = t_1
else if (y <= 2.1d-27) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
else if (y <= 2.25d+82) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / (c + (y * (b + (y * a))))
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.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
} else if (y <= 2.25e+82) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / (c + (y * (b + (y * a))));
} 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.6e+103: tmp = t_1 elif y <= 2.1e-27: tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))) elif y <= 2.25e+82: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / (c + (y * (b + (y * a)))) 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.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); elseif (y <= 2.25e+82) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / Float64(c + Float64(y * Float64(b + Float64(y * a))))); 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.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = (t + (y * 230661.510616)) / (i + (y * ((y * ((y * (y + a)) + b)) + c))); elseif (y <= 2.25e+82) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / (c + (y * (b + (y * a)))); 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.6e+103], t$95$1, If[LessEqual[y, 2.1e-27], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+82], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $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.6 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+82}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{c + y \cdot \left(b + y \cdot a\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 2.2499999999999998e82 < y Initial program 0.2%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*70.9%
Simplified70.9%
if -5.60000000000000017e103 < y < 2.10000000000000015e-27Initial program 91.9%
Taylor expanded in y around 0 82.4%
*-commutative82.4%
Simplified82.4%
if 2.10000000000000015e-27 < y < 2.2499999999999998e82Initial program 55.5%
Taylor expanded in t around 0 40.6%
Taylor expanded in i around 0 46.1%
Taylor expanded in y around 0 45.3%
Final simplification75.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y)))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -5.6e+103)
t_1
(if (<= y 2.1e-27)
(/ (+ t (* y 230661.510616)) (+ i (* y t_2)))
(if (<= y 2.9e+46)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_2)
(if (<= y 1.1e+67)
(/
(+
27464.7644705
(+ (* y (+ (* x y) z)) (* 230661.510616 (/ 1.0 y))))
b)
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 2.9e+46) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else if (y <= 1.1e+67) {
tmp = (27464.7644705 + ((y * ((x * y) + z)) + (230661.510616 * (1.0 / y)))) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
t_2 = (y * ((y * (y + a)) + b)) + c
if (y <= (-5.6d+103)) then
tmp = t_1
else if (y <= 2.1d-27) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_2))
else if (y <= 2.9d+46) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_2
else if (y <= 1.1d+67) then
tmp = (27464.7644705d0 + ((y * ((x * y) + z)) + (230661.510616d0 * (1.0d0 / y)))) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_2));
} else if (y <= 2.9e+46) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else if (y <= 1.1e+67) {
tmp = (27464.7644705 + ((y * ((x * y) + z)) + (230661.510616 * (1.0 / y)))) / 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))) t_2 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -5.6e+103: tmp = t_1 elif y <= 2.1e-27: tmp = (t + (y * 230661.510616)) / (i + (y * t_2)) elif y <= 2.9e+46: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2 elif y <= 1.1e+67: tmp = (27464.7644705 + ((y * ((x * y) + z)) + (230661.510616 * (1.0 / y)))) / 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)))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_2))); elseif (y <= 2.9e+46) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_2); elseif (y <= 1.1e+67) tmp = Float64(Float64(27464.7644705 + Float64(Float64(y * Float64(Float64(x * y) + z)) + Float64(230661.510616 * Float64(1.0 / y)))) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); t_2 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = (t + (y * 230661.510616)) / (i + (y * t_2)); elseif (y <= 2.9e+46) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2; elseif (y <= 1.1e+67) tmp = (27464.7644705 + ((y * ((x * y) + z)) + (230661.510616 * (1.0 / y)))) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -5.6e+103], t$95$1, If[LessEqual[y, 2.1e-27], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+46], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 1.1e+67], N[(N[(27464.7644705 + N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + N[(230661.510616 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+46}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_2}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+67}:\\
\;\;\;\;\frac{27464.7644705 + \left(y \cdot \left(x \cdot y + z\right) + 230661.510616 \cdot \frac{1}{y}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 1.1e67 < y Initial program 0.3%
Taylor expanded in y around inf 65.6%
associate--l+65.6%
associate-/l*70.1%
Simplified70.1%
if -5.60000000000000017e103 < y < 2.10000000000000015e-27Initial program 91.9%
Taylor expanded in y around 0 82.4%
*-commutative82.4%
Simplified82.4%
if 2.10000000000000015e-27 < y < 2.9000000000000002e46Initial program 67.6%
Taylor expanded in t around 0 51.4%
Taylor expanded in i around 0 53.5%
Taylor expanded in x around 0 48.2%
if 2.9000000000000002e46 < y < 1.1e67Initial program 31.7%
Taylor expanded in t around 0 18.2%
Taylor expanded in b around inf 0.2%
fma-define0.2%
associate-/l*14.5%
associate-+l+14.5%
associate-*r/14.5%
metadata-eval14.5%
Simplified14.5%
Taylor expanded in b around inf 46.1%
Final simplification75.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ (+ t (* y 230661.510616)) (* y c)))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.85e-20)
t_2
(if (<= y -1.1e-149)
t_1
(if (<= y 3.2e-120)
(/ t i)
(if (<= y 1.45e-115) t_1 (if (<= y 5.4e+34) (/ t i) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / (y * c);
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.85e-20) {
tmp = t_2;
} else if (y <= -1.1e-149) {
tmp = t_1;
} else if (y <= 3.2e-120) {
tmp = t / i;
} else if (y <= 1.45e-115) {
tmp = t_1;
} else if (y <= 5.4e+34) {
tmp = t / i;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t + (y * 230661.510616d0)) / (y * c)
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.85d-20)) then
tmp = t_2
else if (y <= (-1.1d-149)) then
tmp = t_1
else if (y <= 3.2d-120) then
tmp = t / i
else if (y <= 1.45d-115) then
tmp = t_1
else if (y <= 5.4d+34) then
tmp = t / i
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * 230661.510616)) / (y * c);
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.85e-20) {
tmp = t_2;
} else if (y <= -1.1e-149) {
tmp = t_1;
} else if (y <= 3.2e-120) {
tmp = t / i;
} else if (y <= 1.45e-115) {
tmp = t_1;
} else if (y <= 5.4e+34) {
tmp = t / i;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * 230661.510616)) / (y * c) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.85e-20: tmp = t_2 elif y <= -1.1e-149: tmp = t_1 elif y <= 3.2e-120: tmp = t / i elif y <= 1.45e-115: tmp = t_1 elif y <= 5.4e+34: tmp = t / i else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.85e-20) tmp = t_2; elseif (y <= -1.1e-149) tmp = t_1; elseif (y <= 3.2e-120) tmp = Float64(t / i); elseif (y <= 1.45e-115) tmp = t_1; elseif (y <= 5.4e+34) tmp = Float64(t / i); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * 230661.510616)) / (y * c); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.85e-20) tmp = t_2; elseif (y <= -1.1e-149) tmp = t_1; elseif (y <= 3.2e-120) tmp = t / i; elseif (y <= 1.45e-115) tmp = t_1; elseif (y <= 5.4e+34) tmp = t / i; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * 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, -1.85e-20], t$95$2, If[LessEqual[y, -1.1e-149], t$95$1, If[LessEqual[y, 3.2e-120], N[(t / i), $MachinePrecision], If[LessEqual[y, 1.45e-115], t$95$1, If[LessEqual[y, 5.4e+34], N[(t / i), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot 230661.510616}{y \cdot c}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-120}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+34}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.85e-20 or 5.4000000000000001e34 < y Initial program 13.6%
Taylor expanded in y around inf 49.9%
associate--l+49.9%
associate-/l*53.1%
Simplified53.1%
if -1.85e-20 < y < -1.0999999999999999e-149 or 3.1999999999999999e-120 < y < 1.4499999999999999e-115Initial program 99.5%
Taylor expanded in c around inf 50.8%
Taylor expanded in y around 0 43.9%
if -1.0999999999999999e-149 < y < 3.1999999999999999e-120 or 1.4499999999999999e-115 < y < 5.4000000000000001e34Initial program 96.7%
Taylor expanded in y around 0 60.7%
Final simplification54.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y)))))
(t_2 (+ (* y (+ (* y (+ y a)) b)) c)))
(if (<= y -5.6e+103)
t_1
(if (<= y 2.1e-27)
(/ t (+ i (* y t_2)))
(if (<= y 1.26e+70)
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))) t_2)
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = t / (i + (y * t_2));
} else if (y <= 1.26e+70) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z / y) - (a * (x / y)))
t_2 = (y * ((y * (y + a)) + b)) + c
if (y <= (-5.6d+103)) then
tmp = t_1
else if (y <= 2.1d-27) then
tmp = t / (i + (y * t_2))
else if (y <= 1.26d+70) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = (y * ((y * (y + a)) + b)) + c;
double tmp;
if (y <= -5.6e+103) {
tmp = t_1;
} else if (y <= 2.1e-27) {
tmp = t / (i + (y * t_2));
} else if (y <= 1.26e+70) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a * (x / y))) t_2 = (y * ((y * (y + a)) + b)) + c tmp = 0 if y <= -5.6e+103: tmp = t_1 elif y <= 2.1e-27: tmp = t / (i + (y * t_2)) elif y <= 1.26e+70: tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2 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)))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) tmp = 0.0 if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = Float64(t / Float64(i + Float64(y * t_2))); elseif (y <= 1.26e+70) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a * (x / y))); t_2 = (y * ((y * (y + a)) + b)) + c; tmp = 0.0; if (y <= -5.6e+103) tmp = t_1; elseif (y <= 2.1e-27) tmp = t / (i + (y * t_2)); elseif (y <= 1.26e+70) tmp = (230661.510616 + (y * (27464.7644705 + (y * z)))) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, If[LessEqual[y, -5.6e+103], t$95$1, If[LessEqual[y, 2.1e-27], N[(t / N[(i + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.26e+70], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_2 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{t}{i + y \cdot t\_2}\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+70}:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 1.26000000000000001e70 < y Initial program 0.2%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*70.9%
Simplified70.9%
if -5.60000000000000017e103 < y < 2.10000000000000015e-27Initial program 91.9%
Taylor expanded in t around inf 66.7%
if 2.10000000000000015e-27 < y < 1.26000000000000001e70Initial program 55.5%
Taylor expanded in t around 0 40.6%
Taylor expanded in i around 0 46.1%
Taylor expanded in x around 0 38.5%
Final simplification65.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5.6e+103) (not (<= y 2.45e+47))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ (* y (+ (* y (+ y a)) b)) c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.6e+103) || !(y <= 2.45e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-5.6d+103)) .or. (.not. (y <= 2.45d+47))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.6e+103) || !(y <= 2.45e+47)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.6e+103) or not (y <= 2.45e+47): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.6e+103) || !(y <= 2.45e+47)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.6e+103) || ~((y <= 2.45e+47))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * ((y * ((y * (y + a)) + b)) + c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.6e+103], N[Not[LessEqual[y, 2.45e+47]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103} \lor \neg \left(y \leq 2.45 \cdot 10^{+47}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right)}\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 2.4500000000000001e47 < y Initial program 1.6%
Taylor expanded in y around inf 63.2%
associate--l+63.2%
associate-/l*67.4%
Simplified67.4%
if -5.60000000000000017e103 < y < 2.4500000000000001e47Initial program 88.8%
Taylor expanded in t around inf 61.5%
Final simplification63.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -5.6e+103)
x
(if (<= y 3.6e-120)
(/ t i)
(if (<= y 1.4e-113)
(/ (+ t (* y 230661.510616)) (* y c))
(if (<= y 1.8e+34) (/ 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 <= -5.6e+103) {
tmp = x;
} else if (y <= 3.6e-120) {
tmp = t / i;
} else if (y <= 1.4e-113) {
tmp = (t + (y * 230661.510616)) / (y * c);
} else if (y <= 1.8e+34) {
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 <= (-5.6d+103)) then
tmp = x
else if (y <= 3.6d-120) then
tmp = t / i
else if (y <= 1.4d-113) then
tmp = (t + (y * 230661.510616d0)) / (y * c)
else if (y <= 1.8d+34) 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 <= -5.6e+103) {
tmp = x;
} else if (y <= 3.6e-120) {
tmp = t / i;
} else if (y <= 1.4e-113) {
tmp = (t + (y * 230661.510616)) / (y * c);
} else if (y <= 1.8e+34) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.6e+103: tmp = x elif y <= 3.6e-120: tmp = t / i elif y <= 1.4e-113: tmp = (t + (y * 230661.510616)) / (y * c) elif y <= 1.8e+34: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.6e+103) tmp = x; elseif (y <= 3.6e-120) tmp = Float64(t / i); elseif (y <= 1.4e-113) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(y * c)); elseif (y <= 1.8e+34) 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 <= -5.6e+103) tmp = x; elseif (y <= 3.6e-120) tmp = t / i; elseif (y <= 1.4e-113) tmp = (t + (y * 230661.510616)) / (y * c); elseif (y <= 1.8e+34) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.6e+103], x, If[LessEqual[y, 3.6e-120], N[(t / i), $MachinePrecision], If[LessEqual[y, 1.4e-113], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+34], N[(t / i), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-120}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-113}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot c}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+34}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 1.8e34 < y Initial program 3.9%
Taylor expanded in y around inf 50.7%
if -5.60000000000000017e103 < y < 3.6000000000000003e-120 or 1.4e-113 < y < 1.8e34Initial program 90.5%
Taylor expanded in y around 0 43.6%
if 3.6000000000000003e-120 < y < 1.4e-113Initial program 99.4%
Taylor expanded in c around inf 99.4%
Taylor expanded in y around 0 99.4%
Final simplification47.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -5.6e+103) x (if (<= y 2.5e+34) (/ 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 <= -5.6e+103) {
tmp = x;
} else if (y <= 2.5e+34) {
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 <= (-5.6d+103)) then
tmp = x
else if (y <= 2.5d+34) 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 <= -5.6e+103) {
tmp = x;
} else if (y <= 2.5e+34) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.6e+103: tmp = x elif y <= 2.5e+34: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.6e+103) tmp = x; elseif (y <= 2.5e+34) 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 <= -5.6e+103) tmp = x; elseif (y <= 2.5e+34) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.6e+103], x, If[LessEqual[y, 2.5e+34], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.60000000000000017e103 or 2.4999999999999999e34 < y Initial program 3.9%
Taylor expanded in y around inf 50.7%
if -5.60000000000000017e103 < y < 2.4999999999999999e34Initial program 90.8%
Taylor expanded in y around 0 42.3%
Final simplification45.4%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 59.2%
Taylor expanded in y around inf 20.8%
Final simplification20.8%
herbie shell --seed 2024066
(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)))