
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.16e+61)
t_1
(if (<= y 2.5e+58)
(/
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 6.8e+120)
(/ -1.0 (+ (/ (- (/ z (pow x 2.0)) (/ a x)) y) (/ -1.0 x)))
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 <= -1.16e+61) {
tmp = t_1;
} else if (y <= 2.5e+58) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.8e+120) {
tmp = -1.0 / ((((z / pow(x, 2.0)) - (a / x)) / y) + (-1.0 / x));
} 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 <= (-1.16d+61)) then
tmp = t_1
else if (y <= 2.5d+58) then
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 6.8d+120) then
tmp = (-1.0d0) / ((((z / (x ** 2.0d0)) - (a / x)) / y) + ((-1.0d0) / x))
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 <= -1.16e+61) {
tmp = t_1;
} else if (y <= 2.5e+58) {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 6.8e+120) {
tmp = -1.0 / ((((z / Math.pow(x, 2.0)) - (a / x)) / y) + (-1.0 / x));
} 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 <= -1.16e+61: tmp = t_1 elif y <= 2.5e+58: tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 6.8e+120: tmp = -1.0 / ((((z / math.pow(x, 2.0)) - (a / x)) / y) + (-1.0 / x)) 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 <= -1.16e+61) tmp = t_1; elseif (y <= 2.5e+58) tmp = Float64(Float64(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 6.8e+120) tmp = Float64(-1.0 / Float64(Float64(Float64(Float64(z / (x ^ 2.0)) - Float64(a / x)) / y) + Float64(-1.0 / x))); 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 <= -1.16e+61) tmp = t_1; elseif (y <= 2.5e+58) tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 6.8e+120) tmp = -1.0 / ((((z / (x ^ 2.0)) - (a / x)) / y) + (-1.0 / x)); 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, -1.16e+61], t$95$1, If[LessEqual[y, 2.5e+58], N[(N[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+120], N[(-1.0 / N[(N[(N[(N[(z / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] - N[(a / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 / x), $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 -1.16 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+58}:\\
\;\;\;\;\frac{t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+120}:\\
\;\;\;\;\frac{-1}{\frac{\frac{z}{{x}^{2}} - \frac{a}{x}}{y} + \frac{-1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.16e61 or 6.79999999999999998e120 < y Initial program 0.3%
Taylor expanded in y around inf 67.1%
associate--l+67.1%
associate-/l*71.6%
Simplified71.6%
if -1.16e61 < y < 2.49999999999999993e58Initial program 94.7%
if 2.49999999999999993e58 < y < 6.79999999999999998e120Initial program 21.3%
clear-num21.3%
inv-pow21.3%
Applied egg-rr21.3%
unpow-121.3%
fma-undefine21.3%
*-commutative21.3%
fma-define21.3%
Simplified21.3%
Taylor expanded in y around -inf 55.0%
Final simplification84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
(t_2 (/ t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_2 -1e-308)
t_2
(if (<= t_2 INFINITY)
(/
1.0
(+
(/ i t_1)
(+ (* c (/ y t_1)) (* (pow y 2.0) (/ (fma y (+ y a) b) 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 = t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616));
double t_2 = t_1 / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_2 <= -1e-308) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = 1.0 / ((i / t_1) + ((c * (y / t_1)) + (pow(y, 2.0) * (fma(y, (y + a), b) / 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(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) t_2 = Float64(t_1 / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_2 <= -1e-308) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(1.0 / Float64(Float64(i / t_1) + Float64(Float64(c * Float64(y / t_1)) + Float64((y ^ 2.0) * Float64(fma(y, Float64(y + a), b) / 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[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-308], t$95$2, If[LessEqual[t$95$2, Infinity], N[(1.0 / N[(N[(i / t$95$1), $MachinePrecision] + N[(N[(c * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[Power[y, 2.0], $MachinePrecision] * N[(N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\
t_2 := \frac{t\_1}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{1}{\frac{i}{t\_1} + \left(c \cdot \frac{y}{t\_1} + {y}^{2} \cdot \frac{\mathsf{fma}\left(y, y + a, b\right)}{t\_1}\right)}\\
\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)) < -9.9999999999999991e-309Initial program 93.9%
if -9.9999999999999991e-309 < (/.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 88.0%
clear-num87.9%
inv-pow87.9%
Applied egg-rr87.9%
unpow-187.9%
fma-undefine87.9%
*-commutative87.9%
fma-define87.9%
Simplified87.9%
Taylor expanded in c around 0 86.9%
associate-/l*85.6%
associate-/l*93.3%
+-commutative93.3%
+-commutative93.3%
fma-undefine93.3%
Simplified93.3%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf 63.0%
associate--l+63.0%
associate-/l*67.3%
Simplified67.3%
Final simplification84.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(*
y
(/
(+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)
(+ i (* y (+ c (* y b)))))))
(t_2 (+ x (- (/ z y) (* a (/ x y)))))
(t_3 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i)))
(if (<= y -7.2e+27)
t_2
(if (<= y -4e-38)
t_1
(if (<= y 8.5e-18)
(/ (+ t (* y 230661.510616)) t_3)
(if (<= y 1.45e+40)
t_1
(if (<= y 4.5e+57)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) t_3)
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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double t_3 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if (y <= -7.2e+27) {
tmp = t_2;
} else if (y <= -4e-38) {
tmp = t_1;
} else if (y <= 8.5e-18) {
tmp = (t + (y * 230661.510616)) / t_3;
} else if (y <= 1.45e+40) {
tmp = t_1;
} else if (y <= 4.5e+57) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0) / (i + (y * (c + (y * b)))))
t_2 = x + ((z / y) - (a * (x / y)))
t_3 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
if (y <= (-7.2d+27)) then
tmp = t_2
else if (y <= (-4d-38)) then
tmp = t_1
else if (y <= 8.5d-18) then
tmp = (t + (y * 230661.510616d0)) / t_3
else if (y <= 1.45d+40) then
tmp = t_1
else if (y <= 4.5d+57) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / t_3
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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double t_3 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
double tmp;
if (y <= -7.2e+27) {
tmp = t_2;
} else if (y <= -4e-38) {
tmp = t_1;
} else if (y <= 8.5e-18) {
tmp = (t + (y * 230661.510616)) / t_3;
} else if (y <= 1.45e+40) {
tmp = t_1;
} else if (y <= 4.5e+57) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))) t_2 = x + ((z / y) - (a * (x / y))) t_3 = (y * ((y * ((y * (y + a)) + b)) + c)) + i tmp = 0 if y <= -7.2e+27: tmp = t_2 elif y <= -4e-38: tmp = t_1 elif y <= 8.5e-18: tmp = (t + (y * 230661.510616)) / t_3 elif y <= 1.45e+40: tmp = t_1 elif y <= 4.5e+57: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(y * Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616) / Float64(i + Float64(y * Float64(c + Float64(y * b)))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) t_3 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i) tmp = 0.0 if (y <= -7.2e+27) tmp = t_2; elseif (y <= -4e-38) tmp = t_1; elseif (y <= 8.5e-18) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / t_3); elseif (y <= 1.45e+40) tmp = t_1; elseif (y <= 4.5e+57) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / t_3); 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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))); t_2 = x + ((z / y) - (a * (x / y))); t_3 = (y * ((y * ((y * (y + a)) + b)) + c)) + i; tmp = 0.0; if (y <= -7.2e+27) tmp = t_2; elseif (y <= -4e-38) tmp = t_1; elseif (y <= 8.5e-18) tmp = (t + (y * 230661.510616)) / t_3; elseif (y <= 1.45e+40) tmp = t_1; elseif (y <= 4.5e+57) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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, -7.2e+27], t$95$2, If[LessEqual[y, -4e-38], t$95$1, If[LessEqual[y, 8.5e-18], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[y, 1.45e+40], t$95$1, If[LessEqual[y, 4.5e+57], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_3 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{t\_3}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7.19999999999999966e27 or 4.49999999999999996e57 < y Initial program 6.0%
Taylor expanded in y around inf 59.3%
associate--l+59.3%
associate-/l*62.8%
Simplified62.8%
if -7.19999999999999966e27 < y < -3.9999999999999998e-38 or 8.4999999999999995e-18 < y < 1.45000000000000009e40Initial program 89.8%
Taylor expanded in y around 0 66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in t around 0 62.5%
associate-/l*67.4%
Simplified67.4%
if -3.9999999999999998e-38 < y < 8.4999999999999995e-18Initial program 99.7%
Taylor expanded in y around 0 93.6%
*-commutative88.0%
Simplified93.6%
if 1.45000000000000009e40 < y < 4.49999999999999996e57Initial program 52.1%
Taylor expanded in y around 0 52.1%
*-commutative3.8%
Simplified52.1%
Final simplification77.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)))
(+ i (* y (+ c (* y b))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.9e+27)
t_2
(if (<= y -3.2e-61)
t_1
(if (<= y 2e-133)
(/
(+ t (* y 230661.510616))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 8.2e+50) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * (c + (y * b))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.9e+27) {
tmp = t_2;
} else if (y <= -3.2e-61) {
tmp = t_1;
} else if (y <= 2e-133) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 8.2e+50) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0))) / (i + (y * (c + (y * b))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.9d+27)) then
tmp = t_2
else if (y <= (-3.2d-61)) then
tmp = t_1
else if (y <= 2d-133) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 8.2d+50) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * (c + (y * b))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.9e+27) {
tmp = t_2;
} else if (y <= -3.2e-61) {
tmp = t_1;
} else if (y <= 2e-133) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 8.2e+50) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * (c + (y * b)))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.9e+27: tmp = t_2 elif y <= -3.2e-61: tmp = t_1 elif y <= 2e-133: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 8.2e+50: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.9e+27) tmp = t_2; elseif (y <= -3.2e-61) tmp = t_1; elseif (y <= 2e-133) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 8.2e+50) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616))) / (i + (y * (c + (y * b)))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2.9e+27) tmp = t_2; elseif (y <= -3.2e-61) tmp = t_1; elseif (y <= 2e-133) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 8.2e+50) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+27], t$95$2, If[LessEqual[y, -3.2e-61], t$95$1, If[LessEqual[y, 2e-133], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+50], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-133}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.9000000000000001e27 or 8.2000000000000002e50 < y Initial program 6.8%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.3%
Simplified62.3%
if -2.9000000000000001e27 < y < -3.2000000000000001e-61 or 2.0000000000000001e-133 < y < 8.2000000000000002e50Initial program 94.2%
Taylor expanded in y around 0 82.1%
*-commutative82.1%
Simplified82.1%
if -3.2000000000000001e-61 < y < 2.0000000000000001e-133Initial program 99.8%
Taylor expanded in y around 0 99.8%
*-commutative94.3%
Simplified99.8%
Final simplification79.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(*
y
(/
(+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616)
(+ i (* y (+ c (* y b)))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -4.5e+27)
t_2
(if (<= y -4.5e-38)
t_1
(if (<= y 1.1e-17)
(/
(+ t (* y 230661.510616))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(if (<= y 7.4e+43) 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 * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.5e+27) {
tmp = t_2;
} else if (y <= -4.5e-38) {
tmp = t_1;
} else if (y <= 1.1e-17) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 7.4e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 230661.510616d0) / (i + (y * (c + (y * b)))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-4.5d+27)) then
tmp = t_2
else if (y <= (-4.5d-38)) then
tmp = t_1
else if (y <= 1.1d-17) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else if (y <= 7.4d+43) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b)))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -4.5e+27) {
tmp = t_2;
} else if (y <= -4.5e-38) {
tmp = t_1;
} else if (y <= 1.1e-17) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else if (y <= 7.4e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -4.5e+27: tmp = t_2 elif y <= -4.5e-38: tmp = t_1 elif y <= 1.1e-17: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) elif y <= 7.4e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(y * Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616) / Float64(i + Float64(y * Float64(c + Float64(y * b)))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -4.5e+27) tmp = t_2; elseif (y <= -4.5e-38) tmp = t_1; elseif (y <= 1.1e-17) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); elseif (y <= 7.4e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = y * (((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616) / (i + (y * (c + (y * b))))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -4.5e+27) tmp = t_2; elseif (y <= -4.5e-38) tmp = t_1; elseif (y <= 1.1e-17) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); elseif (y <= 7.4e+43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+27], t$95$2, If[LessEqual[y, -4.5e-38], t$95$1, If[LessEqual[y, 1.1e-17], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.4e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.4999999999999999e27 or 7.4000000000000002e43 < y Initial program 6.8%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.3%
Simplified62.3%
if -4.4999999999999999e27 < y < -4.50000000000000009e-38 or 1.1e-17 < y < 7.4000000000000002e43Initial program 85.8%
Taylor expanded in y around 0 63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in t around 0 59.8%
associate-/l*64.4%
Simplified64.4%
if -4.50000000000000009e-38 < y < 1.1e-17Initial program 99.7%
Taylor expanded in y around 0 93.6%
*-commutative88.0%
Simplified93.6%
Final simplification77.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.4e+62) (not (<= y 3.2e+63)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 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 <= -3.4e+62) || !(y <= 3.2e+63)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 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 <= (-3.4d+62)) .or. (.not. (y <= 3.2d+63))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705d0)) + 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 <= -3.4e+62) || !(y <= 3.2e+63)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 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 <= -3.4e+62) or not (y <= 3.2e+63): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 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 <= -3.4e+62) || !(y <= 3.2e+63)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 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 <= -3.4e+62) || ~((y <= 3.2e+63))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 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, -3.4e+62], N[Not[LessEqual[y, 3.2e+63]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $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 -3.4 \cdot 10^{+62} \lor \neg \left(y \leq 3.2 \cdot 10^{+63}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -3.40000000000000014e62 or 3.20000000000000011e63 < y Initial program 3.3%
Taylor expanded in y around inf 60.8%
associate--l+60.8%
associate-/l*64.6%
Simplified64.6%
if -3.40000000000000014e62 < y < 3.20000000000000011e63Initial program 94.7%
Final simplification82.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -7.2e+27) (not (<= y 4e+53)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.2e+27) || !(y <= 4e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-7.2d+27)) .or. (.not. (y <= 4d+53))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.2e+27) || !(y <= 4e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -7.2e+27) or not (y <= 4e+53): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -7.2e+27) || !(y <= 4e+53)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * Float64(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 <= -7.2e+27) || ~((y <= 4e+53))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -7.2e+27], N[Not[LessEqual[y, 4e+53]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(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 -7.2 \cdot 10^{+27} \lor \neg \left(y \leq 4 \cdot 10^{+53}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -7.19999999999999966e27 or 4e53 < y Initial program 6.0%
Taylor expanded in y around inf 59.3%
associate--l+59.3%
associate-/l*62.8%
Simplified62.8%
if -7.19999999999999966e27 < y < 4e53Initial program 97.7%
Taylor expanded in x around 0 89.8%
Final simplification78.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5.2e+26) (not (<= y 2e+43)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.2e+26) || !(y <= 2e+43)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-5.2d+26)) .or. (.not. (y <= 2d+43))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.2e+26) || !(y <= 2e+43)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.2e+26) or not (y <= 2e+43): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.2e+26) || !(y <= 2e+43)) 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(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.2e+26) || ~((y <= 2e+43))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.2e+26], N[Not[LessEqual[y, 2e+43]], $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[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+26} \lor \neg \left(y \leq 2 \cdot 10^{+43}\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(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -5.20000000000000004e26 or 2.00000000000000003e43 < y Initial program 6.8%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.3%
Simplified62.3%
if -5.20000000000000004e26 < y < 2.00000000000000003e43Initial program 97.7%
Taylor expanded in y around 0 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in x around 0 83.0%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ t (+ i (* y (+ c (* y b))))))
(t_2 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.65e+20)
t_2
(if (<= y 4.5e-135)
t_1
(if (<= y 4e-95)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)
(if (<= y 3.35e+53) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t / (i + (y * (c + (y * b))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.65e+20) {
tmp = t_2;
} else if (y <= 4.5e-135) {
tmp = t_1;
} else if (y <= 4e-95) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else if (y <= 3.35e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / (i + (y * (c + (y * b))))
t_2 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.65d+20)) then
tmp = t_2
else if (y <= 4.5d-135) then
tmp = t_1
else if (y <= 4d-95) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / i
else if (y <= 3.35d+53) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t / (i + (y * (c + (y * b))));
double t_2 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.65e+20) {
tmp = t_2;
} else if (y <= 4.5e-135) {
tmp = t_1;
} else if (y <= 4e-95) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else if (y <= 3.35e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = t / (i + (y * (c + (y * b)))) t_2 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.65e+20: tmp = t_2 elif y <= 4.5e-135: tmp = t_1 elif y <= 4e-95: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i elif y <= 3.35e+53: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.65e+20) tmp = t_2; elseif (y <= 4.5e-135) tmp = t_1; elseif (y <= 4e-95) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / i); elseif (y <= 3.35e+53) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = t / (i + (y * (c + (y * b)))); t_2 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2.65e+20) tmp = t_2; elseif (y <= 4.5e-135) tmp = t_1; elseif (y <= 4e-95) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; elseif (y <= 3.35e+53) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.65e+20], t$95$2, If[LessEqual[y, 4.5e-135], t$95$1, If[LessEqual[y, 4e-95], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], If[LessEqual[y, 3.35e+53], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.65 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-95}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.65e20 or 3.3499999999999999e53 < y Initial program 6.8%
Taylor expanded in y around inf 58.3%
associate--l+58.3%
associate-/l*61.8%
Simplified61.8%
if -2.65e20 < y < 4.49999999999999987e-135 or 3.99999999999999996e-95 < y < 3.3499999999999999e53Initial program 98.2%
Taylor expanded in y around 0 88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in t around inf 68.2%
if 4.49999999999999987e-135 < y < 3.99999999999999996e-95Initial program 99.7%
Taylor expanded in i around inf 75.8%
Taylor expanded in x around 0 75.8%
Final simplification65.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.26e+19) (not (<= y 5.8e+53))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.26e+19) || !(y <= 5.8e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.26d+19)) .or. (.not. (y <= 5.8d+53))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.26e+19) || !(y <= 5.8e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.26e+19) or not (y <= 5.8e+53): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.26e+19) || !(y <= 5.8e+53)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(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.26e+19) || ~((y <= 5.8e+53))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.26e+19], N[Not[LessEqual[y, 5.8e+53]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(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.26 \cdot 10^{+19} \lor \neg \left(y \leq 5.8 \cdot 10^{+53}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\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.26e19 or 5.8000000000000004e53 < y Initial program 6.8%
Taylor expanded in y around inf 58.3%
associate--l+58.3%
associate-/l*61.8%
Simplified61.8%
if -1.26e19 < y < 5.8000000000000004e53Initial program 98.3%
Taylor expanded in y around 0 81.4%
*-commutative76.7%
Simplified81.4%
Final simplification72.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.5e+23) (not (<= y 5.4e+45)))
(+ x (- (/ z y) (* a (/ x y))))
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -4.5e+23) || !(y <= 5.4e+45)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-4.5d+23)) .or. (.not. (y <= 5.4d+45))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -4.5e+23) || !(y <= 5.4e+45)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -4.5e+23) or not (y <= 5.4e+45): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -4.5e+23) || !(y <= 5.4e+45)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -4.5e+23) || ~((y <= 5.4e+45))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -4.5e+23], N[Not[LessEqual[y, 5.4e+45]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+23} \lor \neg \left(y \leq 5.4 \cdot 10^{+45}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -4.49999999999999979e23 or 5.39999999999999968e45 < y Initial program 6.8%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.3%
Simplified62.3%
if -4.49999999999999979e23 < y < 5.39999999999999968e45Initial program 97.7%
Taylor expanded in y around 0 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in y around 0 78.4%
*-commutative78.4%
Simplified78.4%
Final simplification71.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.12e+21) (not (<= y 2.8e+44))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.12e+21) || !(y <= 2.8e+44)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.12d+21)) .or. (.not. (y <= 2.8d+44))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.12e+21) || !(y <= 2.8e+44)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.12e+21) or not (y <= 2.8e+44): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.12e+21) || !(y <= 2.8e+44)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.12e+21) || ~((y <= 2.8e+44))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.12e+21], N[Not[LessEqual[y, 2.8e+44]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+21} \lor \neg \left(y \leq 2.8 \cdot 10^{+44}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.12e21 or 2.8000000000000001e44 < y Initial program 7.6%
Taylor expanded in y around inf 57.8%
associate--l+57.8%
associate-/l*61.3%
Simplified61.3%
if -1.12e21 < y < 2.8000000000000001e44Initial program 98.3%
Taylor expanded in y around 0 90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y around 0 77.2%
*-commutative77.2%
Simplified77.2%
Final simplification70.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.3e+19) (not (<= y 3.3e+53))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+19) || !(y <= 3.3e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.3d+19)) .or. (.not. (y <= 3.3d+53))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+19) || !(y <= 3.3e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.3e+19) or not (y <= 3.3e+53): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.3e+19) || !(y <= 3.3e+53)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.3e+19) || ~((y <= 3.3e+53))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.3e+19], N[Not[LessEqual[y, 3.3e+53]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+19} \lor \neg \left(y \leq 3.3 \cdot 10^{+53}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -2.3e19 or 3.3000000000000002e53 < y Initial program 6.8%
Taylor expanded in y around inf 58.3%
associate--l+58.3%
associate-/l*61.8%
Simplified61.8%
if -2.3e19 < y < 3.3000000000000002e53Initial program 98.3%
Taylor expanded in y around 0 89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in t around inf 81.2%
Taylor expanded in b around 0 75.0%
Taylor expanded in t around inf 62.7%
Final simplification62.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2550000000000.0) (not (<= y 3.3e+53))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2550000000000.0) || !(y <= 3.3e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2550000000000.0d0)) .or. (.not. (y <= 3.3d+53))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * (c + (y * b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2550000000000.0) || !(y <= 3.3e+53)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2550000000000.0) or not (y <= 3.3e+53): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2550000000000.0) || !(y <= 3.3e+53)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2550000000000.0) || ~((y <= 3.3e+53))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2550000000000.0], N[Not[LessEqual[y, 3.3e+53]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2550000000000 \lor \neg \left(y \leq 3.3 \cdot 10^{+53}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.55e12 or 3.3000000000000002e53 < y Initial program 6.8%
Taylor expanded in y around inf 58.3%
associate--l+58.3%
associate-/l*61.8%
Simplified61.8%
if -2.55e12 < y < 3.3000000000000002e53Initial program 98.3%
Taylor expanded in y around 0 89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in t around inf 65.5%
Final simplification63.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.05e+16) x (if (<= y 4.5e+38) (/ t (+ i (* y c))) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.05e+16) {
tmp = x;
} else if (y <= 4.5e+38) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1.05d+16)) then
tmp = x
else if (y <= 4.5d+38) then
tmp = t / (i + (y * c))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.05e+16) {
tmp = x;
} else if (y <= 4.5e+38) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.05e+16: tmp = x elif y <= 4.5e+38: tmp = t / (i + (y * c)) else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.05e+16) tmp = x; elseif (y <= 4.5e+38) tmp = Float64(t / Float64(i + Float64(y * c))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.05e+16) tmp = x; elseif (y <= 4.5e+38) tmp = t / (i + (y * c)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.05e+16], x, If[LessEqual[y, 4.5e+38], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.05e16 or 4.4999999999999998e38 < y Initial program 7.6%
Taylor expanded in y around inf 45.9%
if -1.05e16 < y < 4.4999999999999998e38Initial program 99.0%
Taylor expanded in y around 0 90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in t around inf 82.3%
Taylor expanded in b around 0 76.0%
Taylor expanded in t around inf 63.6%
Final simplification55.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -5.2e+16) x (if (<= y 3.4e-18) (/ 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.2e+16) {
tmp = x;
} else if (y <= 3.4e-18) {
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.2d+16)) then
tmp = x
else if (y <= 3.4d-18) 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.2e+16) {
tmp = x;
} else if (y <= 3.4e-18) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.2e+16: tmp = x elif y <= 3.4e-18: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.2e+16) tmp = x; elseif (y <= 3.4e-18) 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.2e+16) tmp = x; elseif (y <= 3.4e-18) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.2e+16], x, If[LessEqual[y, 3.4e-18], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.2e16 or 3.40000000000000001e-18 < y Initial program 13.4%
Taylor expanded in y around inf 42.9%
if -5.2e16 < y < 3.40000000000000001e-18Initial program 99.7%
Taylor expanded in y around 0 52.4%
Final simplification47.7%
(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 57.6%
Taylor expanded in y around inf 22.7%
Final simplification22.7%
herbie shell --seed 2024071
(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)))