
(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 18 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 (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(+ x (- (/ z y) (/ a (/ y x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 96.2%
fma-def96.2%
fma-def96.2%
fma-def96.2%
fma-def96.2%
fma-def96.2%
fma-def96.2%
+-commutative96.2%
fma-def96.2%
+-commutative96.2%
Simplified96.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 68.4%
associate--l+68.4%
associate-/l*69.2%
Simplified69.2%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 96.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 68.4%
associate--l+68.4%
associate-/l*69.2%
Simplified69.2%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x)))))
(t_2 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (<= y -4.3e+43)
t_1
(if (<= y 5.5e-5)
(/ (+ t (* y (+ 230661.510616 (* z (* y y))))) t_2)
(if (<= y 2.4e+66)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (* x y)))))))
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 / (y / x)));
double t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if (y <= -4.3e+43) {
tmp = t_1;
} else if (y <= 5.5e-5) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2;
} else if (y <= 2.4e+66) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (x * y))))))) / 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 / (y / x)))
t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
if (y <= (-4.3d+43)) then
tmp = t_1
else if (y <= 5.5d-5) then
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / t_2
else if (y <= 2.4d+66) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (x * y))))))) / 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 / (y / x)));
double t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if (y <= -4.3e+43) {
tmp = t_1;
} else if (y <= 5.5e-5) {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2;
} else if (y <= 2.4e+66) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (x * y))))))) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i tmp = 0 if y <= -4.3e+43: tmp = t_1 elif y <= 5.5e-5: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2 elif y <= 2.4e+66: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (x * y))))))) / 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(y / x)))) t_2 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) tmp = 0.0 if (y <= -4.3e+43) tmp = t_1; elseif (y <= 5.5e-5) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / t_2); elseif (y <= 2.4e+66) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(x * y))))))) / 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 / (y / x))); t_2 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; tmp = 0.0; if (y <= -4.3e+43) tmp = t_1; elseif (y <= 5.5e-5) tmp = (t + (y * (230661.510616 + (z * (y * y))))) / t_2; elseif (y <= 2.4e+66) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (x * y))))))) / 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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4.3e+43], t$95$1, If[LessEqual[y, 5.5e-5], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 2.4e+66], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]), $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} - \frac{a}{\frac{y}{x}}\right)\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{t_2}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+66}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y\right)\right)\right)}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.3e43 or 2.4000000000000002e66 < y Initial program 4.2%
Taylor expanded in y around inf 69.1%
associate--l+69.1%
associate-/l*69.9%
Simplified69.9%
if -4.3e43 < y < 5.5000000000000002e-5Initial program 97.7%
Taylor expanded in z around inf 94.9%
*-commutative94.9%
unpow294.9%
Simplified94.9%
if 5.5000000000000002e-5 < y < 2.4000000000000002e66Initial program 81.1%
Taylor expanded in x around inf 81.5%
unpow281.5%
associate-*r*81.4%
*-commutative81.4%
Simplified81.4%
Final simplification84.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.75e+45) (not (<= y 1.56e+38)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* z (* y y)))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.75e+45) || !(y <= 1.56e+38)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.75d+45)) .or. (.not. (y <= 1.56d+38))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.75e+45) || !(y <= 1.56e+38)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.75e+45) or not (y <= 1.56e+38): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.75e+45) || !(y <= 1.56e+38)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(z * Float64(y * y))))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.75e+45) || ~((y <= 1.56e+38))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (z * (y * y))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.75e+45], N[Not[LessEqual[y, 1.56e+38]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+45} \lor \neg \left(y \leq 1.56 \cdot 10^{+38}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + z \cdot \left(y \cdot y\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.75000000000000011e45 or 1.5599999999999999e38 < y Initial program 5.9%
Taylor expanded in y around inf 68.2%
associate--l+68.2%
associate-/l*69.0%
Simplified69.0%
if -1.75000000000000011e45 < y < 1.5599999999999999e38Initial program 97.1%
Taylor expanded in z around inf 91.3%
*-commutative91.3%
unpow291.3%
Simplified91.3%
Final simplification82.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -1.4e+47) (not (<= y 2.1e+36)))
(+ x (- (/ z y) (/ a (/ y x))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.4e+47) || !(y <= 2.1e+36)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.4d+47)) .or. (.not. (y <= 2.1d+36))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.4e+47) || !(y <= 2.1e+36)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.4e+47) or not (y <= 2.1e+36): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.4e+47) || !(y <= 2.1e+36)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.4e+47) || ~((y <= 2.1e+36))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.4e+47], N[Not[LessEqual[y, 2.1e+36]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+47} \lor \neg \left(y \leq 2.1 \cdot 10^{+36}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.39999999999999994e47 or 2.10000000000000004e36 < y Initial program 5.9%
Taylor expanded in y around inf 68.2%
associate--l+68.2%
associate-/l*69.0%
Simplified69.0%
if -1.39999999999999994e47 < y < 2.10000000000000004e36Initial program 97.1%
Taylor expanded in y around 0 82.2%
*-commutative82.2%
Simplified82.2%
Final simplification76.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -2.4e+38)
t_1
(if (<= y 1.7e-6)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* a (* y y))))))
(if (<= y 1.7e+126) (+ (/ z a) (/ x (/ a y))) 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 / (y / x)));
double tmp;
if (y <= -2.4e+38) {
tmp = t_1;
} else if (y <= 1.7e-6) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (a * (y * y)))));
} else if (y <= 1.7e+126) {
tmp = (z / a) + (x / (a / y));
} 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 / (y / x)))
if (y <= (-2.4d+38)) then
tmp = t_1
else if (y <= 1.7d-6) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (a * (y * y)))))
else if (y <= 1.7d+126) then
tmp = (z / a) + (x / (a / y))
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 / (y / x)));
double tmp;
if (y <= -2.4e+38) {
tmp = t_1;
} else if (y <= 1.7e-6) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (a * (y * y)))));
} else if (y <= 1.7e+126) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -2.4e+38: tmp = t_1 elif y <= 1.7e-6: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (a * (y * y))))) elif y <= 1.7e+126: tmp = (z / a) + (x / (a / y)) 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(y / x)))) tmp = 0.0 if (y <= -2.4e+38) tmp = t_1; elseif (y <= 1.7e-6) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(a * Float64(y * y)))))); elseif (y <= 1.7e+126) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); 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 / (y / x))); tmp = 0.0; if (y <= -2.4e+38) tmp = t_1; elseif (y <= 1.7e-6) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (a * (y * y))))); elseif (y <= 1.7e+126) tmp = (z / a) + (x / (a / y)); 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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+38], t$95$1, If[LessEqual[y, 1.7e-6], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+126], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + a \cdot \left(y \cdot y\right)\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+126}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.40000000000000017e38 or 1.69999999999999995e126 < y Initial program 3.6%
Taylor expanded in y around inf 74.4%
associate--l+74.4%
associate-/l*75.3%
Simplified75.3%
if -2.40000000000000017e38 < y < 1.70000000000000003e-6Initial program 97.7%
*-commutative97.7%
+-commutative97.7%
distribute-rgt-in97.7%
*-commutative97.7%
associate-*l*97.7%
Applied egg-rr97.7%
Taylor expanded in a around inf 88.8%
*-commutative88.8%
unpow288.8%
Simplified88.8%
Taylor expanded in y around 0 86.2%
if 1.70000000000000003e-6 < y < 1.69999999999999995e126Initial program 43.9%
Taylor expanded in a around inf 12.9%
Taylor expanded in y around inf 41.7%
associate-/l*45.6%
Simplified45.6%
Final simplification78.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.15e+47) (not (<= y 3e+36))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+47) || !(y <= 3e+36)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.15d+47)) .or. (.not. (y <= 3d+36))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.15e+47) || !(y <= 3e+36)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.15e+47) or not (y <= 3e+36): tmp = x + ((z / y) - (a / (y / x))) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.15e+47) || !(y <= 3e+36)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.15e+47) || ~((y <= 3e+36))) tmp = x + ((z / y) - (a / (y / x))); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.15e+47], N[Not[LessEqual[y, 3e+36]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+47} \lor \neg \left(y \leq 3 \cdot 10^{+36}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.1499999999999999e47 or 3e36 < y Initial program 5.9%
Taylor expanded in y around inf 68.2%
associate--l+68.2%
associate-/l*69.0%
Simplified69.0%
if -1.1499999999999999e47 < y < 3e36Initial program 97.1%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
Final simplification76.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -3.6e+40)
t_1
(if (<= y 1.6e-6)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))
(if (<= y 1.1e+126) (+ (/ z a) (/ x (/ a y))) 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 / (y / x)));
double tmp;
if (y <= -3.6e+40) {
tmp = t_1;
} else if (y <= 1.6e-6) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else if (y <= 1.1e+126) {
tmp = (z / a) + (x / (a / y));
} 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 / (y / x)))
if (y <= (-3.6d+40)) then
tmp = t_1
else if (y <= 1.6d-6) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * b))))
else if (y <= 1.1d+126) then
tmp = (z / a) + (x / (a / y))
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 / (y / x)));
double tmp;
if (y <= -3.6e+40) {
tmp = t_1;
} else if (y <= 1.6e-6) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else if (y <= 1.1e+126) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -3.6e+40: tmp = t_1 elif y <= 1.6e-6: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) elif y <= 1.1e+126: tmp = (z / a) + (x / (a / y)) 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(y / x)))) tmp = 0.0 if (y <= -3.6e+40) tmp = t_1; elseif (y <= 1.6e-6) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); elseif (y <= 1.1e+126) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); 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 / (y / x))); tmp = 0.0; if (y <= -3.6e+40) tmp = t_1; elseif (y <= 1.6e-6) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); elseif (y <= 1.1e+126) tmp = (z / a) + (x / (a / y)); 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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.6e+40], t$95$1, If[LessEqual[y, 1.6e-6], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+126], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+126}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.59999999999999996e40 or 1.09999999999999999e126 < y Initial program 3.6%
Taylor expanded in y around inf 74.4%
associate--l+74.4%
associate-/l*75.3%
Simplified75.3%
if -3.59999999999999996e40 < y < 1.5999999999999999e-6Initial program 97.7%
Taylor expanded in y around 0 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y around 0 82.1%
*-commutative82.1%
Simplified82.1%
if 1.5999999999999999e-6 < y < 1.09999999999999999e126Initial program 43.9%
Taylor expanded in a around inf 12.9%
Taylor expanded in y around inf 41.7%
associate-/l*45.6%
Simplified45.6%
Final simplification76.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.02e+43) (not (<= y 3.2e+33))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.02e+43) || !(y <= 3.2e+33)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.02d+43)) .or. (.not. (y <= 3.2d+33))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.02e+43) || !(y <= 3.2e+33)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.02e+43) or not (y <= 3.2e+33): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.02e+43) || !(y <= 3.2e+33)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(t / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.02e+43) || ~((y <= 3.2e+33))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.02e+43], N[Not[LessEqual[y, 3.2e+33]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+43} \lor \neg \left(y \leq 3.2 \cdot 10^{+33}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -1.02e43 or 3.20000000000000017e33 < y Initial program 5.9%
Taylor expanded in y around inf 68.2%
associate--l+68.2%
associate-/l*69.0%
Simplified69.0%
if -1.02e43 < y < 3.20000000000000017e33Initial program 97.1%
Taylor expanded in t around inf 72.3%
Final simplification70.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1e+44)
t_1
(if (<= y -3.5e-57)
(/ t (+ i (* b (* y y))))
(if (<= y 1.7e-11)
(/ t (+ i (* y c)))
(if (<= y 4.2e+128) (+ (/ z a) (/ x (/ a y))) 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 / (y / x)));
double tmp;
if (y <= -1e+44) {
tmp = t_1;
} else if (y <= -3.5e-57) {
tmp = t / (i + (b * (y * y)));
} else if (y <= 1.7e-11) {
tmp = t / (i + (y * c));
} else if (y <= 4.2e+128) {
tmp = (z / a) + (x / (a / y));
} 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 / (y / x)))
if (y <= (-1d+44)) then
tmp = t_1
else if (y <= (-3.5d-57)) then
tmp = t / (i + (b * (y * y)))
else if (y <= 1.7d-11) then
tmp = t / (i + (y * c))
else if (y <= 4.2d+128) then
tmp = (z / a) + (x / (a / y))
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 / (y / x)));
double tmp;
if (y <= -1e+44) {
tmp = t_1;
} else if (y <= -3.5e-57) {
tmp = t / (i + (b * (y * y)));
} else if (y <= 1.7e-11) {
tmp = t / (i + (y * c));
} else if (y <= 4.2e+128) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1e+44: tmp = t_1 elif y <= -3.5e-57: tmp = t / (i + (b * (y * y))) elif y <= 1.7e-11: tmp = t / (i + (y * c)) elif y <= 4.2e+128: tmp = (z / a) + (x / (a / y)) 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(y / x)))) tmp = 0.0 if (y <= -1e+44) tmp = t_1; elseif (y <= -3.5e-57) tmp = Float64(t / Float64(i + Float64(b * Float64(y * y)))); elseif (y <= 1.7e-11) tmp = Float64(t / Float64(i + Float64(y * c))); elseif (y <= 4.2e+128) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); 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 / (y / x))); tmp = 0.0; if (y <= -1e+44) tmp = t_1; elseif (y <= -3.5e-57) tmp = t / (i + (b * (y * y))); elseif (y <= 1.7e-11) tmp = t / (i + (y * c)); elseif (y <= 4.2e+128) tmp = (z / a) + (x / (a / y)); 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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+44], t$95$1, If[LessEqual[y, -3.5e-57], N[(t / N[(i + N[(b * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-11], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+128], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-11}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+128}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.0000000000000001e44 or 4.1999999999999999e128 < y Initial program 3.6%
Taylor expanded in y around inf 74.4%
associate--l+74.4%
associate-/l*75.3%
Simplified75.3%
if -1.0000000000000001e44 < y < -3.49999999999999991e-57Initial program 84.8%
Taylor expanded in t around inf 41.2%
Taylor expanded in b around inf 36.9%
unpow236.9%
Simplified36.9%
if -3.49999999999999991e-57 < y < 1.6999999999999999e-11Initial program 99.8%
Taylor expanded in t around inf 80.9%
Taylor expanded in y around 0 74.0%
*-commutative74.0%
Simplified74.0%
if 1.6999999999999999e-11 < y < 4.1999999999999999e128Initial program 43.9%
Taylor expanded in a around inf 12.9%
Taylor expanded in y around inf 41.7%
associate-/l*45.6%
Simplified45.6%
Final simplification68.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -4.7e+57)
x
(if (<= y -1.7e-49)
(/ (/ t b) (* y y))
(if (<= y 1.5e-14)
(/ t (+ i (* y c)))
(if (<= y 3.7e+134) (+ (/ z a) (/ x (/ a y))) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -4.7e+57) {
tmp = x;
} else if (y <= -1.7e-49) {
tmp = (t / b) / (y * y);
} else if (y <= 1.5e-14) {
tmp = t / (i + (y * c));
} else if (y <= 3.7e+134) {
tmp = (z / a) + (x / (a / y));
} 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 <= (-4.7d+57)) then
tmp = x
else if (y <= (-1.7d-49)) then
tmp = (t / b) / (y * y)
else if (y <= 1.5d-14) then
tmp = t / (i + (y * c))
else if (y <= 3.7d+134) then
tmp = (z / a) + (x / (a / y))
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 <= -4.7e+57) {
tmp = x;
} else if (y <= -1.7e-49) {
tmp = (t / b) / (y * y);
} else if (y <= 1.5e-14) {
tmp = t / (i + (y * c));
} else if (y <= 3.7e+134) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4.7e+57: tmp = x elif y <= -1.7e-49: tmp = (t / b) / (y * y) elif y <= 1.5e-14: tmp = t / (i + (y * c)) elif y <= 3.7e+134: tmp = (z / a) + (x / (a / y)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4.7e+57) tmp = x; elseif (y <= -1.7e-49) tmp = Float64(Float64(t / b) / Float64(y * y)); elseif (y <= 1.5e-14) tmp = Float64(t / Float64(i + Float64(y * c))); elseif (y <= 3.7e+134) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -4.7e+57) tmp = x; elseif (y <= -1.7e-49) tmp = (t / b) / (y * y); elseif (y <= 1.5e-14) tmp = t / (i + (y * c)); elseif (y <= 3.7e+134) tmp = (z / a) + (x / (a / y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.7e+57], x, If[LessEqual[y, -1.7e-49], N[(N[(t / b), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-14], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+134], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-49}:\\
\;\;\;\;\frac{\frac{t}{b}}{y \cdot y}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+134}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.7000000000000003e57 or 3.70000000000000013e134 < y Initial program 1.4%
Taylor expanded in y around inf 58.7%
if -4.7000000000000003e57 < y < -1.70000000000000002e-49Initial program 75.9%
Taylor expanded in t around inf 33.8%
Taylor expanded in b around inf 26.9%
associate-/r*30.7%
unpow230.7%
Simplified30.7%
if -1.70000000000000002e-49 < y < 1.4999999999999999e-14Initial program 99.8%
Taylor expanded in t around inf 80.9%
Taylor expanded in y around 0 74.0%
*-commutative74.0%
Simplified74.0%
if 1.4999999999999999e-14 < y < 3.70000000000000013e134Initial program 40.7%
Taylor expanded in a around inf 11.9%
Taylor expanded in y around inf 38.9%
associate-/l*42.4%
Simplified42.4%
Final simplification61.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.28e+39)
x
(if (<= y -3.1e-50)
(/ t (+ i (* b (* y y))))
(if (<= y 1.7e-9)
(/ t (+ i (* y c)))
(if (<= y 5.5e+134) (+ (/ z a) (/ x (/ a y))) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.28e+39) {
tmp = x;
} else if (y <= -3.1e-50) {
tmp = t / (i + (b * (y * y)));
} else if (y <= 1.7e-9) {
tmp = t / (i + (y * c));
} else if (y <= 5.5e+134) {
tmp = (z / a) + (x / (a / y));
} 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.28d+39)) then
tmp = x
else if (y <= (-3.1d-50)) then
tmp = t / (i + (b * (y * y)))
else if (y <= 1.7d-9) then
tmp = t / (i + (y * c))
else if (y <= 5.5d+134) then
tmp = (z / a) + (x / (a / y))
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.28e+39) {
tmp = x;
} else if (y <= -3.1e-50) {
tmp = t / (i + (b * (y * y)));
} else if (y <= 1.7e-9) {
tmp = t / (i + (y * c));
} else if (y <= 5.5e+134) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.28e+39: tmp = x elif y <= -3.1e-50: tmp = t / (i + (b * (y * y))) elif y <= 1.7e-9: tmp = t / (i + (y * c)) elif y <= 5.5e+134: tmp = (z / a) + (x / (a / y)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.28e+39) tmp = x; elseif (y <= -3.1e-50) tmp = Float64(t / Float64(i + Float64(b * Float64(y * y)))); elseif (y <= 1.7e-9) tmp = Float64(t / Float64(i + Float64(y * c))); elseif (y <= 5.5e+134) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); 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.28e+39) tmp = x; elseif (y <= -3.1e-50) tmp = t / (i + (b * (y * y))); elseif (y <= 1.7e-9) tmp = t / (i + (y * c)); elseif (y <= 5.5e+134) tmp = (z / a) + (x / (a / y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.28e+39], x, If[LessEqual[y, -3.1e-50], N[(t / N[(i + N[(b * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-9], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+134], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{i + b \cdot \left(y \cdot y\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-9}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+134}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.27999999999999994e39 or 5.4999999999999999e134 < y Initial program 3.7%
Taylor expanded in y around inf 56.7%
if -1.27999999999999994e39 < y < -3.1000000000000002e-50Initial program 84.8%
Taylor expanded in t around inf 41.2%
Taylor expanded in b around inf 36.9%
unpow236.9%
Simplified36.9%
if -3.1000000000000002e-50 < y < 1.6999999999999999e-9Initial program 99.8%
Taylor expanded in t around inf 80.9%
Taylor expanded in y around 0 74.0%
*-commutative74.0%
Simplified74.0%
if 1.6999999999999999e-9 < y < 5.4999999999999999e134Initial program 40.7%
Taylor expanded in a around inf 11.9%
Taylor expanded in y around inf 38.9%
associate-/l*42.4%
Simplified42.4%
Final simplification61.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -4.6e+38)
t_1
(if (<= y 2.6e-11)
(/ t (+ i (* y (+ c (* y b)))))
(if (<= y 9.6e+125) (+ (/ z a) (/ x (/ a y))) 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 / (y / x)));
double tmp;
if (y <= -4.6e+38) {
tmp = t_1;
} else if (y <= 2.6e-11) {
tmp = t / (i + (y * (c + (y * b))));
} else if (y <= 9.6e+125) {
tmp = (z / a) + (x / (a / y));
} 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 / (y / x)))
if (y <= (-4.6d+38)) then
tmp = t_1
else if (y <= 2.6d-11) then
tmp = t / (i + (y * (c + (y * b))))
else if (y <= 9.6d+125) then
tmp = (z / a) + (x / (a / y))
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 / (y / x)));
double tmp;
if (y <= -4.6e+38) {
tmp = t_1;
} else if (y <= 2.6e-11) {
tmp = t / (i + (y * (c + (y * b))));
} else if (y <= 9.6e+125) {
tmp = (z / a) + (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -4.6e+38: tmp = t_1 elif y <= 2.6e-11: tmp = t / (i + (y * (c + (y * b)))) elif y <= 9.6e+125: tmp = (z / a) + (x / (a / y)) 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(y / x)))) tmp = 0.0 if (y <= -4.6e+38) tmp = t_1; elseif (y <= 2.6e-11) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); elseif (y <= 9.6e+125) tmp = Float64(Float64(z / a) + Float64(x / Float64(a / y))); 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 / (y / x))); tmp = 0.0; if (y <= -4.6e+38) tmp = t_1; elseif (y <= 2.6e-11) tmp = t / (i + (y * (c + (y * b)))); elseif (y <= 9.6e+125) tmp = (z / a) + (x / (a / y)); 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[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+38], t$95$1, If[LessEqual[y, 2.6e-11], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+125], N[(N[(z / a), $MachinePrecision] + N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-11}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+125}:\\
\;\;\;\;\frac{z}{a} + \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6000000000000002e38 or 9.5999999999999999e125 < y Initial program 3.6%
Taylor expanded in y around inf 74.4%
associate--l+74.4%
associate-/l*75.3%
Simplified75.3%
if -4.6000000000000002e38 < y < 2.6000000000000001e-11Initial program 97.7%
Taylor expanded in t around inf 75.3%
Taylor expanded in y around 0 72.2%
*-commutative72.2%
Simplified72.2%
if 2.6000000000000001e-11 < y < 9.5999999999999999e125Initial program 43.9%
Taylor expanded in a around inf 12.9%
Taylor expanded in y around inf 41.7%
associate-/l*45.6%
Simplified45.6%
Final simplification70.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.4e+43)
x
(if (<= y -3.1e-63)
(/ t (* y (* y b)))
(if (<= y 3.1e+23) (/ t (+ i (* y c))) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.4e+43) {
tmp = x;
} else if (y <= -3.1e-63) {
tmp = t / (y * (y * b));
} else if (y <= 3.1e+23) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2.4d+43)) then
tmp = x
else if (y <= (-3.1d-63)) then
tmp = t / (y * (y * b))
else if (y <= 3.1d+23) then
tmp = t / (i + (y * c))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.4e+43) {
tmp = x;
} else if (y <= -3.1e-63) {
tmp = t / (y * (y * b));
} else if (y <= 3.1e+23) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.4e+43: tmp = x elif y <= -3.1e-63: tmp = t / (y * (y * b)) elif y <= 3.1e+23: tmp = t / (i + (y * c)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.4e+43) tmp = x; elseif (y <= -3.1e-63) tmp = Float64(t / Float64(y * Float64(y * b))); elseif (y <= 3.1e+23) tmp = Float64(t / Float64(i + Float64(y * c))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.4e+43) tmp = x; elseif (y <= -3.1e-63) tmp = t / (y * (y * b)); elseif (y <= 3.1e+23) tmp = t / (i + (y * c)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.4e+43], x, If[LessEqual[y, -3.1e-63], N[(t / N[(y * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+23], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot b\right)}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.40000000000000023e43 or 3.09999999999999971e23 < y Initial program 5.9%
Taylor expanded in y around inf 52.4%
if -2.40000000000000023e43 < y < -3.09999999999999984e-63Initial program 85.4%
Taylor expanded in t around inf 39.4%
Taylor expanded in y around 0 34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 31.2%
*-commutative31.2%
unpow231.2%
associate-*r*31.2%
Simplified31.2%
if -3.09999999999999984e-63 < y < 3.09999999999999971e23Initial program 99.0%
Taylor expanded in t around inf 77.6%
Taylor expanded in y around 0 69.6%
*-commutative69.6%
Simplified69.6%
Final simplification59.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -4e+57)
x
(if (<= y -5.8e-53)
(/ (/ t b) (* y y))
(if (<= y 5e+25) (/ t (+ i (* y c))) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -4e+57) {
tmp = x;
} else if (y <= -5.8e-53) {
tmp = (t / b) / (y * y);
} else if (y <= 5e+25) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-4d+57)) then
tmp = x
else if (y <= (-5.8d-53)) then
tmp = (t / b) / (y * y)
else if (y <= 5d+25) then
tmp = t / (i + (y * c))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -4e+57) {
tmp = x;
} else if (y <= -5.8e-53) {
tmp = (t / b) / (y * y);
} else if (y <= 5e+25) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4e+57: tmp = x elif y <= -5.8e-53: tmp = (t / b) / (y * y) elif y <= 5e+25: tmp = t / (i + (y * c)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4e+57) tmp = x; elseif (y <= -5.8e-53) tmp = Float64(Float64(t / b) / Float64(y * y)); elseif (y <= 5e+25) tmp = Float64(t / Float64(i + Float64(y * c))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -4e+57) tmp = x; elseif (y <= -5.8e-53) tmp = (t / b) / (y * y); elseif (y <= 5e+25) tmp = t / (i + (y * c)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4e+57], x, If[LessEqual[y, -5.8e-53], N[(N[(t / b), $MachinePrecision] / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+25], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{t}{b}}{y \cdot y}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+25}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.00000000000000019e57 or 5.00000000000000024e25 < y Initial program 4.2%
Taylor expanded in y around inf 53.9%
if -4.00000000000000019e57 < y < -5.7999999999999996e-53Initial program 75.9%
Taylor expanded in t around inf 33.8%
Taylor expanded in b around inf 26.9%
associate-/r*30.7%
unpow230.7%
Simplified30.7%
if -5.7999999999999996e-53 < y < 5.00000000000000024e25Initial program 99.0%
Taylor expanded in t around inf 77.0%
Taylor expanded in y around 0 69.1%
*-commutative69.1%
Simplified69.1%
Final simplification59.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.5e+43) x (if (<= y -3.1e-63) (/ t (* y (* y b))) (if (<= y 1.4e-65) (/ 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.5e+43) {
tmp = x;
} else if (y <= -3.1e-63) {
tmp = t / (y * (y * b));
} else if (y <= 1.4e-65) {
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.5d+43)) then
tmp = x
else if (y <= (-3.1d-63)) then
tmp = t / (y * (y * b))
else if (y <= 1.4d-65) 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.5e+43) {
tmp = x;
} else if (y <= -3.1e-63) {
tmp = t / (y * (y * b));
} else if (y <= 1.4e-65) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.5e+43: tmp = x elif y <= -3.1e-63: tmp = t / (y * (y * b)) elif y <= 1.4e-65: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.5e+43) tmp = x; elseif (y <= -3.1e-63) tmp = Float64(t / Float64(y * Float64(y * b))); elseif (y <= 1.4e-65) 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.5e+43) tmp = x; elseif (y <= -3.1e-63) tmp = t / (y * (y * b)); elseif (y <= 1.4e-65) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.5e+43], x, If[LessEqual[y, -3.1e-63], N[(t / N[(y * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-65], N[(t / i), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{y \cdot \left(y \cdot b\right)}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.50000000000000008e43 or 1.4e-65 < y Initial program 20.7%
Taylor expanded in y around inf 44.3%
if -1.50000000000000008e43 < y < -3.09999999999999984e-63Initial program 85.4%
Taylor expanded in t around inf 39.4%
Taylor expanded in y around 0 34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in y around inf 31.2%
*-commutative31.2%
unpow231.2%
associate-*r*31.2%
Simplified31.2%
if -3.09999999999999984e-63 < y < 1.4e-65Initial program 99.9%
Taylor expanded in y around 0 63.7%
Final simplification51.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.5e-30) x (if (<= y 1.4e-65) (/ 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 <= -3.5e-30) {
tmp = x;
} else if (y <= 1.4e-65) {
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 <= (-3.5d-30)) then
tmp = x
else if (y <= 1.4d-65) 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 <= -3.5e-30) {
tmp = x;
} else if (y <= 1.4e-65) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.5e-30: tmp = x elif y <= 1.4e-65: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.5e-30) tmp = x; elseif (y <= 1.4e-65) 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 <= -3.5e-30) tmp = x; elseif (y <= 1.4e-65) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.5e-30], x, If[LessEqual[y, 1.4e-65], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.5000000000000003e-30 or 1.4e-65 < y Initial program 28.0%
Taylor expanded in y around inf 39.5%
if -3.5000000000000003e-30 < y < 1.4e-65Initial program 99.8%
Taylor expanded in y around 0 62.4%
Final simplification49.6%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 59.7%
Taylor expanded in y around inf 23.5%
Final simplification23.5%
herbie shell --seed 2023297
(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)))