
(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 15 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 (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(if (<= y -2.4e+48)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 1.65e+48)
(+
(/ t t_1)
(/
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))
t_1))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -2.4e+48) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.65e+48) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = i + (y * (c + (y * (b + (y * (y + a))))))
if (y <= (-2.4d+48)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 1.65d+48) then
tmp = (t / t_1) + ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x))))))) / t_1)
else
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -2.4e+48) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.65e+48) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * (c + (y * (b + (y * (y + a)))))) tmp = 0 if y <= -2.4e+48: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 1.65e+48: tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1) else: tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))) tmp = 0.0 if (y <= -2.4e+48) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 1.65e+48) tmp = Float64(Float64(t / t_1) + Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x))))))) / t_1)); else tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * (c + (y * (b + (y * (y + a)))))); tmp = 0.0; if (y <= -2.4e+48) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 1.65e+48) tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1); else tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+48], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+48], N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+48}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+48}:\\
\;\;\;\;\frac{t}{t\_1} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\end{array}
\end{array}
if y < -2.4000000000000001e48Initial program 0.7%
Taylor expanded in y around inf 71.9%
if -2.4000000000000001e48 < y < 1.65000000000000011e48Initial program 97.7%
Taylor expanded in t around 0 97.7%
if 1.65000000000000011e48 < y Initial program 0.8%
Taylor expanded in y around -inf 59.3%
Taylor expanded in x around 0 72.8%
distribute-lft-out72.8%
*-commutative72.8%
Simplified72.8%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.8e+44)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 3.25e+47)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.8e+44) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 3.25e+47) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2.8d+44)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 3.25d+47) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.8e+44) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 3.25e+47) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.8e+44: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 3.25e+47: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.8e+44) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 3.25e+47) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.8e+44) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 3.25e+47) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.8e+44], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.25e+47], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+44}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{+47}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\end{array}
\end{array}
if y < -2.8000000000000001e44Initial program 0.7%
Taylor expanded in y around inf 71.9%
if -2.8000000000000001e44 < y < 3.24999999999999994e47Initial program 97.7%
if 3.24999999999999994e47 < y Initial program 0.8%
Taylor expanded in y around -inf 59.3%
Taylor expanded in x around 0 72.8%
distribute-lft-out72.8%
*-commutative72.8%
Simplified72.8%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -3.5e+46)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 1.45e+16)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.5e+46) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.45e+16) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-3.5d+46)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 1.45d+16) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.5e+46) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.45e+16) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.5e+46: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 1.45e+16: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.5e+46) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 1.45e+16) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3.5e+46) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 1.45e+16) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.5e+46], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+16], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+46}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+16}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\end{array}
\end{array}
if y < -3.49999999999999985e46Initial program 0.7%
Taylor expanded in y around inf 71.9%
if -3.49999999999999985e46 < y < 1.45e16Initial program 99.0%
Taylor expanded in x around 0 92.8%
if 1.45e16 < y Initial program 2.6%
Taylor expanded in y around -inf 56.3%
Taylor expanded in x around 0 69.2%
distribute-lft-out69.2%
*-commutative69.2%
Simplified69.2%
Final simplification82.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -5.1e+35) (not (<= y 1.45e+16)))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.1e+35) || !(y <= 1.45e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-5.1d+35)) .or. (.not. (y <= 1.45d+16))) then
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -5.1e+35) || !(y <= 1.45e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -5.1e+35) or not (y <= 1.45e+16): tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -5.1e+35) || !(y <= 1.45e+16)) tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / 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 * Float64(b + Float64(y * a))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -5.1e+35) || ~((y <= 1.45e+16))) tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -5.1e+35], N[Not[LessEqual[y, 1.45e+16]], $MachinePrecision]], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $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 * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+35} \lor \neg \left(y \leq 1.45 \cdot 10^{+16}\right):\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\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 \left(b + y \cdot a\right)\right)}\\
\end{array}
\end{array}
if y < -5.10000000000000017e35 or 1.45e16 < y Initial program 2.5%
Taylor expanded in y around -inf 57.4%
Taylor expanded in x around 0 70.1%
distribute-lft-out70.1%
*-commutative70.1%
Simplified70.1%
if -5.10000000000000017e35 < y < 1.45e16Initial program 99.0%
Taylor expanded in x around 0 92.8%
Taylor expanded in y around 0 92.1%
*-commutative92.1%
Simplified92.1%
Final simplification82.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -4.5e+31) (not (<= y 4.2e+15)))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) 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 <= -4.5e+31) || !(y <= 4.2e+15)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= (-4.5d+31)) .or. (.not. (y <= 4.2d+15))) then
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / 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 <= -4.5e+31) || !(y <= 4.2e+15)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -4.5e+31) or not (y <= 4.2e+15): tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -4.5e+31) || !(y <= 4.2e+15)) tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / 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 <= -4.5e+31) || ~((y <= 4.2e+15))) tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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, -4.5e+31], N[Not[LessEqual[y, 4.2e+15]], $MachinePrecision]], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $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 -4.5 \cdot 10^{+31} \lor \neg \left(y \leq 4.2 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\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 < -4.4999999999999996e31 or 4.2e15 < y Initial program 3.3%
Taylor expanded in y around -inf 56.9%
Taylor expanded in x around 0 69.5%
distribute-lft-out69.5%
*-commutative69.5%
Simplified69.5%
if -4.4999999999999996e31 < y < 4.2e15Initial program 99.0%
Taylor expanded in x around 0 92.8%
Taylor expanded in y around 0 90.7%
*-commutative90.7%
Simplified90.7%
Final simplification80.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6.8e+36) (not (<= y 1.45e+16))) (+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) y)) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6.8e+36) || !(y <= 1.45e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-6.8d+36)) .or. (.not. (y <= 1.45d+16))) then
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -6.8e+36) || !(y <= 1.45e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6.8e+36) or not (y <= 1.45e+16): tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6.8e+36) || !(y <= 1.45e+16)) tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -6.8e+36) || ~((y <= 1.45e+16))) tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6.8e+36], N[Not[LessEqual[y, 1.45e+16]], $MachinePrecision]], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+36} \lor \neg \left(y \leq 1.45 \cdot 10^{+16}\right):\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -6.7999999999999996e36 or 1.45e16 < y Initial program 2.5%
Taylor expanded in y around -inf 57.4%
Taylor expanded in x around 0 70.1%
distribute-lft-out70.1%
*-commutative70.1%
Simplified70.1%
if -6.7999999999999996e36 < y < 1.45e16Initial program 99.0%
Taylor expanded in y around 0 86.9%
*-commutative86.9%
Simplified86.9%
Final simplification79.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -96000000.0) (not (<= y 1.35e+16)))
(+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) 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 <= -96000000.0) || !(y <= 1.35e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= (-96000000.0d0)) .or. (.not. (y <= 1.35d+16))) then
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / 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 <= -96000000.0) || !(y <= 1.35e+16)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -96000000.0) or not (y <= 1.35e+16): tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -96000000.0) || !(y <= 1.35e+16)) tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / 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 <= -96000000.0) || ~((y <= 1.35e+16))) tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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, -96000000.0], N[Not[LessEqual[y, 1.35e+16]], $MachinePrecision]], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $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 -96000000 \lor \neg \left(y \leq 1.35 \cdot 10^{+16}\right):\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\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 < -9.6e7 or 1.35e16 < y Initial program 4.9%
Taylor expanded in y around -inf 56.3%
Taylor expanded in x around 0 68.7%
distribute-lft-out68.7%
*-commutative68.7%
Simplified68.7%
if -9.6e7 < y < 1.35e16Initial program 99.7%
Taylor expanded in x around 0 94.0%
Taylor expanded in y around 0 91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 87.3%
Final simplification78.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -75000000.0) (not (<= y 8e+15))) (+ x (/ (+ z (/ (- 27464.7644705 (* z a)) y)) 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 <= -75000000.0) || !(y <= 8e+15)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= (-75000000.0d0)) .or. (.not. (y <= 8d+15))) then
tmp = x + ((z + ((27464.7644705d0 - (z * a)) / y)) / 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 <= -75000000.0) || !(y <= 8e+15)) {
tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -75000000.0) or not (y <= 8e+15): tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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 <= -75000000.0) || !(y <= 8e+15)) tmp = Float64(x + Float64(Float64(z + Float64(Float64(27464.7644705 - Float64(z * a)) / y)) / 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 <= -75000000.0) || ~((y <= 8e+15))) tmp = x + ((z + ((27464.7644705 - (z * a)) / y)) / 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, -75000000.0], N[Not[LessEqual[y, 8e+15]], $MachinePrecision]], N[(x + N[(N[(z + N[(N[(27464.7644705 - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / y), $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 -75000000 \lor \neg \left(y \leq 8 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z + \frac{27464.7644705 - z \cdot a}{y}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -7.5e7 or 8e15 < y Initial program 4.9%
Taylor expanded in y around -inf 56.3%
Taylor expanded in x around 0 68.7%
distribute-lft-out68.7%
*-commutative68.7%
Simplified68.7%
if -7.5e7 < y < 8e15Initial program 99.7%
Taylor expanded in y around 0 88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in y around 0 87.2%
*-commutative91.9%
Simplified87.2%
Final simplification78.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -100000000.0) (not (<= y 5.5e+16))) (- (+ x (/ z y)) (/ (* x a) 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 <= -100000000.0) || !(y <= 5.5e+16)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-100000000.0d0)) .or. (.not. (y <= 5.5d+16))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -100000000.0) || !(y <= 5.5e+16)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -100000000.0) or not (y <= 5.5e+16): tmp = (x + (z / y)) - ((x * a) / 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 <= -100000000.0) || !(y <= 5.5e+16)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -100000000.0) || ~((y <= 5.5e+16))) tmp = (x + (z / y)) - ((x * a) / 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, -100000000.0], N[Not[LessEqual[y, 5.5e+16]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 -100000000 \lor \neg \left(y \leq 5.5 \cdot 10^{+16}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1e8 or 5.5e16 < y Initial program 4.9%
Taylor expanded in y around inf 66.9%
if -1e8 < y < 5.5e16Initial program 99.0%
Taylor expanded in y around 0 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y around 0 86.6%
*-commutative91.2%
Simplified86.6%
Final simplification77.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -31500000.0) (not (<= y 5.7e+16))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -31500000.0) || !(y <= 5.7e+16)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-31500000.0d0)) .or. (.not. (y <= 5.7d+16))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -31500000.0) || !(y <= 5.7e+16)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -31500000.0) or not (y <= 5.7e+16): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -31500000.0) || !(y <= 5.7e+16)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -31500000.0) || ~((y <= 5.7e+16))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -31500000.0], N[Not[LessEqual[y, 5.7e+16]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -31500000 \lor \neg \left(y \leq 5.7 \cdot 10^{+16}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -3.15e7 or 5.7e16 < y Initial program 4.9%
Taylor expanded in y around inf 66.9%
if -3.15e7 < y < 5.7e16Initial program 99.0%
Taylor expanded in y around 0 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y around 0 78.7%
*-commutative78.7%
Simplified78.7%
Final simplification73.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -5000000.0) (not (<= y 1.9e+15))) (- (+ x (/ z y)) (/ (* x a) 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 <= -5000000.0) || !(y <= 1.9e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-5000000.0d0)) .or. (.not. (y <= 1.9d+15))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -5000000.0) || !(y <= 1.9e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= -5000000.0) or not (y <= 1.9e+15): tmp = (x + (z / y)) - ((x * a) / 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 <= -5000000.0) || !(y <= 1.9e+15)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -5000000.0) || ~((y <= 1.9e+15))) tmp = (x + (z / y)) - ((x * a) / 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, -5000000.0], N[Not[LessEqual[y, 1.9e+15]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $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 -5000000 \lor \neg \left(y \leq 1.9 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -5e6 or 1.9e15 < y Initial program 5.7%
Taylor expanded in y around inf 65.8%
if -5e6 < y < 1.9e15Initial program 99.7%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around 0 74.6%
*-commutative74.6%
Simplified74.6%
Final simplification70.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -32000000.0) (not (<= y 4.3e+15))) (- (+ x (/ z y)) (/ (* x a) 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 <= -32000000.0) || !(y <= 4.3e+15)) {
tmp = (x + (z / y)) - ((x * a) / 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 <= (-32000000.0d0)) .or. (.not. (y <= 4.3d+15))) then
tmp = (x + (z / y)) - ((x * a) / 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 <= -32000000.0) || !(y <= 4.3e+15)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -32000000.0) or not (y <= 4.3e+15): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = t / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -32000000.0) || !(y <= 4.3e+15)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / 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 <= -32000000.0) || ~((y <= 4.3e+15))) tmp = (x + (z / y)) - ((x * a) / 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, -32000000.0], N[Not[LessEqual[y, 4.3e+15]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -32000000 \lor \neg \left(y \leq 4.3 \cdot 10^{+15}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -3.2e7 or 4.3e15 < y Initial program 5.7%
Taylor expanded in y around inf 65.8%
if -3.2e7 < y < 4.3e15Initial program 99.7%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification67.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -100000000.0) x (if (<= y 3e+15) (/ 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 <= -100000000.0) {
tmp = x;
} else if (y <= 3e+15) {
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 <= (-100000000.0d0)) then
tmp = x
else if (y <= 3d+15) 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 <= -100000000.0) {
tmp = x;
} else if (y <= 3e+15) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -100000000.0: tmp = x elif y <= 3e+15: 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 <= -100000000.0) tmp = x; elseif (y <= 3e+15) 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 <= -100000000.0) tmp = x; elseif (y <= 3e+15) 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, -100000000.0], x, If[LessEqual[y, 3e+15], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -100000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1e8 or 3e15 < y Initial program 5.7%
Taylor expanded in y around inf 56.0%
if -1e8 < y < 3e15Initial program 99.7%
Taylor expanded in t around inf 76.0%
Taylor expanded in y around 0 69.5%
*-commutative69.5%
Simplified69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -2.55e-39) x (if (<= y 4e+15) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.55e-39) {
tmp = x;
} else if (y <= 4e+15) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-2.55d-39)) then
tmp = x
else if (y <= 4d+15) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.55e-39) {
tmp = x;
} else if (y <= 4e+15) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.55e-39: tmp = x elif y <= 4e+15: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.55e-39) tmp = x; elseif (y <= 4e+15) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.55e-39) tmp = x; elseif (y <= 4e+15) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.55e-39], x, If[LessEqual[y, 4e+15], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.54999999999999994e-39 or 4e15 < y Initial program 12.1%
Taylor expanded in y around inf 53.2%
if -2.54999999999999994e-39 < y < 4e15Initial program 99.7%
Taylor expanded in y around 0 55.2%
(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 54.9%
Taylor expanded in y around inf 28.7%
herbie shell --seed 2024102
(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)))