
(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 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -7.6e+46)
t_1
(if (<= y 7.8e+63)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(if (<= y 3.8e+151) (/ x (/ (+ (+ y a) (/ b y)) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -7.6e+46) {
tmp = t_1;
} else if (y <= 7.8e+63) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else if (y <= 3.8e+151) {
tmp = x / (((y + a) + (b / y)) / y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -7.6e+46) tmp = t_1; elseif (y <= 7.8e+63) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); elseif (y <= 3.8e+151) tmp = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e+46], t$95$1, If[LessEqual[y, 7.8e+63], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+151], N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+63}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+151}:\\
\;\;\;\;\frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.5999999999999998e46 or 3.8e151 < y Initial program 1.2%
Taylor expanded in y around inf 80.0%
associate--l+80.0%
associate-/l*87.0%
Simplified87.0%
if -7.5999999999999998e46 < y < 7.8e63Initial program 90.2%
fma-def90.2%
fma-def90.2%
fma-def90.2%
fma-def90.2%
fma-def90.2%
fma-def90.2%
fma-def90.2%
Simplified90.2%
if 7.8e63 < y < 3.8e151Initial program 0.5%
Taylor expanded in t around 0 0.5%
Simplified1.4%
Taylor expanded in y around -inf 74.9%
Simplified74.9%
Taylor expanded in x around inf 62.0%
associate-/l*85.7%
associate-+r+85.7%
+-commutative85.7%
Simplified85.7%
Final simplification88.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -7.6e+46)
t_2
(if (<= y 8.9e+61)
(+
(/ t t_1)
(/
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))
t_1))
(if (<= y 3e+154) (/ x (/ (+ (+ y a) (/ b y)) y)) t_2)))))
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 t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -7.6e+46) {
tmp = t_2;
} else if (y <= 8.9e+61) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else if (y <= 3e+154) {
tmp = x / (((y + a) + (b / y)) / y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = i + (y * (c + (y * (b + (y * (y + a))))))
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-7.6d+46)) then
tmp = t_2
else if (y <= 8.9d+61) then
tmp = (t / t_1) + ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x))))))) / t_1)
else if (y <= 3d+154) then
tmp = x / (((y + a) + (b / y)) / y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -7.6e+46) {
tmp = t_2;
} else if (y <= 8.9e+61) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else if (y <= 3e+154) {
tmp = x / (((y + a) + (b / y)) / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * (c + (y * (b + (y * (y + a)))))) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -7.6e+46: tmp = t_2 elif y <= 8.9e+61: tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1) elif y <= 3e+154: tmp = x / (((y + a) + (b / y)) / y) else: tmp = t_2 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))))))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -7.6e+46) tmp = t_2; elseif (y <= 8.9e+61) 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)); elseif (y <= 3e+154) tmp = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)); else tmp = t_2; 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)))))); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -7.6e+46) tmp = t_2; elseif (y <= 8.9e+61) tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1); elseif (y <= 3e+154) tmp = x / (((y + a) + (b / y)) / y); else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e+46], t$95$2, If[LessEqual[y, 8.9e+61], 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], If[LessEqual[y, 3e+154], N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\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)\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.9 \cdot 10^{+61}:\\
\;\;\;\;\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{elif}\;y \leq 3 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.5999999999999998e46 or 3.00000000000000026e154 < y Initial program 1.2%
Taylor expanded in y around inf 80.0%
associate--l+80.0%
associate-/l*87.0%
Simplified87.0%
if -7.5999999999999998e46 < y < 8.90000000000000005e61Initial program 90.2%
Taylor expanded in t around 0 90.2%
if 8.90000000000000005e61 < y < 3.00000000000000026e154Initial program 0.5%
Taylor expanded in t around 0 0.5%
Simplified1.4%
Taylor expanded in y around -inf 74.9%
Simplified74.9%
Taylor expanded in x around inf 62.0%
associate-/l*85.7%
associate-+r+85.7%
+-commutative85.7%
Simplified85.7%
Final simplification88.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ x (/ (+ (+ y a) (/ b y)) y)))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1e+129)
t_2
(if (<= y -3.6e+20)
t_1
(if (<= y 660000.0)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 5.5e+151) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1e+129) {
tmp = t_2;
} else if (y <= -3.6e+20) {
tmp = t_1;
} else if (y <= 660000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 5.5e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (((y + a) + (b / y)) / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-1d+129)) then
tmp = t_2
else if (y <= (-3.6d+20)) then
tmp = t_1
else if (y <= 660000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 5.5d+151) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1e+129) {
tmp = t_2;
} else if (y <= -3.6e+20) {
tmp = t_1;
} else if (y <= 660000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 5.5e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x / (((y + a) + (b / y)) / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1e+129: tmp = t_2 elif y <= -3.6e+20: tmp = t_1 elif y <= 660000.0: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 5.5e+151: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -1e+129) tmp = t_2; elseif (y <= -3.6e+20) tmp = t_1; elseif (y <= 660000.0) 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)))))))); elseif (y <= 5.5e+151) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x / (((y + a) + (b / y)) / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -1e+129) tmp = t_2; elseif (y <= -3.6e+20) tmp = t_1; elseif (y <= 660000.0) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 5.5e+151) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+129], t$95$2, If[LessEqual[y, -3.6e+20], t$95$1, If[LessEqual[y, 660000.0], 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], If[LessEqual[y, 5.5e+151], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{+129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 660000:\\
\;\;\;\;\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{elif}\;y \leq 5.5 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1e129 or 5.4999999999999994e151 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -1e129 < y < -3.6e20 or 6.6e5 < y < 5.4999999999999994e151Initial program 18.6%
Taylor expanded in t around 0 15.0%
Simplified17.5%
Taylor expanded in y around -inf 56.5%
Simplified56.5%
Taylor expanded in x around inf 47.4%
associate-/l*63.8%
associate-+r+63.8%
+-commutative63.8%
Simplified63.8%
if -3.6e20 < y < 6.6e5Initial program 99.8%
Taylor expanded in x around 0 93.4%
Final simplification86.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -4.3e+46)
t_1
(if (<= y 8.9e+61)
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 9.5e+155) (/ x (/ (+ (+ y a) (/ b y)) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.3e+46) {
tmp = t_1;
} else if (y <= 8.9e+61) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 9.5e+155) {
tmp = x / (((y + a) + (b / y)) / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z / y) - (a / (y / x)))
if (y <= (-4.3d+46)) then
tmp = t_1
else if (y <= 8.9d+61) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 9.5d+155) then
tmp = x / (((y + a) + (b / y)) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.3e+46) {
tmp = t_1;
} else if (y <= 8.9e+61) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 9.5e+155) {
tmp = x / (((y + a) + (b / y)) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -4.3e+46: tmp = t_1 elif y <= 8.9e+61: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 9.5e+155: tmp = x / (((y + a) + (b / y)) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -4.3e+46) tmp = t_1; elseif (y <= 8.9e+61) 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)))))))); elseif (y <= 9.5e+155) tmp = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -4.3e+46) tmp = t_1; elseif (y <= 8.9e+61) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 9.5e+155) tmp = x / (((y + a) + (b / y)) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.3e+46], t$95$1, If[LessEqual[y, 8.9e+61], 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[y, 9.5e+155], N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.9 \cdot 10^{+61}:\\
\;\;\;\;\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{elif}\;y \leq 9.5 \cdot 10^{+155}:\\
\;\;\;\;\frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.30000000000000005e46 or 9.5000000000000006e155 < y Initial program 1.2%
Taylor expanded in y around inf 80.0%
associate--l+80.0%
associate-/l*87.0%
Simplified87.0%
if -4.30000000000000005e46 < y < 8.90000000000000005e61Initial program 90.2%
if 8.90000000000000005e61 < y < 9.5000000000000006e155Initial program 0.5%
Taylor expanded in t around 0 0.5%
Simplified1.4%
Taylor expanded in y around -inf 74.9%
Simplified74.9%
Taylor expanded in x around inf 62.0%
associate-/l*85.7%
associate-+r+85.7%
+-commutative85.7%
Simplified85.7%
Final simplification88.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ x (/ (+ (+ y a) (/ b y)) y)))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -2.5e+124)
t_2
(if (<= y -8.2e+17)
t_1
(if (<= y 115000000000.0)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 4.7e+151) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -2.5e+124) {
tmp = t_2;
} else if (y <= -8.2e+17) {
tmp = t_1;
} else if (y <= 115000000000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 4.7e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (((y + a) + (b / y)) / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-2.5d+124)) then
tmp = t_2
else if (y <= (-8.2d+17)) then
tmp = t_1
else if (y <= 115000000000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 4.7d+151) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -2.5e+124) {
tmp = t_2;
} else if (y <= -8.2e+17) {
tmp = t_1;
} else if (y <= 115000000000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 4.7e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x / (((y + a) + (b / y)) / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -2.5e+124: tmp = t_2 elif y <= -8.2e+17: tmp = t_1 elif y <= 115000000000.0: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 4.7e+151: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -2.5e+124) tmp = t_2; elseif (y <= -8.2e+17) tmp = t_1; elseif (y <= 115000000000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); elseif (y <= 4.7e+151) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x / (((y + a) + (b / y)) / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -2.5e+124) tmp = t_2; elseif (y <= -8.2e+17) tmp = t_1; elseif (y <= 115000000000.0) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 4.7e+151) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+124], t$95$2, If[LessEqual[y, -8.2e+17], t$95$1, If[LessEqual[y, 115000000000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $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[y, 4.7e+151], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+124}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 115000000000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.4999999999999998e124 or 4.69999999999999989e151 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -2.4999999999999998e124 < y < -8.2e17 or 1.15e11 < y < 4.69999999999999989e151Initial program 17.3%
Taylor expanded in t around 0 15.4%
Simplified18.0%
Taylor expanded in y around -inf 56.7%
Simplified56.7%
Taylor expanded in x around inf 47.3%
associate-/l*64.3%
associate-+r+64.3%
+-commutative64.3%
Simplified64.3%
if -8.2e17 < y < 1.15e11Initial program 99.0%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
Simplified88.8%
Final simplification84.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ x (/ (+ (+ y a) (/ b y)) y)))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -6.5e+127)
t_2
(if (<= y -5.2e+16)
t_1
(if (<= y 3000000000.0)
(/
(+ t (* y 230661.510616))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y 1.4e+154) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -6.5e+127) {
tmp = t_2;
} else if (y <= -5.2e+16) {
tmp = t_1;
} else if (y <= 3000000000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 1.4e+154) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (((y + a) + (b / y)) / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-6.5d+127)) then
tmp = t_2
else if (y <= (-5.2d+16)) then
tmp = t_1
else if (y <= 3000000000.0d0) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else if (y <= 1.4d+154) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -6.5e+127) {
tmp = t_2;
} else if (y <= -5.2e+16) {
tmp = t_1;
} else if (y <= 3000000000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else if (y <= 1.4e+154) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x / (((y + a) + (b / y)) / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -6.5e+127: tmp = t_2 elif y <= -5.2e+16: tmp = t_1 elif y <= 3000000000.0: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) elif y <= 1.4e+154: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -6.5e+127) tmp = t_2; elseif (y <= -5.2e+16) tmp = t_1; elseif (y <= 3000000000.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); elseif (y <= 1.4e+154) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x / (((y + a) + (b / y)) / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -6.5e+127) tmp = t_2; elseif (y <= -5.2e+16) tmp = t_1; elseif (y <= 3000000000.0) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); elseif (y <= 1.4e+154) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+127], t$95$2, If[LessEqual[y, -5.2e+16], t$95$1, If[LessEqual[y, 3000000000.0], 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], If[LessEqual[y, 1.4e+154], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+127}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3000000000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -6.5e127 or 1.4e154 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -6.5e127 < y < -5.2e16 or 3e9 < y < 1.4e154Initial program 17.3%
Taylor expanded in t around 0 15.4%
Simplified18.0%
Taylor expanded in y around -inf 56.7%
Simplified56.7%
Taylor expanded in x around inf 47.3%
associate-/l*64.3%
associate-+r+64.3%
+-commutative64.3%
Simplified64.3%
if -5.2e16 < y < 3e9Initial program 99.0%
Taylor expanded in y around 0 88.0%
*-commutative88.0%
Simplified88.0%
Final simplification84.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ y a) (/ b y))) (t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -9.8e+125)
t_2
(if (<= y -1.2e-24)
(/ y (/ t_1 x))
(if (<= y 1e-8)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y c)))
(if (<= y 5e+155) (/ x (/ t_1 y)) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -9.8e+125) {
tmp = t_2;
} else if (y <= -1.2e-24) {
tmp = y / (t_1 / x);
} else if (y <= 1e-8) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c));
} else if (y <= 5e+155) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + a) + (b / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-9.8d+125)) then
tmp = t_2
else if (y <= (-1.2d-24)) then
tmp = y / (t_1 / x)
else if (y <= 1d-8) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * c))
else if (y <= 5d+155) then
tmp = x / (t_1 / y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -9.8e+125) {
tmp = t_2;
} else if (y <= -1.2e-24) {
tmp = y / (t_1 / x);
} else if (y <= 1e-8) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c));
} else if (y <= 5e+155) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y + a) + (b / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -9.8e+125: tmp = t_2 elif y <= -1.2e-24: tmp = y / (t_1 / x) elif y <= 1e-8: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)) elif y <= 5e+155: tmp = x / (t_1 / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y + a) + Float64(b / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -9.8e+125) tmp = t_2; elseif (y <= -1.2e-24) tmp = Float64(y / Float64(t_1 / x)); elseif (y <= 1e-8) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * c))); elseif (y <= 5e+155) tmp = Float64(x / Float64(t_1 / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y + a) + (b / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -9.8e+125) tmp = t_2; elseif (y <= -1.2e-24) tmp = y / (t_1 / x); elseif (y <= 1e-8) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * c)); elseif (y <= 5e+155) tmp = x / (t_1 / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.8e+125], t$95$2, If[LessEqual[y, -1.2e-24], N[(y / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-8], 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 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+155], N[(x / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + a\right) + \frac{b}{y}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{y}{\frac{t_1}{x}}\\
\mathbf{elif}\;y \leq 10^{-8}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+155}:\\
\;\;\;\;\frac{x}{\frac{t_1}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -9.80000000000000032e125 or 4.9999999999999999e155 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -9.80000000000000032e125 < y < -1.1999999999999999e-24Initial program 48.5%
Taylor expanded in t around 0 39.4%
Simplified39.9%
Taylor expanded in y around -inf 49.4%
Simplified49.4%
Taylor expanded in x around inf 55.6%
associate-+r+55.6%
+-commutative55.6%
Simplified55.6%
if -1.1999999999999999e-24 < y < 1e-8Initial program 99.8%
Taylor expanded in x around 0 95.4%
Taylor expanded in y around 0 85.2%
*-commutative85.2%
Simplified85.2%
if 1e-8 < y < 4.9999999999999999e155Initial program 20.1%
Taylor expanded in t around 0 12.4%
Simplified15.6%
Taylor expanded in y around -inf 49.3%
Simplified49.3%
Taylor expanded in x around inf 42.9%
associate-/l*55.7%
associate-+r+55.7%
+-commutative55.7%
Simplified55.7%
Final simplification79.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -3.1e+158)
x
(if (<= y -9.8e+109)
(/ z y)
(if (<= y -4.6e+27)
x
(if (<= y -1.75e-51)
(/ y (/ b (* y x)))
(if (<= y 1600000000.0) (/ 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 <= -3.1e+158) {
tmp = x;
} else if (y <= -9.8e+109) {
tmp = z / y;
} else if (y <= -4.6e+27) {
tmp = x;
} else if (y <= -1.75e-51) {
tmp = y / (b / (y * x));
} else if (y <= 1600000000.0) {
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 <= (-3.1d+158)) then
tmp = x
else if (y <= (-9.8d+109)) then
tmp = z / y
else if (y <= (-4.6d+27)) then
tmp = x
else if (y <= (-1.75d-51)) then
tmp = y / (b / (y * x))
else if (y <= 1600000000.0d0) 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 <= -3.1e+158) {
tmp = x;
} else if (y <= -9.8e+109) {
tmp = z / y;
} else if (y <= -4.6e+27) {
tmp = x;
} else if (y <= -1.75e-51) {
tmp = y / (b / (y * x));
} else if (y <= 1600000000.0) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.1e+158: tmp = x elif y <= -9.8e+109: tmp = z / y elif y <= -4.6e+27: tmp = x elif y <= -1.75e-51: tmp = y / (b / (y * x)) elif y <= 1600000000.0: 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 <= -3.1e+158) tmp = x; elseif (y <= -9.8e+109) tmp = Float64(z / y); elseif (y <= -4.6e+27) tmp = x; elseif (y <= -1.75e-51) tmp = Float64(y / Float64(b / Float64(y * x))); elseif (y <= 1600000000.0) 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 <= -3.1e+158) tmp = x; elseif (y <= -9.8e+109) tmp = z / y; elseif (y <= -4.6e+27) tmp = x; elseif (y <= -1.75e-51) tmp = y / (b / (y * x)); elseif (y <= 1600000000.0) 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, -3.1e+158], x, If[LessEqual[y, -9.8e+109], N[(z / y), $MachinePrecision], If[LessEqual[y, -4.6e+27], x, If[LessEqual[y, -1.75e-51], N[(y / N[(b / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1600000000.0], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+158}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{+109}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;\frac{y}{\frac{b}{y \cdot x}}\\
\mathbf{elif}\;y \leq 1600000000:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.1000000000000002e158 or -9.8000000000000007e109 < y < -4.6000000000000001e27 or 1.6e9 < y Initial program 6.2%
Taylor expanded in y around inf 56.3%
if -3.1000000000000002e158 < y < -9.8000000000000007e109Initial program 10.0%
Taylor expanded in x around 0 10.0%
Taylor expanded in y around inf 72.1%
if -4.6000000000000001e27 < y < -1.7499999999999999e-51Initial program 78.4%
Taylor expanded in t around 0 62.2%
Simplified62.3%
Taylor expanded in y around -inf 23.3%
Simplified23.3%
Taylor expanded in b around inf 21.9%
*-commutative21.9%
Simplified21.9%
if -1.7499999999999999e-51 < y < 1.6e9Initial program 98.9%
Taylor expanded in x around 0 95.4%
Taylor expanded in y around 0 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in t around inf 75.6%
Final simplification63.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ x (/ (+ (+ y a) (/ b y)) y)))
(t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -2.2e+128)
t_2
(if (<= y -1.75e-51)
t_1
(if (<= y 0.0018) (/ t (+ i (* y c))) (if (<= y 3.1e+153) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -2.2e+128) {
tmp = t_2;
} else if (y <= -1.75e-51) {
tmp = t_1;
} else if (y <= 0.0018) {
tmp = t / (i + (y * c));
} else if (y <= 3.1e+153) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (((y + a) + (b / y)) / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-2.2d+128)) then
tmp = t_2
else if (y <= (-1.75d-51)) then
tmp = t_1
else if (y <= 0.0018d0) then
tmp = t / (i + (y * c))
else if (y <= 3.1d+153) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / (((y + a) + (b / y)) / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -2.2e+128) {
tmp = t_2;
} else if (y <= -1.75e-51) {
tmp = t_1;
} else if (y <= 0.0018) {
tmp = t / (i + (y * c));
} else if (y <= 3.1e+153) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x / (((y + a) + (b / y)) / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -2.2e+128: tmp = t_2 elif y <= -1.75e-51: tmp = t_1 elif y <= 0.0018: tmp = t / (i + (y * c)) elif y <= 3.1e+153: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x / Float64(Float64(Float64(y + a) + Float64(b / y)) / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -2.2e+128) tmp = t_2; elseif (y <= -1.75e-51) tmp = t_1; elseif (y <= 0.0018) tmp = Float64(t / Float64(i + Float64(y * c))); elseif (y <= 3.1e+153) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x / (((y + a) + (b / y)) / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -2.2e+128) tmp = t_2; elseif (y <= -1.75e-51) tmp = t_1; elseif (y <= 0.0018) tmp = t / (i + (y * c)); elseif (y <= 3.1e+153) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x / N[(N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+128], t$95$2, If[LessEqual[y, -1.75e-51], t$95$1, If[LessEqual[y, 0.0018], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+153], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{\left(y + a\right) + \frac{b}{y}}{y}}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+128}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.0018:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.20000000000000017e128 or 3.1e153 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -2.20000000000000017e128 < y < -1.7499999999999999e-51 or 0.0018 < y < 3.1e153Initial program 32.6%
Taylor expanded in t around 0 24.5%
Simplified26.6%
Taylor expanded in y around -inf 48.5%
Simplified48.5%
Taylor expanded in x around inf 41.3%
associate-/l*53.3%
associate-+r+53.3%
+-commutative53.3%
Simplified53.3%
if -1.7499999999999999e-51 < y < 0.0018Initial program 99.8%
Taylor expanded in x around 0 96.2%
Taylor expanded in y around 0 85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in t around inf 76.8%
Final simplification75.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ y a) (/ b y))) (t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -1.45e+116)
t_2
(if (<= y -1.75e-51)
(/ y (/ t_1 x))
(if (<= y 0.0215)
(/ t (+ i (* y c)))
(if (<= y 2.1e+154) (/ x (/ t_1 y)) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.45e+116) {
tmp = t_2;
} else if (y <= -1.75e-51) {
tmp = y / (t_1 / x);
} else if (y <= 0.0215) {
tmp = t / (i + (y * c));
} else if (y <= 2.1e+154) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + a) + (b / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-1.45d+116)) then
tmp = t_2
else if (y <= (-1.75d-51)) then
tmp = y / (t_1 / x)
else if (y <= 0.0215d0) then
tmp = t / (i + (y * c))
else if (y <= 2.1d+154) then
tmp = x / (t_1 / y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -1.45e+116) {
tmp = t_2;
} else if (y <= -1.75e-51) {
tmp = y / (t_1 / x);
} else if (y <= 0.0215) {
tmp = t / (i + (y * c));
} else if (y <= 2.1e+154) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y + a) + (b / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -1.45e+116: tmp = t_2 elif y <= -1.75e-51: tmp = y / (t_1 / x) elif y <= 0.0215: tmp = t / (i + (y * c)) elif y <= 2.1e+154: tmp = x / (t_1 / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y + a) + Float64(b / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -1.45e+116) tmp = t_2; elseif (y <= -1.75e-51) tmp = Float64(y / Float64(t_1 / x)); elseif (y <= 0.0215) tmp = Float64(t / Float64(i + Float64(y * c))); elseif (y <= 2.1e+154) tmp = Float64(x / Float64(t_1 / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y + a) + (b / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -1.45e+116) tmp = t_2; elseif (y <= -1.75e-51) tmp = y / (t_1 / x); elseif (y <= 0.0215) tmp = t / (i + (y * c)); elseif (y <= 2.1e+154) tmp = x / (t_1 / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+116], t$95$2, If[LessEqual[y, -1.75e-51], N[(y / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0215], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+154], N[(x / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + a\right) + \frac{b}{y}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+116}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;\frac{y}{\frac{t_1}{x}}\\
\mathbf{elif}\;y \leq 0.0215:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\frac{t_1}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.4500000000000001e116 or 2.09999999999999994e154 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -1.4500000000000001e116 < y < -1.7499999999999999e-51Initial program 52.3%
Taylor expanded in t around 0 43.9%
Simplified44.3%
Taylor expanded in y around -inf 45.8%
Simplified45.8%
Taylor expanded in x around inf 51.8%
associate-+r+51.8%
+-commutative51.8%
Simplified51.8%
if -1.7499999999999999e-51 < y < 0.021499999999999998Initial program 99.8%
Taylor expanded in x around 0 96.2%
Taylor expanded in y around 0 85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in t around inf 76.8%
if 0.021499999999999998 < y < 2.09999999999999994e154Initial program 17.9%
Taylor expanded in t around 0 10.0%
Simplified13.3%
Taylor expanded in y around -inf 50.6%
Simplified50.6%
Taylor expanded in x around inf 43.9%
associate-/l*57.1%
associate-+r+57.1%
+-commutative57.1%
Simplified57.1%
Final simplification75.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (+ y a) (/ b y))) (t_2 (+ x (- (/ z y) (/ a (/ y x))))))
(if (<= y -4.8e+125)
t_2
(if (<= y -1.3e-24)
(/ y (/ t_1 x))
(if (<= y 62000000000.0)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y c)))
(if (<= y 1.02e+152) (/ x (/ t_1 y)) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.8e+125) {
tmp = t_2;
} else if (y <= -1.3e-24) {
tmp = y / (t_1 / x);
} else if (y <= 62000000000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c));
} else if (y <= 1.02e+152) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + a) + (b / y)
t_2 = x + ((z / y) - (a / (y / x)))
if (y <= (-4.8d+125)) then
tmp = t_2
else if (y <= (-1.3d-24)) then
tmp = y / (t_1 / x)
else if (y <= 62000000000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * c))
else if (y <= 1.02d+152) then
tmp = x / (t_1 / y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y + a) + (b / y);
double t_2 = x + ((z / y) - (a / (y / x)));
double tmp;
if (y <= -4.8e+125) {
tmp = t_2;
} else if (y <= -1.3e-24) {
tmp = y / (t_1 / x);
} else if (y <= 62000000000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c));
} else if (y <= 1.02e+152) {
tmp = x / (t_1 / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y + a) + (b / y) t_2 = x + ((z / y) - (a / (y / x))) tmp = 0 if y <= -4.8e+125: tmp = t_2 elif y <= -1.3e-24: tmp = y / (t_1 / x) elif y <= 62000000000.0: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c)) elif y <= 1.02e+152: tmp = x / (t_1 / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y + a) + Float64(b / y)) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))) tmp = 0.0 if (y <= -4.8e+125) tmp = t_2; elseif (y <= -1.3e-24) tmp = Float64(y / Float64(t_1 / x)); elseif (y <= 62000000000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * c))); elseif (y <= 1.02e+152) tmp = Float64(x / Float64(t_1 / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y + a) + (b / y); t_2 = x + ((z / y) - (a / (y / x))); tmp = 0.0; if (y <= -4.8e+125) tmp = t_2; elseif (y <= -1.3e-24) tmp = y / (t_1 / x); elseif (y <= 62000000000.0) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * c)); elseif (y <= 1.02e+152) tmp = x / (t_1 / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y + a), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+125], t$95$2, If[LessEqual[y, -1.3e-24], N[(y / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 62000000000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+152], N[(x / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + a\right) + \frac{b}{y}\\
t_2 := x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{y}{\frac{t_1}{x}}\\
\mathbf{elif}\;y \leq 62000000000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot c}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+152}:\\
\;\;\;\;\frac{x}{\frac{t_1}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.7999999999999999e125 or 1.01999999999999999e152 < y Initial program 1.2%
Taylor expanded in y around inf 82.5%
associate--l+82.5%
associate-/l*90.2%
Simplified90.2%
if -4.7999999999999999e125 < y < -1.3e-24Initial program 48.5%
Taylor expanded in t around 0 39.4%
Simplified39.9%
Taylor expanded in y around -inf 49.4%
Simplified49.4%
Taylor expanded in x around inf 55.6%
associate-+r+55.6%
+-commutative55.6%
Simplified55.6%
if -1.3e-24 < y < 6.2e10Initial program 99.0%
Taylor expanded in x around 0 94.7%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in z around 0 82.3%
*-commutative82.3%
Simplified82.3%
if 6.2e10 < y < 1.01999999999999999e152Initial program 13.4%
Taylor expanded in t around 0 10.6%
Simplified14.2%
Taylor expanded in y around -inf 52.1%
Simplified52.1%
Taylor expanded in x around inf 44.8%
associate-/l*59.1%
associate-+r+59.1%
+-commutative59.1%
Simplified59.1%
Final simplification79.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -3.1e+158)
x
(if (<= y -1.3e-24)
(/ z y)
(if (<= y 3100000000.0) (/ 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 <= -3.1e+158) {
tmp = x;
} else if (y <= -1.3e-24) {
tmp = z / y;
} else if (y <= 3100000000.0) {
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 <= (-3.1d+158)) then
tmp = x
else if (y <= (-1.3d-24)) then
tmp = z / y
else if (y <= 3100000000.0d0) 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 <= -3.1e+158) {
tmp = x;
} else if (y <= -1.3e-24) {
tmp = z / y;
} else if (y <= 3100000000.0) {
tmp = t / (i + (y * c));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.1e+158: tmp = x elif y <= -1.3e-24: tmp = z / y elif y <= 3100000000.0: 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 <= -3.1e+158) tmp = x; elseif (y <= -1.3e-24) tmp = Float64(z / y); elseif (y <= 3100000000.0) 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 <= -3.1e+158) tmp = x; elseif (y <= -1.3e-24) tmp = z / y; elseif (y <= 3100000000.0) 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, -3.1e+158], x, If[LessEqual[y, -1.3e-24], N[(z / y), $MachinePrecision], If[LessEqual[y, 3100000000.0], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+158}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 3100000000:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.1000000000000002e158 or 3.1e9 < y Initial program 4.0%
Taylor expanded in y around inf 58.5%
if -3.1000000000000002e158 < y < -1.3e-24Initial program 38.6%
Taylor expanded in x around 0 19.5%
Taylor expanded in y around inf 29.0%
if -1.3e-24 < y < 3.1e9Initial program 99.0%
Taylor expanded in x around 0 94.7%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in t around inf 74.3%
Final simplification61.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.05e+14) (not (<= y 6.4e+30))) (+ x (- (/ z y) (/ a (/ y x)))) (/ 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 <= -1.05e+14) || !(y <= 6.4e+30)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-1.05d+14)) .or. (.not. (y <= 6.4d+30))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -1.05e+14) || !(y <= 6.4e+30)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.05e+14) or not (y <= 6.4e+30): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.05e+14) || !(y <= 6.4e+30)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -1.05e+14) || ~((y <= 6.4e+30))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.05e+14], N[Not[LessEqual[y, 6.4e+30]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+14} \lor \neg \left(y \leq 6.4 \cdot 10^{+30}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.05e14 or 6.39999999999999945e30 < y Initial program 6.4%
Taylor expanded in y around inf 64.2%
associate--l+64.2%
associate-/l*69.2%
Simplified69.2%
if -1.05e14 < y < 6.39999999999999945e30Initial program 97.4%
Taylor expanded in x around 0 89.7%
Taylor expanded in y around 0 76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in t around inf 68.0%
Final simplification68.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.1e+158) x (if (<= y -1.3e-24) (/ z y) (if (<= y 62000000000.0) (/ t i) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.1e+158) {
tmp = x;
} else if (y <= -1.3e-24) {
tmp = z / y;
} else if (y <= 62000000000.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-3.1d+158)) then
tmp = x
else if (y <= (-1.3d-24)) then
tmp = z / y
else if (y <= 62000000000.0d0) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.1e+158) {
tmp = x;
} else if (y <= -1.3e-24) {
tmp = z / y;
} else if (y <= 62000000000.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.1e+158: tmp = x elif y <= -1.3e-24: tmp = z / y elif y <= 62000000000.0: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.1e+158) tmp = x; elseif (y <= -1.3e-24) tmp = Float64(z / y); elseif (y <= 62000000000.0) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3.1e+158) tmp = x; elseif (y <= -1.3e-24) tmp = z / y; elseif (y <= 62000000000.0) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.1e+158], x, If[LessEqual[y, -1.3e-24], N[(z / y), $MachinePrecision], If[LessEqual[y, 62000000000.0], N[(t / i), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+158}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 62000000000:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.1000000000000002e158 or 6.2e10 < y Initial program 4.0%
Taylor expanded in y around inf 58.5%
if -3.1000000000000002e158 < y < -1.3e-24Initial program 38.6%
Taylor expanded in x around 0 19.5%
Taylor expanded in y around inf 29.0%
if -1.3e-24 < y < 6.2e10Initial program 99.0%
Taylor expanded in y around 0 63.7%
Final simplification56.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.1e+24) x (if (<= y 210000000000.0) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.1e+24) {
tmp = x;
} else if (y <= 210000000000.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-3.1d+24)) then
tmp = x
else if (y <= 210000000000.0d0) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3.1e+24) {
tmp = x;
} else if (y <= 210000000000.0) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3.1e+24: tmp = x elif y <= 210000000000.0: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3.1e+24) tmp = x; elseif (y <= 210000000000.0) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3.1e+24) tmp = x; elseif (y <= 210000000000.0) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3.1e+24], x, If[LessEqual[y, 210000000000.0], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 210000000000:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.10000000000000011e24 or 2.1e11 < y Initial program 7.1%
Taylor expanded in y around inf 51.2%
if -3.10000000000000011e24 < y < 2.1e11Initial program 98.1%
Taylor expanded in y around 0 59.3%
Final simplification55.0%
(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 50.1%
Taylor expanded in y around inf 28.5%
Final simplification28.5%
herbie shell --seed 2024024
(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)))