
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
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
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))))
(-
(fma z (/ 1.0 (/ (+ x (+ y t)) (+ y x))) (* a (/ (+ y t) t_1)))
(* y (/ b t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
return fma(z, (1.0 / ((x + (y + t)) / (y + x))), (a * ((y + t) / t_1))) - (y * (b / t_1));
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) return Float64(fma(z, Float64(1.0 / Float64(Float64(x + Float64(y + t)) / Float64(y + x))), Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / t_1))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(z * N[(1.0 / N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathsf{fma}\left(z, \frac{1}{\frac{x + \left(y + t\right)}{y + x}}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1}
\end{array}
\end{array}
Initial program 60.8%
Taylor expanded in b around 0 60.8%
mul-1-neg60.8%
+-commutative60.8%
unsub-neg60.8%
+-commutative60.8%
associate-/l*74.1%
fma-define74.1%
+-commutative74.1%
associate-+r+74.1%
associate-/l*86.6%
associate-+r+86.6%
Simplified97.5%
clear-num97.6%
inv-pow97.6%
associate-+l+97.6%
+-commutative97.6%
Applied egg-rr97.6%
unpow-197.6%
associate-+r+97.6%
+-commutative97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ y (+ t x)))) (- (fma z (/ (+ y x) t_1) (* a (/ (+ y t) t_1))) (* y (/ b t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
return fma(z, ((y + x) / t_1), (a * ((y + t) / t_1))) - (y * (b / t_1));
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) return Float64(fma(z, Float64(Float64(y + x) / t_1), Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / t_1))) end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(z * N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathsf{fma}\left(z, \frac{y + x}{t\_1}, a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{t\_1}
\end{array}
\end{array}
Initial program 60.8%
Taylor expanded in b around 0 60.8%
mul-1-neg60.8%
+-commutative60.8%
unsub-neg60.8%
+-commutative60.8%
associate-/l*74.1%
fma-define74.1%
+-commutative74.1%
associate-+r+74.1%
associate-/l*86.6%
associate-+r+86.6%
Simplified97.5%
Final simplification97.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) t_1)))
(if (or (<= t_2 -5e+296) (not (<= t_2 1e+258)))
(- (+ z a) (* y (/ b t_1)))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -5e+296) || !(t_2 <= 1e+258)) {
tmp = (z + a) - (y * (b / t_1));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (t + x)
t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1
if ((t_2 <= (-5d+296)) .or. (.not. (t_2 <= 1d+258))) then
tmp = (z + a) - (y * (b / 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 t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -5e+296) || !(t_2 <= 1e+258)) {
tmp = (z + a) - (y * (b / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1 tmp = 0 if (t_2 <= -5e+296) or not (t_2 <= 1e+258): tmp = (z + a) - (y * (b / t_1)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= -5e+296) || !(t_2 <= 1e+258)) tmp = Float64(Float64(z + a) - Float64(y * Float64(b / t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -5e+296) || ~((t_2 <= 1e+258))) tmp = (z + a) - (y * (b / t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e+296], N[Not[LessEqual[t$95$2, 1e+258]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+296} \lor \neg \left(t\_2 \leq 10^{+258}\right):\\
\;\;\;\;\left(z + a\right) - y \cdot \frac{b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.0000000000000001e296 or 1.00000000000000006e258 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 9.1%
Taylor expanded in b around 0 9.1%
mul-1-neg9.1%
+-commutative9.1%
unsub-neg9.1%
+-commutative9.1%
associate-/l*41.6%
fma-define41.6%
+-commutative41.6%
associate-+r+41.6%
associate-/l*70.7%
associate-+r+70.7%
Simplified99.9%
Taylor expanded in y around inf 86.8%
+-commutative86.8%
Simplified86.8%
if -5.0000000000000001e296 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e258Initial program 99.7%
Final simplification94.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (/ (- (+ (* z (+ y x)) (* a (+ y t))) (* y b)) t_1))
(t_3 (+ t (+ y x))))
(if (<= t_2 -5e+296)
(- (+ (* z (* (+ y x) (/ 1.0 t_3))) (* a (/ (+ y t) t_3))) b)
(if (<= t_2 1e+258) t_2 (- (+ z a) (* y (/ b t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = t + (y + x);
double tmp;
if (t_2 <= -5e+296) {
tmp = ((z * ((y + x) * (1.0 / t_3))) + (a * ((y + t) / t_3))) - b;
} else if (t_2 <= 1e+258) {
tmp = t_2;
} else {
tmp = (z + a) - (y * (b / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (t + x)
t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1
t_3 = t + (y + x)
if (t_2 <= (-5d+296)) then
tmp = ((z * ((y + x) * (1.0d0 / t_3))) + (a * ((y + t) / t_3))) - b
else if (t_2 <= 1d+258) then
tmp = t_2
else
tmp = (z + a) - (y * (b / 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 t_1 = y + (t + x);
double t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = t + (y + x);
double tmp;
if (t_2 <= -5e+296) {
tmp = ((z * ((y + x) * (1.0 / t_3))) + (a * ((y + t) / t_3))) - b;
} else if (t_2 <= 1e+258) {
tmp = t_2;
} else {
tmp = (z + a) - (y * (b / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1 t_3 = t + (y + x) tmp = 0 if t_2 <= -5e+296: tmp = ((z * ((y + x) * (1.0 / t_3))) + (a * ((y + t) / t_3))) - b elif t_2 <= 1e+258: tmp = t_2 else: tmp = (z + a) - (y * (b / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(Float64(Float64(Float64(z * Float64(y + x)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) t_3 = Float64(t + Float64(y + x)) tmp = 0.0 if (t_2 <= -5e+296) tmp = Float64(Float64(Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_3))) + Float64(a * Float64(Float64(y + t) / t_3))) - b); elseif (t_2 <= 1e+258) tmp = t_2; else tmp = Float64(Float64(z + a) - Float64(y * Float64(b / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = (((z * (y + x)) + (a * (y + t))) - (y * b)) / t_1; t_3 = t + (y + x); tmp = 0.0; if (t_2 <= -5e+296) tmp = ((z * ((y + x) * (1.0 / t_3))) + (a * ((y + t) / t_3))) - b; elseif (t_2 <= 1e+258) tmp = t_2; else tmp = (z + a) - (y * (b / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+296], N[(N[(N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$2, 1e+258], t$95$2, N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := \frac{\left(z \cdot \left(y + x\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
t_3 := t + \left(y + x\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+296}:\\
\;\;\;\;\left(z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_3}\right) + a \cdot \frac{y + t}{t\_3}\right) - b\\
\mathbf{elif}\;t\_2 \leq 10^{+258}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - y \cdot \frac{b}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.0000000000000001e296Initial program 8.2%
Taylor expanded in b around 0 8.2%
mul-1-neg8.2%
+-commutative8.2%
unsub-neg8.2%
+-commutative8.2%
associate-/l*42.1%
fma-define42.1%
+-commutative42.1%
associate-+r+42.1%
associate-/l*87.1%
associate-+r+87.1%
Simplified100.0%
clear-num100.0%
inv-pow100.0%
associate-+l+100.0%
+-commutative100.0%
Applied egg-rr100.0%
unpow-1100.0%
associate-+r+100.0%
+-commutative100.0%
Simplified100.0%
fma-undefine100.0%
associate-/r/99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 86.6%
if -5.0000000000000001e296 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000006e258Initial program 99.7%
if 1.00000000000000006e258 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 9.6%
Taylor expanded in b around 0 9.6%
mul-1-neg9.6%
+-commutative9.6%
unsub-neg9.6%
+-commutative9.6%
associate-/l*41.3%
fma-define41.3%
+-commutative41.3%
associate-+r+41.3%
associate-/l*59.8%
associate-+r+59.8%
Simplified99.9%
Taylor expanded in y around inf 88.3%
+-commutative88.3%
Simplified88.3%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (/ (* y (- a b)) (+ y x))))
(t_2 (- (+ z a) b))
(t_3 (+ y (+ t x))))
(if (<= y -2.4e+103)
t_2
(if (<= y -6.6e-88)
t_1
(if (<= y 4.7e-143)
(/ (+ (* t a) (* z x)) (+ t x))
(if (<= y 4.8e-72)
t_1
(if (<= y 3.6e-16)
(* a (/ (+ y t) t_3))
(if (<= y 2.2e+32) (- z (* y (/ b t_3))) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + ((y * (a - b)) / (y + x));
double t_2 = (z + a) - b;
double t_3 = y + (t + x);
double tmp;
if (y <= -2.4e+103) {
tmp = t_2;
} else if (y <= -6.6e-88) {
tmp = t_1;
} else if (y <= 4.7e-143) {
tmp = ((t * a) + (z * x)) / (t + x);
} else if (y <= 4.8e-72) {
tmp = t_1;
} else if (y <= 3.6e-16) {
tmp = a * ((y + t) / t_3);
} else if (y <= 2.2e+32) {
tmp = z - (y * (b / t_3));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z + ((y * (a - b)) / (y + x))
t_2 = (z + a) - b
t_3 = y + (t + x)
if (y <= (-2.4d+103)) then
tmp = t_2
else if (y <= (-6.6d-88)) then
tmp = t_1
else if (y <= 4.7d-143) then
tmp = ((t * a) + (z * x)) / (t + x)
else if (y <= 4.8d-72) then
tmp = t_1
else if (y <= 3.6d-16) then
tmp = a * ((y + t) / t_3)
else if (y <= 2.2d+32) then
tmp = z - (y * (b / t_3))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + ((y * (a - b)) / (y + x));
double t_2 = (z + a) - b;
double t_3 = y + (t + x);
double tmp;
if (y <= -2.4e+103) {
tmp = t_2;
} else if (y <= -6.6e-88) {
tmp = t_1;
} else if (y <= 4.7e-143) {
tmp = ((t * a) + (z * x)) / (t + x);
} else if (y <= 4.8e-72) {
tmp = t_1;
} else if (y <= 3.6e-16) {
tmp = a * ((y + t) / t_3);
} else if (y <= 2.2e+32) {
tmp = z - (y * (b / t_3));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + ((y * (a - b)) / (y + x)) t_2 = (z + a) - b t_3 = y + (t + x) tmp = 0 if y <= -2.4e+103: tmp = t_2 elif y <= -6.6e-88: tmp = t_1 elif y <= 4.7e-143: tmp = ((t * a) + (z * x)) / (t + x) elif y <= 4.8e-72: tmp = t_1 elif y <= 3.6e-16: tmp = a * ((y + t) / t_3) elif y <= 2.2e+32: tmp = z - (y * (b / t_3)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x))) t_2 = Float64(Float64(z + a) - b) t_3 = Float64(y + Float64(t + x)) tmp = 0.0 if (y <= -2.4e+103) tmp = t_2; elseif (y <= -6.6e-88) tmp = t_1; elseif (y <= 4.7e-143) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(t + x)); elseif (y <= 4.8e-72) tmp = t_1; elseif (y <= 3.6e-16) tmp = Float64(a * Float64(Float64(y + t) / t_3)); elseif (y <= 2.2e+32) tmp = Float64(z - Float64(y * Float64(b / t_3))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + ((y * (a - b)) / (y + x)); t_2 = (z + a) - b; t_3 = y + (t + x); tmp = 0.0; if (y <= -2.4e+103) tmp = t_2; elseif (y <= -6.6e-88) tmp = t_1; elseif (y <= 4.7e-143) tmp = ((t * a) + (z * x)) / (t + x); elseif (y <= 4.8e-72) tmp = t_1; elseif (y <= 3.6e-16) tmp = a * ((y + t) / t_3); elseif (y <= 2.2e+32) tmp = z - (y * (b / t_3)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$3 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+103], t$95$2, If[LessEqual[y, -6.6e-88], t$95$1, If[LessEqual[y, 4.7e-143], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-72], t$95$1, If[LessEqual[y, 3.6e-16], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+32], N[(z - N[(y * N[(b / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \frac{y \cdot \left(a - b\right)}{y + x}\\
t_2 := \left(z + a\right) - b\\
t_3 := y + \left(t + x\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-143}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_3}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+32}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.3999999999999998e103 or 2.20000000000000001e32 < y Initial program 34.7%
Taylor expanded in y around inf 80.8%
if -2.3999999999999998e103 < y < -6.59999999999999987e-88 or 4.70000000000000045e-143 < y < 4.8e-72Initial program 71.4%
Taylor expanded in b around 0 71.4%
mul-1-neg71.4%
+-commutative71.4%
unsub-neg71.4%
+-commutative71.4%
associate-/l*90.0%
fma-define90.0%
+-commutative90.0%
associate-+r+90.0%
associate-/l*96.6%
associate-+r+96.6%
Simplified99.8%
Taylor expanded in t around 0 74.9%
associate--l+74.9%
div-sub74.9%
distribute-rgt-out--74.9%
+-commutative74.9%
Simplified74.9%
if -6.59999999999999987e-88 < y < 4.70000000000000045e-143Initial program 84.4%
Taylor expanded in y around 0 75.9%
if 4.8e-72 < y < 3.59999999999999983e-16Initial program 78.1%
Taylor expanded in a around inf 47.8%
associate-/l*62.5%
associate-+r+62.5%
Simplified62.5%
if 3.59999999999999983e-16 < y < 2.20000000000000001e32Initial program 88.3%
Taylor expanded in b around 0 88.3%
mul-1-neg88.3%
+-commutative88.3%
unsub-neg88.3%
+-commutative88.3%
associate-/l*99.8%
fma-define99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/l*99.8%
associate-+r+99.8%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
associate-+l+99.6%
+-commutative99.6%
Applied egg-rr99.6%
unpow-199.6%
associate-+r+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 99.6%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ y (+ t x))))) (t_2 (- (+ z a) t_1)))
(if (<= y -1.5e+102)
t_2
(if (<= y -1.45e-87)
(+ z (/ (* y (- a b)) (+ y x)))
(if (<= y 1.4e-108)
(* z (+ (/ x (+ t x)) (* a (/ t (* z (+ t x))))))
(if (<= y 3.15e-16)
(+ a (/ (- (* z y) (* y b)) (+ y t)))
(if (<= y 8.2e+37) (- z t_1) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + (t + x)));
double t_2 = (z + a) - t_1;
double tmp;
if (y <= -1.5e+102) {
tmp = t_2;
} else if (y <= -1.45e-87) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (y <= 1.4e-108) {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
} else if (y <= 3.15e-16) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (y <= 8.2e+37) {
tmp = z - t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b / (y + (t + x)))
t_2 = (z + a) - t_1
if (y <= (-1.5d+102)) then
tmp = t_2
else if (y <= (-1.45d-87)) then
tmp = z + ((y * (a - b)) / (y + x))
else if (y <= 1.4d-108) then
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))))
else if (y <= 3.15d-16) then
tmp = a + (((z * y) - (y * b)) / (y + t))
else if (y <= 8.2d+37) then
tmp = z - 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 t_1 = y * (b / (y + (t + x)));
double t_2 = (z + a) - t_1;
double tmp;
if (y <= -1.5e+102) {
tmp = t_2;
} else if (y <= -1.45e-87) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (y <= 1.4e-108) {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
} else if (y <= 3.15e-16) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (y <= 8.2e+37) {
tmp = z - t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (y + (t + x))) t_2 = (z + a) - t_1 tmp = 0 if y <= -1.5e+102: tmp = t_2 elif y <= -1.45e-87: tmp = z + ((y * (a - b)) / (y + x)) elif y <= 1.4e-108: tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))) elif y <= 3.15e-16: tmp = a + (((z * y) - (y * b)) / (y + t)) elif y <= 8.2e+37: tmp = z - t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(y + Float64(t + x)))) t_2 = Float64(Float64(z + a) - t_1) tmp = 0.0 if (y <= -1.5e+102) tmp = t_2; elseif (y <= -1.45e-87) tmp = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x))); elseif (y <= 1.4e-108) tmp = Float64(z * Float64(Float64(x / Float64(t + x)) + Float64(a * Float64(t / Float64(z * Float64(t + x)))))); elseif (y <= 3.15e-16) tmp = Float64(a + Float64(Float64(Float64(z * y) - Float64(y * b)) / Float64(y + t))); elseif (y <= 8.2e+37) tmp = Float64(z - t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (y + (t + x))); t_2 = (z + a) - t_1; tmp = 0.0; if (y <= -1.5e+102) tmp = t_2; elseif (y <= -1.45e-87) tmp = z + ((y * (a - b)) / (y + x)); elseif (y <= 1.4e-108) tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))); elseif (y <= 3.15e-16) tmp = a + (((z * y) - (y * b)) / (y + t)); elseif (y <= 8.2e+37) tmp = z - t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[y, -1.5e+102], t$95$2, If[LessEqual[y, -1.45e-87], N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-108], N[(z * N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t / N[(z * N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.15e-16], N[(a + N[(N[(N[(z * y), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+37], N[(z - t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{y + \left(t + x\right)}\\
t_2 := \left(z + a\right) - t\_1\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-87}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-16}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\
\;\;\;\;z - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.4999999999999999e102 or 8.1999999999999996e37 < y Initial program 33.8%
Taylor expanded in b around 0 33.8%
mul-1-neg33.8%
+-commutative33.8%
unsub-neg33.8%
+-commutative33.8%
associate-/l*49.4%
fma-define49.4%
+-commutative49.4%
associate-+r+49.4%
associate-/l*70.5%
associate-+r+70.5%
Simplified98.8%
Taylor expanded in y around inf 89.7%
+-commutative89.7%
Simplified89.7%
if -1.4999999999999999e102 < y < -1.45e-87Initial program 73.0%
Taylor expanded in b around 0 73.0%
mul-1-neg73.0%
+-commutative73.0%
unsub-neg73.0%
+-commutative73.0%
associate-/l*88.9%
fma-define88.9%
+-commutative88.9%
associate-+r+88.9%
associate-/l*95.5%
associate-+r+95.5%
Simplified99.8%
Taylor expanded in t around 0 74.8%
associate--l+74.8%
div-sub74.8%
distribute-rgt-out--74.8%
+-commutative74.8%
Simplified74.8%
if -1.45e-87 < y < 1.4e-108Initial program 82.9%
Taylor expanded in y around 0 72.0%
Taylor expanded in z around inf 76.2%
+-commutative76.2%
associate-/l*78.7%
+-commutative78.7%
Simplified78.7%
if 1.4e-108 < y < 3.1499999999999999e-16Initial program 76.2%
Taylor expanded in b around 0 76.2%
mul-1-neg76.2%
+-commutative76.2%
unsub-neg76.2%
+-commutative76.2%
associate-/l*93.8%
fma-define93.8%
+-commutative93.8%
associate-+r+93.8%
associate-/l*99.9%
associate-+r+99.9%
Simplified99.9%
Taylor expanded in x around 0 98.0%
associate--l+98.0%
div-sub98.0%
+-commutative98.0%
Simplified98.0%
if 3.1499999999999999e-16 < y < 8.1999999999999996e37Initial program 76.2%
Taylor expanded in b around 0 76.2%
mul-1-neg76.2%
+-commutative76.2%
unsub-neg76.2%
+-commutative76.2%
associate-/l*92.0%
fma-define92.0%
+-commutative92.0%
associate-+r+92.0%
associate-/l*99.9%
associate-+r+99.9%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
unpow-199.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ y (+ t x))))) (t_2 (- (+ z a) t_1)))
(if (<= y -1.55e+102)
t_2
(if (<= y -2.2e-87)
(+ z (/ (* y (- a b)) (+ y x)))
(if (<= y 4.8e-130)
(/ (+ (* t a) (* z x)) (+ t x))
(if (<= y 3.2e-16)
(+ a (/ (- (* z y) (* y b)) (+ y t)))
(if (<= y 8.2e+37) (- z t_1) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + (t + x)));
double t_2 = (z + a) - t_1;
double tmp;
if (y <= -1.55e+102) {
tmp = t_2;
} else if (y <= -2.2e-87) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (y <= 4.8e-130) {
tmp = ((t * a) + (z * x)) / (t + x);
} else if (y <= 3.2e-16) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (y <= 8.2e+37) {
tmp = z - t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b / (y + (t + x)))
t_2 = (z + a) - t_1
if (y <= (-1.55d+102)) then
tmp = t_2
else if (y <= (-2.2d-87)) then
tmp = z + ((y * (a - b)) / (y + x))
else if (y <= 4.8d-130) then
tmp = ((t * a) + (z * x)) / (t + x)
else if (y <= 3.2d-16) then
tmp = a + (((z * y) - (y * b)) / (y + t))
else if (y <= 8.2d+37) then
tmp = z - 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 t_1 = y * (b / (y + (t + x)));
double t_2 = (z + a) - t_1;
double tmp;
if (y <= -1.55e+102) {
tmp = t_2;
} else if (y <= -2.2e-87) {
tmp = z + ((y * (a - b)) / (y + x));
} else if (y <= 4.8e-130) {
tmp = ((t * a) + (z * x)) / (t + x);
} else if (y <= 3.2e-16) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (y <= 8.2e+37) {
tmp = z - t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (y + (t + x))) t_2 = (z + a) - t_1 tmp = 0 if y <= -1.55e+102: tmp = t_2 elif y <= -2.2e-87: tmp = z + ((y * (a - b)) / (y + x)) elif y <= 4.8e-130: tmp = ((t * a) + (z * x)) / (t + x) elif y <= 3.2e-16: tmp = a + (((z * y) - (y * b)) / (y + t)) elif y <= 8.2e+37: tmp = z - t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(y + Float64(t + x)))) t_2 = Float64(Float64(z + a) - t_1) tmp = 0.0 if (y <= -1.55e+102) tmp = t_2; elseif (y <= -2.2e-87) tmp = Float64(z + Float64(Float64(y * Float64(a - b)) / Float64(y + x))); elseif (y <= 4.8e-130) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(t + x)); elseif (y <= 3.2e-16) tmp = Float64(a + Float64(Float64(Float64(z * y) - Float64(y * b)) / Float64(y + t))); elseif (y <= 8.2e+37) tmp = Float64(z - t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (y + (t + x))); t_2 = (z + a) - t_1; tmp = 0.0; if (y <= -1.55e+102) tmp = t_2; elseif (y <= -2.2e-87) tmp = z + ((y * (a - b)) / (y + x)); elseif (y <= 4.8e-130) tmp = ((t * a) + (z * x)) / (t + x); elseif (y <= 3.2e-16) tmp = a + (((z * y) - (y * b)) / (y + t)); elseif (y <= 8.2e+37) tmp = z - t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[y, -1.55e+102], t$95$2, If[LessEqual[y, -2.2e-87], N[(z + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-130], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-16], N[(a + N[(N[(N[(z * y), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+37], N[(z - t$95$1), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{y + \left(t + x\right)}\\
t_2 := \left(z + a\right) - t\_1\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-87}:\\
\;\;\;\;z + \frac{y \cdot \left(a - b\right)}{y + x}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{t + x}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+37}:\\
\;\;\;\;z - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.54999999999999993e102 or 8.1999999999999996e37 < y Initial program 33.8%
Taylor expanded in b around 0 33.8%
mul-1-neg33.8%
+-commutative33.8%
unsub-neg33.8%
+-commutative33.8%
associate-/l*49.4%
fma-define49.4%
+-commutative49.4%
associate-+r+49.4%
associate-/l*70.5%
associate-+r+70.5%
Simplified98.8%
Taylor expanded in y around inf 89.7%
+-commutative89.7%
Simplified89.7%
if -1.54999999999999993e102 < y < -2.19999999999999988e-87Initial program 73.0%
Taylor expanded in b around 0 73.0%
mul-1-neg73.0%
+-commutative73.0%
unsub-neg73.0%
+-commutative73.0%
associate-/l*88.9%
fma-define88.9%
+-commutative88.9%
associate-+r+88.9%
associate-/l*95.5%
associate-+r+95.5%
Simplified99.8%
Taylor expanded in t around 0 74.8%
associate--l+74.8%
div-sub74.8%
distribute-rgt-out--74.8%
+-commutative74.8%
Simplified74.8%
if -2.19999999999999988e-87 < y < 4.79999999999999993e-130Initial program 83.0%
Taylor expanded in y around 0 73.8%
if 4.79999999999999993e-130 < y < 3.20000000000000023e-16Initial program 77.4%
Taylor expanded in b around 0 77.4%
mul-1-neg77.4%
+-commutative77.4%
unsub-neg77.4%
+-commutative77.4%
associate-/l*90.9%
fma-define90.9%
+-commutative90.9%
associate-+r+90.9%
associate-/l*99.9%
associate-+r+99.9%
Simplified99.9%
Taylor expanded in x around 0 89.2%
associate--l+89.2%
div-sub89.2%
+-commutative89.2%
Simplified89.2%
if 3.20000000000000023e-16 < y < 8.1999999999999996e37Initial program 76.2%
Taylor expanded in b around 0 76.2%
mul-1-neg76.2%
+-commutative76.2%
unsub-neg76.2%
+-commutative76.2%
associate-/l*92.0%
fma-define92.0%
+-commutative92.0%
associate-+r+92.0%
associate-/l*99.9%
associate-+r+99.9%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
unpow-199.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 83.7%
Final simplification82.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x)))
(t_2 (- z (* y (/ b t_1))))
(t_3 (* a (/ (+ y t) t_1))))
(if (<= a -1.7e+28)
t_3
(if (<= a 1.5e-27)
t_2
(if (<= a 7.7e+28)
t_3
(if (<= a 4.8e+74) t_2 (if (<= a 2.7e+148) (- (+ z a) b) t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z - (y * (b / t_1));
double t_3 = a * ((y + t) / t_1);
double tmp;
if (a <= -1.7e+28) {
tmp = t_3;
} else if (a <= 1.5e-27) {
tmp = t_2;
} else if (a <= 7.7e+28) {
tmp = t_3;
} else if (a <= 4.8e+74) {
tmp = t_2;
} else if (a <= 2.7e+148) {
tmp = (z + a) - b;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (t + x)
t_2 = z - (y * (b / t_1))
t_3 = a * ((y + t) / t_1)
if (a <= (-1.7d+28)) then
tmp = t_3
else if (a <= 1.5d-27) then
tmp = t_2
else if (a <= 7.7d+28) then
tmp = t_3
else if (a <= 4.8d+74) then
tmp = t_2
else if (a <= 2.7d+148) then
tmp = (z + a) - b
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double t_2 = z - (y * (b / t_1));
double t_3 = a * ((y + t) / t_1);
double tmp;
if (a <= -1.7e+28) {
tmp = t_3;
} else if (a <= 1.5e-27) {
tmp = t_2;
} else if (a <= 7.7e+28) {
tmp = t_3;
} else if (a <= 4.8e+74) {
tmp = t_2;
} else if (a <= 2.7e+148) {
tmp = (z + a) - b;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) t_2 = z - (y * (b / t_1)) t_3 = a * ((y + t) / t_1) tmp = 0 if a <= -1.7e+28: tmp = t_3 elif a <= 1.5e-27: tmp = t_2 elif a <= 7.7e+28: tmp = t_3 elif a <= 4.8e+74: tmp = t_2 elif a <= 2.7e+148: tmp = (z + a) - b else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) t_2 = Float64(z - Float64(y * Float64(b / t_1))) t_3 = Float64(a * Float64(Float64(y + t) / t_1)) tmp = 0.0 if (a <= -1.7e+28) tmp = t_3; elseif (a <= 1.5e-27) tmp = t_2; elseif (a <= 7.7e+28) tmp = t_3; elseif (a <= 4.8e+74) tmp = t_2; elseif (a <= 2.7e+148) tmp = Float64(Float64(z + a) - b); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); t_2 = z - (y * (b / t_1)); t_3 = a * ((y + t) / t_1); tmp = 0.0; if (a <= -1.7e+28) tmp = t_3; elseif (a <= 1.5e-27) tmp = t_2; elseif (a <= 7.7e+28) tmp = t_3; elseif (a <= 4.8e+74) tmp = t_2; elseif (a <= 2.7e+148) tmp = (z + a) - b; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e+28], t$95$3, If[LessEqual[a, 1.5e-27], t$95$2, If[LessEqual[a, 7.7e+28], t$95$3, If[LessEqual[a, 4.8e+74], t$95$2, If[LessEqual[a, 2.7e+148], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
t_2 := z - y \cdot \frac{b}{t\_1}\\
t_3 := a \cdot \frac{y + t}{t\_1}\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7.7 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+148}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -1.7e28 or 1.5000000000000001e-27 < a < 7.6999999999999997e28 or 2.70000000000000019e148 < a Initial program 47.5%
Taylor expanded in a around inf 38.7%
associate-/l*76.7%
associate-+r+76.7%
Simplified76.7%
if -1.7e28 < a < 1.5000000000000001e-27 or 7.6999999999999997e28 < a < 4.80000000000000017e74Initial program 69.6%
Taylor expanded in b around 0 69.6%
mul-1-neg69.6%
+-commutative69.6%
unsub-neg69.6%
+-commutative69.6%
associate-/l*86.7%
fma-define86.7%
+-commutative86.7%
associate-+r+86.7%
associate-/l*86.7%
associate-+r+86.7%
Simplified95.8%
clear-num95.8%
inv-pow95.8%
associate-+l+95.8%
+-commutative95.8%
Applied egg-rr95.8%
unpow-195.8%
associate-+r+95.8%
+-commutative95.8%
Simplified95.8%
Taylor expanded in x around inf 72.4%
if 4.80000000000000017e74 < a < 2.70000000000000019e148Initial program 56.3%
Taylor expanded in y around inf 73.4%
Final simplification74.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ t (+ y x))))
(-
(+ (* z (* (+ y x) (/ 1.0 t_1))) (* a (/ (+ y t) t_1)))
(* y (/ b (+ y (+ t x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
return ((z * ((y + x) * (1.0 / t_1))) + (a * ((y + t) / t_1))) - (y * (b / (y + (t + x))));
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
t_1 = t + (y + x)
code = ((z * ((y + x) * (1.0d0 / t_1))) + (a * ((y + t) / t_1))) - (y * (b / (y + (t + x))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (y + x);
return ((z * ((y + x) * (1.0 / t_1))) + (a * ((y + t) / t_1))) - (y * (b / (y + (t + x))));
}
def code(x, y, z, t, a, b): t_1 = t + (y + x) return ((z * ((y + x) * (1.0 / t_1))) + (a * ((y + t) / t_1))) - (y * (b / (y + (t + x))))
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(y + x)) return Float64(Float64(Float64(z * Float64(Float64(y + x) * Float64(1.0 / t_1))) + Float64(a * Float64(Float64(y + t) / t_1))) - Float64(y * Float64(b / Float64(y + Float64(t + x))))) end
function tmp = code(x, y, z, t, a, b) t_1 = t + (y + x); tmp = ((z * ((y + x) * (1.0 / t_1))) + (a * ((y + t) / t_1))) - (y * (b / (y + (t + x)))); end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(y + x), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(z * N[(N[(y + x), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y + x\right)\\
\left(z \cdot \left(\left(y + x\right) \cdot \frac{1}{t\_1}\right) + a \cdot \frac{y + t}{t\_1}\right) - y \cdot \frac{b}{y + \left(t + x\right)}
\end{array}
\end{array}
Initial program 60.8%
Taylor expanded in b around 0 60.8%
mul-1-neg60.8%
+-commutative60.8%
unsub-neg60.8%
+-commutative60.8%
associate-/l*74.1%
fma-define74.1%
+-commutative74.1%
associate-+r+74.1%
associate-/l*86.6%
associate-+r+86.6%
Simplified97.5%
clear-num97.6%
inv-pow97.6%
associate-+l+97.6%
+-commutative97.6%
Applied egg-rr97.6%
unpow-197.6%
associate-+r+97.6%
+-commutative97.6%
Simplified97.6%
fma-undefine97.6%
associate-/r/97.5%
+-commutative97.5%
+-commutative97.5%
associate-+l+97.5%
+-commutative97.5%
associate-+l+97.5%
+-commutative97.5%
associate-+l+97.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.2e-87) (not (<= y 1.36e-67))) (- (+ z (* a (/ y (+ y x)))) (* y (/ b (+ y (+ t x))))) (* z (+ (/ x (+ t x)) (* a (/ t (* z (+ t x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.2e-87) || !(y <= 1.36e-67)) {
tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))));
} else {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((y <= (-9.2d-87)) .or. (.not. (y <= 1.36d-67))) then
tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))))
else
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.2e-87) || !(y <= 1.36e-67)) {
tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x))));
} else {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.2e-87) or not (y <= 1.36e-67): tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x)))) else: tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.2e-87) || !(y <= 1.36e-67)) tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - Float64(y * Float64(b / Float64(y + Float64(t + x))))); else tmp = Float64(z * Float64(Float64(x / Float64(t + x)) + Float64(a * Float64(t / Float64(z * Float64(t + x)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9.2e-87) || ~((y <= 1.36e-67))) tmp = (z + (a * (y / (y + x)))) - (y * (b / (y + (t + x)))); else tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.2e-87], N[Not[LessEqual[y, 1.36e-67]], $MachinePrecision]], N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t / N[(z * N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-87} \lor \neg \left(y \leq 1.36 \cdot 10^{-67}\right):\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - y \cdot \frac{b}{y + \left(t + x\right)}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\
\end{array}
\end{array}
if y < -9.2000000000000006e-87 or 1.36000000000000007e-67 < y Initial program 49.2%
Taylor expanded in b around 0 49.2%
mul-1-neg49.2%
+-commutative49.2%
unsub-neg49.2%
+-commutative49.2%
associate-/l*64.6%
fma-define64.6%
+-commutative64.6%
associate-+r+64.6%
associate-/l*80.5%
associate-+r+80.5%
Simplified99.2%
Taylor expanded in t around 0 68.4%
associate-/l*84.8%
+-commutative84.8%
Simplified84.8%
if -9.2000000000000006e-87 < y < 1.36000000000000007e-67Initial program 82.1%
Taylor expanded in y around 0 72.0%
Taylor expanded in z around inf 78.0%
+-commutative78.0%
associate-/l*80.3%
+-commutative80.3%
Simplified80.3%
Final simplification83.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b (+ y (+ t x))))))
(if (<= y -1.2e-86)
(- (+ z (* a (/ y (+ y x)))) t_1)
(if (<= y 1.3e-108)
(* z (+ (/ x (+ t x)) (* a (/ t (* z (+ t x))))))
(- (+ a (* y (/ z (+ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / (y + (t + x)));
double tmp;
if (y <= -1.2e-86) {
tmp = (z + (a * (y / (y + x)))) - t_1;
} else if (y <= 1.3e-108) {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
} else {
tmp = (a + (y * (z / (y + t)))) - t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = y * (b / (y + (t + x)))
if (y <= (-1.2d-86)) then
tmp = (z + (a * (y / (y + x)))) - t_1
else if (y <= 1.3d-108) then
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))))
else
tmp = (a + (y * (z / (y + t)))) - 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 t_1 = y * (b / (y + (t + x)));
double tmp;
if (y <= -1.2e-86) {
tmp = (z + (a * (y / (y + x)))) - t_1;
} else if (y <= 1.3e-108) {
tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x)))));
} else {
tmp = (a + (y * (z / (y + t)))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / (y + (t + x))) tmp = 0 if y <= -1.2e-86: tmp = (z + (a * (y / (y + x)))) - t_1 elif y <= 1.3e-108: tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))) else: tmp = (a + (y * (z / (y + t)))) - t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / Float64(y + Float64(t + x)))) tmp = 0.0 if (y <= -1.2e-86) tmp = Float64(Float64(z + Float64(a * Float64(y / Float64(y + x)))) - t_1); elseif (y <= 1.3e-108) tmp = Float64(z * Float64(Float64(x / Float64(t + x)) + Float64(a * Float64(t / Float64(z * Float64(t + x)))))); else tmp = Float64(Float64(a + Float64(y * Float64(z / Float64(y + t)))) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / (y + (t + x))); tmp = 0.0; if (y <= -1.2e-86) tmp = (z + (a * (y / (y + x)))) - t_1; elseif (y <= 1.3e-108) tmp = z * ((x / (t + x)) + (a * (t / (z * (t + x))))); else tmp = (a + (y * (z / (y + t)))) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e-86], N[(N[(z + N[(a * N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[y, 1.3e-108], N[(z * N[(N[(x / N[(t + x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t / N[(z * N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(y * N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{y + \left(t + x\right)}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{-86}:\\
\;\;\;\;\left(z + a \cdot \frac{y}{y + x}\right) - t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-108}:\\
\;\;\;\;z \cdot \left(\frac{x}{t + x} + a \cdot \frac{t}{z \cdot \left(t + x\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + y \cdot \frac{z}{y + t}\right) - t\_1\\
\end{array}
\end{array}
if y < -1.20000000000000007e-86Initial program 53.7%
Taylor expanded in b around 0 53.7%
mul-1-neg53.7%
+-commutative53.7%
unsub-neg53.7%
+-commutative53.7%
associate-/l*71.5%
fma-define71.5%
+-commutative71.5%
associate-+r+71.5%
associate-/l*79.8%
associate-+r+79.8%
Simplified98.8%
Taylor expanded in t around 0 71.5%
associate-/l*84.4%
+-commutative84.4%
Simplified84.4%
if -1.20000000000000007e-86 < y < 1.29999999999999992e-108Initial program 82.9%
Taylor expanded in y around 0 72.0%
Taylor expanded in z around inf 76.2%
+-commutative76.2%
associate-/l*78.7%
+-commutative78.7%
Simplified78.7%
if 1.29999999999999992e-108 < y Initial program 47.1%
Taylor expanded in b around 0 47.1%
mul-1-neg47.1%
+-commutative47.1%
unsub-neg47.1%
+-commutative47.1%
associate-/l*61.4%
fma-define61.4%
+-commutative61.4%
associate-+r+61.4%
associate-/l*82.6%
associate-+r+82.6%
Simplified99.5%
Taylor expanded in x around 0 68.7%
+-commutative68.7%
associate-/l*89.4%
+-commutative89.4%
Simplified89.4%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))))
(if (<= a -1.95e+39)
(- (+ z a) b)
(if (<= a -3.5e-125)
(+ a (/ (- (* z y) (* y b)) (+ y t)))
(if (<= a 1.25e-27) (- z (* y (/ b t_1))) (* a (/ (+ y t) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double tmp;
if (a <= -1.95e+39) {
tmp = (z + a) - b;
} else if (a <= -3.5e-125) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (a <= 1.25e-27) {
tmp = z - (y * (b / t_1));
} else {
tmp = a * ((y + t) / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = y + (t + x)
if (a <= (-1.95d+39)) then
tmp = (z + a) - b
else if (a <= (-3.5d-125)) then
tmp = a + (((z * y) - (y * b)) / (y + t))
else if (a <= 1.25d-27) then
tmp = z - (y * (b / t_1))
else
tmp = a * ((y + t) / 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 t_1 = y + (t + x);
double tmp;
if (a <= -1.95e+39) {
tmp = (z + a) - b;
} else if (a <= -3.5e-125) {
tmp = a + (((z * y) - (y * b)) / (y + t));
} else if (a <= 1.25e-27) {
tmp = z - (y * (b / t_1));
} else {
tmp = a * ((y + t) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) tmp = 0 if a <= -1.95e+39: tmp = (z + a) - b elif a <= -3.5e-125: tmp = a + (((z * y) - (y * b)) / (y + t)) elif a <= 1.25e-27: tmp = z - (y * (b / t_1)) else: tmp = a * ((y + t) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) tmp = 0.0 if (a <= -1.95e+39) tmp = Float64(Float64(z + a) - b); elseif (a <= -3.5e-125) tmp = Float64(a + Float64(Float64(Float64(z * y) - Float64(y * b)) / Float64(y + t))); elseif (a <= 1.25e-27) tmp = Float64(z - Float64(y * Float64(b / t_1))); else tmp = Float64(a * Float64(Float64(y + t) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); tmp = 0.0; if (a <= -1.95e+39) tmp = (z + a) - b; elseif (a <= -3.5e-125) tmp = a + (((z * y) - (y * b)) / (y + t)); elseif (a <= 1.25e-27) tmp = z - (y * (b / t_1)); else tmp = a * ((y + t) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.95e+39], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[a, -3.5e-125], N[(a + N[(N[(N[(z * y), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-27], N[(z - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathbf{if}\;a \leq -1.95 \cdot 10^{+39}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-125}:\\
\;\;\;\;a + \frac{z \cdot y - y \cdot b}{y + t}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;z - y \cdot \frac{b}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1}\\
\end{array}
\end{array}
if a < -1.95e39Initial program 45.2%
Taylor expanded in y around inf 73.9%
if -1.95e39 < a < -3.49999999999999998e-125Initial program 71.3%
Taylor expanded in b around 0 71.4%
mul-1-neg71.4%
+-commutative71.4%
unsub-neg71.4%
+-commutative71.4%
associate-/l*84.4%
fma-define84.4%
+-commutative84.4%
associate-+r+84.4%
associate-/l*89.7%
associate-+r+89.7%
Simplified94.5%
Taylor expanded in x around 0 64.1%
associate--l+64.1%
div-sub64.1%
+-commutative64.1%
Simplified64.1%
if -3.49999999999999998e-125 < a < 1.25e-27Initial program 68.4%
Taylor expanded in b around 0 68.4%
mul-1-neg68.4%
+-commutative68.4%
unsub-neg68.4%
+-commutative68.4%
associate-/l*85.9%
fma-define85.9%
+-commutative85.9%
associate-+r+85.9%
associate-/l*85.9%
associate-+r+85.9%
Simplified96.3%
clear-num96.3%
inv-pow96.3%
associate-+l+96.3%
+-commutative96.3%
Applied egg-rr96.3%
unpow-196.3%
associate-+r+96.3%
+-commutative96.3%
Simplified96.3%
Taylor expanded in x around inf 76.6%
if 1.25e-27 < a Initial program 52.7%
Taylor expanded in a around inf 42.4%
associate-/l*75.0%
associate-+r+75.0%
Simplified75.0%
Final simplification74.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ t x))))
(if (or (<= z -2.8e-26) (not (<= z 4.2e+55)))
(* z (+ (/ (+ y x) t_1) (/ a z)))
(- (+ z a) (* y (/ b t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (t + x);
double tmp;
if ((z <= -2.8e-26) || !(z <= 4.2e+55)) {
tmp = z * (((y + x) / t_1) + (a / z));
} else {
tmp = (z + a) - (y * (b / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = y + (t + x)
if ((z <= (-2.8d-26)) .or. (.not. (z <= 4.2d+55))) then
tmp = z * (((y + x) / t_1) + (a / z))
else
tmp = (z + a) - (y * (b / 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 t_1 = y + (t + x);
double tmp;
if ((z <= -2.8e-26) || !(z <= 4.2e+55)) {
tmp = z * (((y + x) / t_1) + (a / z));
} else {
tmp = (z + a) - (y * (b / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (t + x) tmp = 0 if (z <= -2.8e-26) or not (z <= 4.2e+55): tmp = z * (((y + x) / t_1) + (a / z)) else: tmp = (z + a) - (y * (b / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(t + x)) tmp = 0.0 if ((z <= -2.8e-26) || !(z <= 4.2e+55)) tmp = Float64(z * Float64(Float64(Float64(y + x) / t_1) + Float64(a / z))); else tmp = Float64(Float64(z + a) - Float64(y * Float64(b / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (t + x); tmp = 0.0; if ((z <= -2.8e-26) || ~((z <= 4.2e+55))) tmp = z * (((y + x) / t_1) + (a / z)); else tmp = (z + a) - (y * (b / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.8e-26], N[Not[LessEqual[z, 4.2e+55]], $MachinePrecision]], N[(z * N[(N[(N[(y + x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - N[(y * N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(t + x\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-26} \lor \neg \left(z \leq 4.2 \cdot 10^{+55}\right):\\
\;\;\;\;z \cdot \left(\frac{y + x}{t\_1} + \frac{a}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - y \cdot \frac{b}{t\_1}\\
\end{array}
\end{array}
if z < -2.8000000000000001e-26 or 4.2000000000000001e55 < z Initial program 48.9%
Taylor expanded in z around -inf 73.1%
associate-*r*73.1%
mul-1-neg73.1%
mul-1-neg73.1%
unsub-neg73.1%
associate-*r/73.1%
distribute-lft-in73.1%
neg-mul-173.1%
unsub-neg73.1%
neg-mul-173.1%
associate-+r+73.1%
Simplified73.1%
Taylor expanded in t around inf 89.2%
if -2.8000000000000001e-26 < z < 4.2000000000000001e55Initial program 73.4%
Taylor expanded in b around 0 73.4%
mul-1-neg73.4%
+-commutative73.4%
unsub-neg73.4%
+-commutative73.4%
associate-/l*75.0%
fma-define75.0%
+-commutative75.0%
associate-+r+75.0%
associate-/l*87.2%
associate-+r+87.2%
Simplified97.3%
Taylor expanded in y around inf 71.3%
+-commutative71.3%
Simplified71.3%
Final simplification80.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -5.4e+31) (not (<= x 1.05e+118))) (* z (/ (+ y x) (+ y (+ t x)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5.4e+31) || !(x <= 1.05e+118)) {
tmp = z * ((y + x) / (y + (t + x)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((x <= (-5.4d+31)) .or. (.not. (x <= 1.05d+118))) then
tmp = z * ((y + x) / (y + (t + x)))
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5.4e+31) || !(x <= 1.05e+118)) {
tmp = z * ((y + x) / (y + (t + x)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -5.4e+31) or not (x <= 1.05e+118): tmp = z * ((y + x) / (y + (t + x))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -5.4e+31) || !(x <= 1.05e+118)) tmp = Float64(z * Float64(Float64(y + x) / Float64(y + Float64(t + x)))); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -5.4e+31) || ~((x <= 1.05e+118))) tmp = z * ((y + x) / (y + (t + x))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5.4e+31], N[Not[LessEqual[x, 1.05e+118]], $MachinePrecision]], N[(z * N[(N[(y + x), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+31} \lor \neg \left(x \leq 1.05 \cdot 10^{+118}\right):\\
\;\;\;\;z \cdot \frac{y + x}{y + \left(t + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if x < -5.39999999999999971e31 or 1.05e118 < x Initial program 54.6%
Taylor expanded in z around inf 34.1%
associate-/l*66.5%
+-commutative66.5%
associate-+r+66.5%
Simplified66.5%
if -5.39999999999999971e31 < x < 1.05e118Initial program 64.1%
Taylor expanded in y around inf 69.5%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.3e+182) (* a (/ t (+ t x))) (if (<= t 6.2e+98) (- (+ z a) b) (* a (/ (+ y t) (+ y (+ t x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.3e+182) {
tmp = a * (t / (t + x));
} else if (t <= 6.2e+98) {
tmp = (z + a) - b;
} else {
tmp = a * ((y + t) / (y + (t + x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (t <= (-1.3d+182)) then
tmp = a * (t / (t + x))
else if (t <= 6.2d+98) then
tmp = (z + a) - b
else
tmp = a * ((y + t) / (y + (t + x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.3e+182) {
tmp = a * (t / (t + x));
} else if (t <= 6.2e+98) {
tmp = (z + a) - b;
} else {
tmp = a * ((y + t) / (y + (t + x)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.3e+182: tmp = a * (t / (t + x)) elif t <= 6.2e+98: tmp = (z + a) - b else: tmp = a * ((y + t) / (y + (t + x))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.3e+182) tmp = Float64(a * Float64(t / Float64(t + x))); elseif (t <= 6.2e+98) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(Float64(y + t) / Float64(y + Float64(t + x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.3e+182) tmp = a * (t / (t + x)); elseif (t <= 6.2e+98) tmp = (z + a) - b; else tmp = a * ((y + t) / (y + (t + x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.3e+182], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+98], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+182}:\\
\;\;\;\;a \cdot \frac{t}{t + x}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+98}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{y + \left(t + x\right)}\\
\end{array}
\end{array}
if t < -1.3e182Initial program 60.3%
Taylor expanded in t around inf 25.5%
Taylor expanded in y around 0 25.7%
associate-/l*54.8%
Simplified54.8%
if -1.3e182 < t < 6.20000000000000038e98Initial program 64.2%
Taylor expanded in y around inf 72.4%
if 6.20000000000000038e98 < t Initial program 48.4%
Taylor expanded in a around inf 26.6%
associate-/l*58.0%
associate-+r+58.0%
Simplified58.0%
Final simplification67.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.65e+182) (not (<= t 3.5e+97))) (* a (/ t (+ t x))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.65e+182) || !(t <= 3.5e+97)) {
tmp = a * (t / (t + x));
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((t <= (-1.65d+182)) .or. (.not. (t <= 3.5d+97))) then
tmp = a * (t / (t + x))
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.65e+182) || !(t <= 3.5e+97)) {
tmp = a * (t / (t + x));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.65e+182) or not (t <= 3.5e+97): tmp = a * (t / (t + x)) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.65e+182) || !(t <= 3.5e+97)) tmp = Float64(a * Float64(t / Float64(t + x))); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.65e+182) || ~((t <= 3.5e+97))) tmp = a * (t / (t + x)); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.65e+182], N[Not[LessEqual[t, 3.5e+97]], $MachinePrecision]], N[(a * N[(t / N[(t + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+182} \lor \neg \left(t \leq 3.5 \cdot 10^{+97}\right):\\
\;\;\;\;a \cdot \frac{t}{t + x}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -1.65e182 or 3.5000000000000001e97 < t Initial program 53.1%
Taylor expanded in t around inf 26.2%
Taylor expanded in y around 0 26.3%
associate-/l*55.6%
Simplified55.6%
if -1.65e182 < t < 3.5000000000000001e97Initial program 64.2%
Taylor expanded in y around inf 72.4%
Final simplification67.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.4e+204) z (if (<= x 5.5e+199) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.4e+204) {
tmp = z;
} else if (x <= 5.5e+199) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (x <= (-2.4d+204)) then
tmp = z
else if (x <= 5.5d+199) then
tmp = (z + a) - b
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.4e+204) {
tmp = z;
} else if (x <= 5.5e+199) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.4e+204: tmp = z elif x <= 5.5e+199: tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.4e+204) tmp = z; elseif (x <= 5.5e+199) tmp = Float64(Float64(z + a) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.4e+204) tmp = z; elseif (x <= 5.5e+199) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.4e+204], z, If[LessEqual[x, 5.5e+199], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+204}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+199}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.4e204 or 5.5e199 < x Initial program 50.6%
Taylor expanded in x around inf 64.9%
if -2.4e204 < x < 5.5e199Initial program 63.1%
Taylor expanded in y around inf 66.4%
Final simplification66.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.65e+157) a (if (<= a 2.65e-31) (- z b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.65e+157) {
tmp = a;
} else if (a <= 2.65e-31) {
tmp = z - b;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (a <= (-2.65d+157)) then
tmp = a
else if (a <= 2.65d-31) then
tmp = z - b
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.65e+157) {
tmp = a;
} else if (a <= 2.65e-31) {
tmp = z - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.65e+157: tmp = a elif a <= 2.65e-31: tmp = z - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.65e+157) tmp = a; elseif (a <= 2.65e-31) tmp = Float64(z - b); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.65e+157) tmp = a; elseif (a <= 2.65e-31) tmp = z - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.65e+157], a, If[LessEqual[a, 2.65e-31], N[(z - b), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{+157}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.65 \cdot 10^{-31}:\\
\;\;\;\;z - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -2.6499999999999999e157 or 2.65e-31 < a Initial program 50.0%
Taylor expanded in t around inf 63.3%
if -2.6499999999999999e157 < a < 2.65e-31Initial program 66.5%
Taylor expanded in a around 0 51.3%
+-commutative51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in y around inf 54.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4e+102) a (if (<= a 4.3e+76) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4e+102) {
tmp = a;
} else if (a <= 4.3e+76) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (a <= (-4d+102)) then
tmp = a
else if (a <= 4.3d+76) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4e+102) {
tmp = a;
} else if (a <= 4.3e+76) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4e+102: tmp = a elif a <= 4.3e+76: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4e+102) tmp = a; elseif (a <= 4.3e+76) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4e+102) tmp = a; elseif (a <= 4.3e+76) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4e+102], a, If[LessEqual[a, 4.3e+76], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+102}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+76}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -3.99999999999999991e102 or 4.29999999999999978e76 < a Initial program 41.3%
Taylor expanded in t around inf 68.2%
if -3.99999999999999991e102 < a < 4.29999999999999978e76Initial program 69.5%
Taylor expanded in x around inf 45.6%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
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
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 60.8%
Taylor expanded in t around inf 33.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
herbie shell --seed 2024111
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))