
(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 16 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 (/ 27464.7644705 (* z z)))
(t_2 (+ (+ (/ b (* y y)) (/ a y)) 1.0))
(t_3 (/ x t_2))
(t_4 (/ t (fma y (fma y (fma y (+ y a) b) c) i))))
(if (<= y -3.25e+128)
(+ t_4 (+ t_3 (/ z y)))
(if (<= y -2.6e+26)
(+
t_4
(+
t_3
(/
y
(-
(+ (+ (/ (* y y) z) (/ b z)) (* y (- (/ a z) t_1)))
(fma
-27464.7644705
(/ (- t_1 (/ a z)) z)
(/ 230661.510616 (* z z)))))))
(if (<= y 1.35e+18)
(/
(+
t
(+
(* x (pow y 4.0))
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ t_4 (+ (/ z y) (* x (/ 1.0 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 27464.7644705 / (z * z);
double t_2 = ((b / (y * y)) + (a / y)) + 1.0;
double t_3 = x / t_2;
double t_4 = t / fma(y, fma(y, fma(y, (y + a), b), c), i);
double tmp;
if (y <= -3.25e+128) {
tmp = t_4 + (t_3 + (z / y));
} else if (y <= -2.6e+26) {
tmp = t_4 + (t_3 + (y / (((((y * y) / z) + (b / z)) + (y * ((a / z) - t_1))) - fma(-27464.7644705, ((t_1 - (a / z)) / z), (230661.510616 / (z * z))))));
} else if (y <= 1.35e+18) {
tmp = (t + ((x * pow(y, 4.0)) + (y * (230661.510616 + (y * (27464.7644705 + (y * z))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = t_4 + ((z / y) + (x * (1.0 / t_2)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(27464.7644705 / Float64(z * z)) t_2 = Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0) t_3 = Float64(x / t_2) t_4 = Float64(t / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)) tmp = 0.0 if (y <= -3.25e+128) tmp = Float64(t_4 + Float64(t_3 + Float64(z / y))); elseif (y <= -2.6e+26) tmp = Float64(t_4 + Float64(t_3 + Float64(y / Float64(Float64(Float64(Float64(Float64(y * y) / z) + Float64(b / z)) + Float64(y * Float64(Float64(a / z) - t_1))) - fma(-27464.7644705, Float64(Float64(t_1 - Float64(a / z)) / z), Float64(230661.510616 / Float64(z * z))))))); elseif (y <= 1.35e+18) tmp = Float64(Float64(t + Float64(Float64(x * (y ^ 4.0)) + 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(t_4 + Float64(Float64(z / y) + Float64(x * Float64(1.0 / t_2)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(27464.7644705 / N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.25e+128], N[(t$95$4 + N[(t$95$3 + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e+26], N[(t$95$4 + N[(t$95$3 + N[(y / N[(N[(N[(N[(N[(y * y), $MachinePrecision] / z), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a / z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-27464.7644705 * N[(N[(t$95$1 - N[(a / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(230661.510616 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+18], N[(N[(t + N[(N[(x * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision] + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $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[(t$95$4 + N[(N[(z / y), $MachinePrecision] + N[(x * N[(1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{27464.7644705}{z \cdot z}\\
t_2 := \left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1\\
t_3 := \frac{x}{t_2}\\
t_4 := \frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{if}\;y \leq -3.25 \cdot 10^{+128}:\\
\;\;\;\;t_4 + \left(t_3 + \frac{z}{y}\right)\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{+26}:\\
\;\;\;\;t_4 + \left(t_3 + \frac{y}{\left(\left(\frac{y \cdot y}{z} + \frac{b}{z}\right) + y \cdot \left(\frac{a}{z} - t_1\right)\right) - \mathsf{fma}\left(-27464.7644705, \frac{t_1 - \frac{a}{z}}{z}, \frac{230661.510616}{z \cdot z}\right)}\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+18}:\\
\;\;\;\;\frac{t + \left(x \cdot {y}^{4} + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_4 + \left(\frac{z}{y} + x \cdot \frac{1}{t_2}\right)\\
\end{array}
\end{array}
if y < -3.25000000000000015e128Initial program 0.0%
Taylor expanded in x around 0 0.0%
+-commutative0.0%
+-commutative0.0%
+-commutative0.0%
+-commutative0.0%
fma-udef0.0%
fma-udef0.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in y around inf 33.3%
+-commutative33.3%
unpow233.3%
Simplified33.3%
Taylor expanded in y around inf 97.0%
if -3.25000000000000015e128 < y < -2.60000000000000002e26Initial program 12.1%
Taylor expanded in x around 0 11.6%
+-commutative11.6%
+-commutative11.6%
+-commutative11.6%
+-commutative11.6%
fma-udef11.6%
fma-udef11.6%
fma-udef11.6%
Simplified21.1%
Taylor expanded in y around inf 31.7%
+-commutative31.7%
unpow231.7%
Simplified31.7%
Taylor expanded in y around -inf 70.2%
Simplified70.2%
if -2.60000000000000002e26 < y < 1.35e18Initial program 99.7%
Taylor expanded in x around 0 99.7%
if 1.35e18 < y Initial program 4.5%
Taylor expanded in x around 0 4.4%
+-commutative4.4%
+-commutative4.4%
+-commutative4.4%
+-commutative4.4%
fma-udef4.4%
fma-udef4.4%
fma-udef4.4%
Simplified12.7%
Taylor expanded in y around inf 35.4%
+-commutative35.4%
unpow235.4%
Simplified35.4%
div-inv35.4%
Applied egg-rr35.4%
Taylor expanded in y around inf 76.6%
Final simplification90.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 5e+284)
t_1
(+
(/ t (fma y (fma y (fma y (+ y a) b) c) i))
(+ (/ z y) (* x (/ 1.0 (+ (+ (/ b (* y y)) (/ a y)) 1.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+284) {
tmp = t_1;
} else {
tmp = (t / fma(y, fma(y, fma(y, (y + a), b), c), i)) + ((z / y) + (x * (1.0 / (((b / (y * y)) + (a / y)) + 1.0))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = 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)))))))) tmp = 0.0 if (t_1 <= 5e+284) tmp = t_1; else tmp = Float64(Float64(t / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)) + Float64(Float64(z / y) + Float64(x * Float64(1.0 / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 5e+284], t$95$1, N[(N[(t / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision] + N[(N[(z / y), $MachinePrecision] + N[(x * N[(1.0 / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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{if}\;t_1 \leq 5 \cdot 10^{+284}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)} + \left(\frac{z}{y} + x \cdot \frac{1}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 4.9999999999999999e284Initial program 89.9%
if 4.9999999999999999e284 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.5%
Taylor expanded in x around 0 1.5%
+-commutative1.5%
+-commutative1.5%
+-commutative1.5%
+-commutative1.5%
fma-udef1.5%
fma-udef1.5%
fma-udef1.5%
Simplified7.2%
Taylor expanded in y around inf 35.3%
+-commutative35.3%
unpow235.3%
Simplified35.3%
div-inv35.3%
Applied egg-rr35.3%
Taylor expanded in y around inf 82.7%
Final simplification87.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 5e+284)
t_1
(+
(/ t (fma y (fma y (fma y (+ y a) b) c) i))
(+ (/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)) (/ z y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+284) {
tmp = t_1;
} else {
tmp = (t / fma(y, fma(y, fma(y, (y + a), b), c), i)) + ((x / (((b / (y * y)) + (a / y)) + 1.0)) + (z / y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = 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)))))))) tmp = 0.0 if (t_1 <= 5e+284) tmp = t_1; else tmp = Float64(Float64(t / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)) + Float64(Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)) + Float64(z / y))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 5e+284], t$95$1, N[(N[(t / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision] + N[(N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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{if}\;t_1 \leq 5 \cdot 10^{+284}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)} + \left(\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1} + \frac{z}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 4.9999999999999999e284Initial program 89.9%
if 4.9999999999999999e284 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.5%
Taylor expanded in x around 0 1.5%
+-commutative1.5%
+-commutative1.5%
+-commutative1.5%
+-commutative1.5%
fma-udef1.5%
fma-udef1.5%
fma-udef1.5%
Simplified7.2%
Taylor expanded in y around inf 35.3%
+-commutative35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in y around inf 82.7%
Final simplification87.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 2e+300) t_1 (/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 2e+300) {
tmp = t_1;
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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 = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
if (t_1 <= 2d+300) then
tmp = t_1
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 2e+300) {
tmp = t_1;
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= 2e+300: tmp = t_1 else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = 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)))))))) tmp = 0.0 if (t_1 <= 2e+300) tmp = t_1; else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= 2e+300) tmp = t_1; else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 2e+300], t$95$1, N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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{if}\;t_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 2.0000000000000001e300Initial program 89.9%
if 2.0000000000000001e300 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.5%
Taylor expanded in x around inf 0.4%
associate-/l*4.3%
+-commutative4.3%
+-commutative4.3%
+-commutative4.3%
+-commutative4.3%
fma-udef4.3%
fma-udef4.3%
fma-udef4.3%
Simplified4.3%
Taylor expanded in y around inf 72.0%
+-commutative34.6%
unpow234.6%
Simplified72.0%
Final simplification82.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 4.4e+17)
(/
(+ t (* y (+ 230661.510616 (* (* y y) z))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 4.4e+17) {
tmp = (t + (y * (230661.510616 + ((y * y) * z)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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 <= (-8d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 4.4d+17) then
tmp = (t + (y * (230661.510616d0 + ((y * y) * z)))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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 <= -8e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 4.4e+17) {
tmp = (t + (y * (230661.510616 + ((y * y) * z)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 4.4e+17: tmp = (t + (y * (230661.510616 + ((y * y) * z)))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 4.4e+17) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(Float64(y * y) * z)))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 4.4e+17) tmp = (t + (y * (230661.510616 + ((y * y) * z)))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+17], N[(N[(t + N[(y * N[(230661.510616 + N[(N[(y * y), $MachinePrecision] * z), $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[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + \left(y \cdot y\right) \cdot z\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -8.00000000000000024e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -8.00000000000000024e40 < y < 4.4e17Initial program 97.6%
Taylor expanded in z around inf 91.6%
*-commutative91.6%
unpow291.6%
Simplified91.6%
if 4.4e17 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
fma-udef9.2%
fma-udef9.2%
fma-udef9.2%
Simplified9.2%
Taylor expanded in y around inf 70.3%
+-commutative35.4%
unpow235.4%
Simplified70.3%
Final simplification79.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -7.5e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 3.75e+25)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y b)))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -7.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 3.75e+25) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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.5d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 3.75d+25) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 3.75e+25) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.5e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 3.75e+25: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b)))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.5e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 3.75e+25) 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 * b))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -7.5e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 3.75e+25) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * b)))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.5e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.75e+25], 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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 3.75 \cdot 10^{+25}:\\
\;\;\;\;\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 b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -7.4999999999999996e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -7.4999999999999996e40 < y < 3.74999999999999996e25Initial program 95.6%
Taylor expanded in y around 0 92.4%
*-commutative92.4%
Simplified92.4%
if 3.74999999999999996e25 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*7.8%
+-commutative7.8%
+-commutative7.8%
+-commutative7.8%
+-commutative7.8%
fma-udef7.8%
fma-udef7.8%
fma-udef7.8%
Simplified7.8%
Taylor expanded in y around inf 73.9%
+-commutative36.1%
unpow236.1%
Simplified73.9%
Final simplification80.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 1.12e+18)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.12e+18) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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 <= (-8d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 1.12d+18) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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 <= -8e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.12e+18) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 1.12e+18: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 1.12e+18) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 1.12e+18) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+18], 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], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+18}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -8.00000000000000024e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -8.00000000000000024e40 < y < 1.12e18Initial program 97.6%
Taylor expanded in y around 0 84.0%
*-commutative82.1%
Simplified84.0%
if 1.12e18 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
fma-udef9.2%
fma-udef9.2%
fma-udef9.2%
Simplified9.2%
Taylor expanded in y around inf 70.3%
+-commutative35.4%
unpow235.4%
Simplified70.3%
Final simplification75.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8.5e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 61000.0)
(/ (+ t (* y (+ 230661.510616 (* y (* y z))))) (+ i (* y (+ c (* y b)))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 61000.0) {
tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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 <= (-8.5d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 61000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * (y * z))))) / (i + (y * (c + (y * b))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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 <= -8.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 61000.0) {
tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8.5e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 61000.0: tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * b)))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8.5e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 61000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(y * z))))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8.5e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 61000.0) tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * b)))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8.5e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 61000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 61000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -8.49999999999999996e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -8.49999999999999996e40 < y < 61000Initial program 97.6%
Taylor expanded in y around 0 94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in z around inf 90.2%
unpow290.2%
associate-*l*90.2%
Simplified90.2%
if 61000 < y Initial program 7.6%
Taylor expanded in x around inf 4.3%
associate-/l*10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
fma-udef10.7%
fma-udef10.7%
fma-udef10.7%
Simplified10.7%
Taylor expanded in y around inf 68.0%
+-commutative35.9%
unpow235.9%
Simplified68.0%
Final simplification77.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -7.5e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 1.25)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -7.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.25) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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.5d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 1.25d0) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * b))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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.5e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.25) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.5e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 1.25: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.5e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 1.25) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -7.5e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 1.25) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.5e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25], 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], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 1.25:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -7.4999999999999996e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -7.4999999999999996e40 < y < 1.25Initial program 97.6%
Taylor expanded in y around 0 94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around 0 83.7%
*-commutative83.7%
Simplified83.7%
if 1.25 < y Initial program 7.6%
Taylor expanded in x around inf 4.3%
associate-/l*10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
fma-udef10.7%
fma-udef10.7%
fma-udef10.7%
Simplified10.7%
Taylor expanded in y around inf 68.0%
+-commutative35.9%
unpow235.9%
Simplified68.0%
Final simplification74.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -7.2e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 8600.0)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -7.2e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 8600.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 8600.0d0) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 8600.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.2e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 8600.0: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.2e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 8600.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -7.2e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 8600.0) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.2e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8600.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 8600:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -7.19999999999999993e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -7.19999999999999993e40 < y < 8600Initial program 97.6%
Taylor expanded in y around 0 94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around 0 83.3%
*-commutative83.3%
Simplified83.3%
if 8600 < y Initial program 7.6%
Taylor expanded in x around inf 4.3%
associate-/l*10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
fma-udef10.7%
fma-udef10.7%
fma-udef10.7%
Simplified10.7%
Taylor expanded in y around inf 68.0%
+-commutative35.9%
unpow235.9%
Simplified68.0%
Final simplification74.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -7.2e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 3.9e+14)
(/ t (+ i (* y (+ c (* y b)))))
(/ x (+ (+ (/ b (* y y)) (/ a y)) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -7.2e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 3.9e+14) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
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+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 3.9d+14) then
tmp = t / (i + (y * (c + (y * b))))
else
tmp = x / (((b / (y * y)) + (a / y)) + 1.0d0)
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+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 3.9e+14) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = x / (((b / (y * y)) + (a / y)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -7.2e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 3.9e+14: tmp = t / (i + (y * (c + (y * b)))) else: tmp = x / (((b / (y * y)) + (a / y)) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -7.2e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 3.9e+14) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x / Float64(Float64(Float64(b / Float64(y * y)) + Float64(a / y)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -7.2e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 3.9e+14) tmp = t / (i + (y * (c + (y * b)))); else tmp = x / (((b / (y * y)) + (a / y)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -7.2e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+14], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(b / N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(a / y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+14}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(\frac{b}{y \cdot y} + \frac{a}{y}\right) + 1}\\
\end{array}
\end{array}
if y < -7.19999999999999993e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -7.19999999999999993e40 < y < 3.9e14Initial program 97.6%
Taylor expanded in y around 0 94.2%
*-commutative94.2%
Simplified94.2%
Taylor expanded in t around inf 71.7%
if 3.9e14 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
fma-udef9.2%
fma-udef9.2%
fma-udef9.2%
Simplified9.2%
Taylor expanded in y around inf 70.3%
+-commutative35.4%
unpow235.4%
Simplified70.3%
Final simplification68.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8.2e+40)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 7600000000000.0)
(/ t (+ i (* y (+ c (* y b)))))
(/ x (+ (/ a y) 1.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8.2e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7600000000000.0) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = x / ((a / y) + 1.0);
}
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 <= (-8.2d+40)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 7600000000000.0d0) then
tmp = t / (i + (y * (c + (y * b))))
else
tmp = x / ((a / y) + 1.0d0)
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 <= -8.2e+40) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7600000000000.0) {
tmp = t / (i + (y * (c + (y * b))));
} else {
tmp = x / ((a / y) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8.2e+40: tmp = x + ((z / y) - (a / (y / x))) elif y <= 7600000000000.0: tmp = t / (i + (y * (c + (y * b)))) else: tmp = x / ((a / y) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8.2e+40) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 7600000000000.0) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x / Float64(Float64(a / y) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8.2e+40) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 7600000000000.0) tmp = t / (i + (y * (c + (y * b)))); else tmp = x / ((a / y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8.2e+40], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7600000000000.0], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+40}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 7600000000000:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y} + 1}\\
\end{array}
\end{array}
if y < -8.2000000000000003e40Initial program 5.8%
Taylor expanded in y around inf 56.4%
associate--l+56.4%
associate-/l*59.6%
Simplified59.6%
if -8.2000000000000003e40 < y < 7.6e12Initial program 97.6%
Taylor expanded in y around 0 94.2%
*-commutative94.2%
Simplified94.2%
Taylor expanded in t around inf 71.7%
if 7.6e12 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
fma-udef9.2%
fma-udef9.2%
fma-udef9.2%
Simplified9.2%
Taylor expanded in y around inf 65.4%
+-commutative65.4%
Simplified65.4%
Final simplification67.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.2e+18) (+ x (- (/ z y) (/ a (/ y x)))) (if (<= y 1.18e+17) (/ t i) (/ x (+ 1.0 (/ a y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.2e+18) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.18e+17) {
tmp = t / i;
} else {
tmp = x / (1.0 + (a / 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.2d+18)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 1.18d+17) then
tmp = t / i
else
tmp = x / (1.0d0 + (a / 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.2e+18) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.18e+17) {
tmp = t / i;
} else {
tmp = x / (1.0 + (a / y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.2e+18: tmp = x + ((z / y) - (a / (y / x))) elif y <= 1.18e+17: tmp = t / i else: tmp = x / (1.0 + (a / y)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.2e+18) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 1.18e+17) tmp = Float64(t / i); else tmp = Float64(x / Float64(1.0 + Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3.2e+18) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 1.18e+17) tmp = t / i; else tmp = x / (1.0 + (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.2e+18], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e+17], N[(t / i), $MachinePrecision], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+17}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\end{array}
\end{array}
if y < -3.2e18Initial program 5.8%
Taylor expanded in y around inf 53.9%
associate--l+53.9%
associate-/l*56.9%
Simplified56.9%
if -3.2e18 < y < 1.18e17Initial program 99.7%
Taylor expanded in y around 0 52.6%
if 1.18e17 < y Initial program 4.5%
Taylor expanded in x around inf 2.6%
associate-/l*9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
+-commutative9.2%
fma-udef9.2%
fma-udef9.2%
fma-udef9.2%
Simplified9.2%
Taylor expanded in y around inf 65.4%
+-commutative65.4%
Simplified65.4%
Final simplification56.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.8e-10) (not (<= y 1.15e+14))) (/ x (+ (/ a y) 1.0)) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.8e-10) || !(y <= 1.15e+14)) {
tmp = x / ((a / y) + 1.0);
} else {
tmp = t / 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 <= (-2.8d-10)) .or. (.not. (y <= 1.15d+14))) then
tmp = x / ((a / y) + 1.0d0)
else
tmp = t / 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 <= -2.8e-10) || !(y <= 1.15e+14)) {
tmp = x / ((a / y) + 1.0);
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.8e-10) or not (y <= 1.15e+14): tmp = x / ((a / y) + 1.0) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.8e-10) || !(y <= 1.15e+14)) tmp = Float64(x / Float64(Float64(a / y) + 1.0)); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.8e-10) || ~((y <= 1.15e+14))) tmp = x / ((a / y) + 1.0); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.8e-10], N[Not[LessEqual[y, 1.15e+14]], $MachinePrecision]], N[(x / N[(N[(a / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-10} \lor \neg \left(y \leq 1.15 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -2.80000000000000015e-10 or 1.15e14 < y Initial program 6.7%
Taylor expanded in x around inf 3.2%
associate-/l*7.9%
+-commutative7.9%
+-commutative7.9%
+-commutative7.9%
+-commutative7.9%
fma-udef7.9%
fma-udef7.9%
fma-udef7.9%
Simplified7.9%
Taylor expanded in y around inf 59.5%
+-commutative59.5%
Simplified59.5%
if -2.80000000000000015e-10 < y < 1.15e14Initial program 99.7%
Taylor expanded in y around 0 53.3%
Final simplification56.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.9e+29) x (if (<= y 7.8e+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 <= -1.9e+29) {
tmp = x;
} else if (y <= 7.8e+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 <= (-1.9d+29)) then
tmp = x
else if (y <= 7.8d+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 <= -1.9e+29) {
tmp = x;
} else if (y <= 7.8e+15) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.9e+29: tmp = x elif y <= 7.8e+15: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.9e+29) tmp = x; elseif (y <= 7.8e+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 <= -1.9e+29) tmp = x; elseif (y <= 7.8e+15) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.9e+29], x, If[LessEqual[y, 7.8e+15], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+29}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.89999999999999985e29 or 7.8e15 < y Initial program 5.2%
Taylor expanded in y around inf 47.1%
if -1.89999999999999985e29 < y < 7.8e15Initial program 99.0%
Taylor expanded in y around 0 52.2%
Final simplification49.8%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 55.0%
Taylor expanded in y around inf 23.8%
Final simplification23.8%
herbie shell --seed 2023290
(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)))