
(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 17 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 (+ t (+ x y))) (t_2 (+ y (+ x t))))
(if (or (<= z -2.35e-17) (not (<= z 4.9e-20)))
(*
z
(+
(/ x t_1)
(- (+ (/ y t_1) (* (/ a z) (/ (+ t y) t_1))) (/ (* b (/ y z)) t_1))))
(+ (* a (/ (+ t y) t_2)) (/ (+ (* z x) (* y (- z b))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = y + (x + t);
double tmp;
if ((z <= -2.35e-17) || !(z <= 4.9e-20)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / t_2)) + (((z * x) + (y * (z - b))) / 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 = t + (x + y)
t_2 = y + (x + t)
if ((z <= (-2.35d-17)) .or. (.not. (z <= 4.9d-20))) then
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)))
else
tmp = (a * ((t + y) / t_2)) + (((z * x) + (y * (z - b))) / 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 = t + (x + y);
double t_2 = y + (x + t);
double tmp;
if ((z <= -2.35e-17) || !(z <= 4.9e-20)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / t_2)) + (((z * x) + (y * (z - b))) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = y + (x + t) tmp = 0 if (z <= -2.35e-17) or not (z <= 4.9e-20): tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))) else: tmp = (a * ((t + y) / t_2)) + (((z * x) + (y * (z - b))) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(y + Float64(x + t)) tmp = 0.0 if ((z <= -2.35e-17) || !(z <= 4.9e-20)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(Float64(y / t_1) + Float64(Float64(a / z) * Float64(Float64(t + y) / t_1))) - Float64(Float64(b * Float64(y / z)) / t_1)))); else tmp = Float64(Float64(a * Float64(Float64(t + y) / t_2)) + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = y + (x + t); tmp = 0.0; if ((z <= -2.35e-17) || ~((z <= 4.9e-20))) tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))); else tmp = (a * ((t + y) / t_2)) + (((z * x) + (y * (z - b))) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.35e-17], N[Not[LessEqual[z, 4.9e-20]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(y / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{-17} \lor \neg \left(z \leq 4.9 \cdot 10^{-20}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(\frac{y}{t\_1} + \frac{a}{z} \cdot \frac{t + y}{t\_1}\right) - \frac{b \cdot \frac{y}{z}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_2} + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_2}\\
\end{array}
\end{array}
if z < -2.35e-17 or 4.9000000000000002e-20 < z Initial program 47.6%
Taylor expanded in z around inf 72.7%
associate--l+72.7%
+-commutative72.7%
+-commutative72.7%
times-frac86.9%
+-commutative86.9%
associate-/r*87.5%
associate-/l*95.7%
+-commutative95.7%
Simplified95.7%
if -2.35e-17 < z < 4.9000000000000002e-20Initial program 81.0%
Taylor expanded in b around 0 81.1%
mul-1-neg81.1%
+-commutative81.1%
associate-+l+81.1%
associate-/l*93.3%
+-commutative93.3%
associate-+r+93.3%
+-commutative93.3%
associate-+l+93.3%
sub-neg93.3%
div-sub93.3%
Simplified93.3%
Final simplification94.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 -5e+301) (not (<= t_1 2e+217))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -5e+301) || !(t_1 <= 2e+217)) {
tmp = (z + a) - b;
} else {
tmp = 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 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t))
if ((t_1 <= (-5d+301)) .or. (.not. (t_1 <= 2d+217))) then
tmp = (z + a) - b
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 t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -5e+301) || !(t_1 <= 2e+217)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -5e+301) or not (t_1 <= 2e+217): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= -5e+301) || !(t_1 <= 2e+217)) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -5e+301) || ~((t_1 <= 2e+217))) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+301], N[Not[LessEqual[t$95$1, 2e+217]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+301} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+217}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;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.0000000000000004e301 or 1.99999999999999992e217 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 14.7%
Taylor expanded in y around inf 66.0%
if -5.0000000000000004e301 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999992e217Initial program 99.4%
Final simplification85.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -1.85e+56)
t_2
(if (<= z -2e-45)
(+ a (/ (* y (- z b)) (+ t y)))
(if (<= z -1.1e-145)
(* a (/ (+ t y) t_1))
(if (<= z -1.85e-149)
(- b)
(if (<= z 1.95e-101)
(/ (- (* a (+ t y)) (* y b)) t_1)
(if (<= z 1e+126)
(* a (+ (* x (/ (/ z a) (+ x t))) (/ t (+ x t))))
t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.85e+56) {
tmp = t_2;
} else if (z <= -2e-45) {
tmp = a + ((y * (z - b)) / (t + y));
} else if (z <= -1.1e-145) {
tmp = a * ((t + y) / t_1);
} else if (z <= -1.85e-149) {
tmp = -b;
} else if (z <= 1.95e-101) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else if (z <= 1e+126) {
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)));
} 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 + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-1.85d+56)) then
tmp = t_2
else if (z <= (-2d-45)) then
tmp = a + ((y * (z - b)) / (t + y))
else if (z <= (-1.1d-145)) then
tmp = a * ((t + y) / t_1)
else if (z <= (-1.85d-149)) then
tmp = -b
else if (z <= 1.95d-101) then
tmp = ((a * (t + y)) - (y * b)) / t_1
else if (z <= 1d+126) then
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)))
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 + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.85e+56) {
tmp = t_2;
} else if (z <= -2e-45) {
tmp = a + ((y * (z - b)) / (t + y));
} else if (z <= -1.1e-145) {
tmp = a * ((t + y) / t_1);
} else if (z <= -1.85e-149) {
tmp = -b;
} else if (z <= 1.95e-101) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else if (z <= 1e+126) {
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -1.85e+56: tmp = t_2 elif z <= -2e-45: tmp = a + ((y * (z - b)) / (t + y)) elif z <= -1.1e-145: tmp = a * ((t + y) / t_1) elif z <= -1.85e-149: tmp = -b elif z <= 1.95e-101: tmp = ((a * (t + y)) - (y * b)) / t_1 elif z <= 1e+126: tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -1.85e+56) tmp = t_2; elseif (z <= -2e-45) tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(t + y))); elseif (z <= -1.1e-145) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= -1.85e-149) tmp = Float64(-b); elseif (z <= 1.95e-101) tmp = Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / t_1); elseif (z <= 1e+126) tmp = Float64(a * Float64(Float64(x * Float64(Float64(z / a) / Float64(x + t))) + Float64(t / Float64(x + t)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -1.85e+56) tmp = t_2; elseif (z <= -2e-45) tmp = a + ((y * (z - b)) / (t + y)); elseif (z <= -1.1e-145) tmp = a * ((t + y) / t_1); elseif (z <= -1.85e-149) tmp = -b; elseif (z <= 1.95e-101) tmp = ((a * (t + y)) - (y * b)) / t_1; elseif (z <= 1e+126) tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+56], t$95$2, If[LessEqual[z, -2e-45], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-145], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.85e-149], (-b), If[LessEqual[z, 1.95e-101], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 1e+126], N[(a * N[(N[(x * N[(N[(z / a), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-45}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t + y}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-145}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\
\;\;\;\;-b\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-101}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{t\_1}\\
\mathbf{elif}\;z \leq 10^{+126}:\\
\;\;\;\;a \cdot \left(x \cdot \frac{\frac{z}{a}}{x + t} + \frac{t}{x + t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.84999999999999998e56 or 9.99999999999999925e125 < z Initial program 35.7%
Taylor expanded in z around inf 27.5%
associate-/l*73.0%
+-commutative73.0%
+-commutative73.0%
associate-+r+73.0%
+-commutative73.0%
associate-+l+73.0%
Simplified73.0%
if -1.84999999999999998e56 < z < -1.99999999999999997e-45Initial program 88.4%
Taylor expanded in b around 0 88.4%
mul-1-neg88.4%
+-commutative88.4%
associate-+l+88.4%
associate-/l*95.8%
+-commutative95.8%
associate-+r+95.8%
+-commutative95.8%
associate-+l+95.8%
sub-neg95.8%
div-sub95.8%
Simplified95.8%
Taylor expanded in t around inf 88.0%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
Simplified72.2%
if -1.99999999999999997e-45 < z < -1.1e-145Initial program 49.0%
Taylor expanded in a around inf 33.8%
associate-/l*70.1%
+-commutative70.1%
associate-+r+70.1%
+-commutative70.1%
associate-+l+70.1%
Simplified70.1%
if -1.1e-145 < z < -1.84999999999999995e-149Initial program 51.8%
Taylor expanded in b around inf 51.8%
associate-*r*51.8%
neg-mul-151.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
if -1.84999999999999995e-149 < z < 1.95000000000000008e-101Initial program 86.0%
Taylor expanded in z around 0 76.7%
*-commutative76.7%
Simplified76.7%
if 1.95000000000000008e-101 < z < 9.99999999999999925e125Initial program 75.1%
Taylor expanded in a around inf 84.6%
associate--l+84.6%
+-commutative84.6%
+-commutative84.6%
associate-/l*87.3%
+-commutative87.3%
+-commutative87.3%
*-commutative87.3%
+-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 77.3%
+-commutative77.3%
associate-/l*77.4%
associate-/r*77.5%
+-commutative77.5%
+-commutative77.5%
Simplified77.5%
Final simplification74.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ (* a (/ (+ t y) t_1)) (/ (* z x) (+ x t))))
(t_3 (+ a (/ (+ (* z x) (* y (- z b))) t_1)))
(t_4 (* z (/ (+ x y) t_1))))
(if (<= z -5.3e+154)
t_4
(if (<= z -2.1e-39)
t_3
(if (<= z -4.7e-143)
t_2
(if (<= z 1.15e-50) t_3 (if (<= z 1.05e+126) t_2 t_4)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t));
double t_3 = a + (((z * x) + (y * (z - b))) / t_1);
double t_4 = z * ((x + y) / t_1);
double tmp;
if (z <= -5.3e+154) {
tmp = t_4;
} else if (z <= -2.1e-39) {
tmp = t_3;
} else if (z <= -4.7e-143) {
tmp = t_2;
} else if (z <= 1.15e-50) {
tmp = t_3;
} else if (z <= 1.05e+126) {
tmp = 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 = y + (x + t)
t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t))
t_3 = a + (((z * x) + (y * (z - b))) / t_1)
t_4 = z * ((x + y) / t_1)
if (z <= (-5.3d+154)) then
tmp = t_4
else if (z <= (-2.1d-39)) then
tmp = t_3
else if (z <= (-4.7d-143)) then
tmp = t_2
else if (z <= 1.15d-50) then
tmp = t_3
else if (z <= 1.05d+126) then
tmp = 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 = y + (x + t);
double t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t));
double t_3 = a + (((z * x) + (y * (z - b))) / t_1);
double t_4 = z * ((x + y) / t_1);
double tmp;
if (z <= -5.3e+154) {
tmp = t_4;
} else if (z <= -2.1e-39) {
tmp = t_3;
} else if (z <= -4.7e-143) {
tmp = t_2;
} else if (z <= 1.15e-50) {
tmp = t_3;
} else if (z <= 1.05e+126) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t)) t_3 = a + (((z * x) + (y * (z - b))) / t_1) t_4 = z * ((x + y) / t_1) tmp = 0 if z <= -5.3e+154: tmp = t_4 elif z <= -2.1e-39: tmp = t_3 elif z <= -4.7e-143: tmp = t_2 elif z <= 1.15e-50: tmp = t_3 elif z <= 1.05e+126: tmp = t_2 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(Float64(z * x) / Float64(x + t))) t_3 = Float64(a + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)) t_4 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -5.3e+154) tmp = t_4; elseif (z <= -2.1e-39) tmp = t_3; elseif (z <= -4.7e-143) tmp = t_2; elseif (z <= 1.15e-50) tmp = t_3; elseif (z <= 1.05e+126) tmp = t_2; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (a * ((t + y) / t_1)) + ((z * x) / (x + t)); t_3 = a + (((z * x) + (y * (z - b))) / t_1); t_4 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -5.3e+154) tmp = t_4; elseif (z <= -2.1e-39) tmp = t_3; elseif (z <= -4.7e-143) tmp = t_2; elseif (z <= 1.15e-50) tmp = t_3; elseif (z <= 1.05e+126) tmp = t_2; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(z * x), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+154], t$95$4, If[LessEqual[z, -2.1e-39], t$95$3, If[LessEqual[z, -4.7e-143], t$95$2, If[LessEqual[z, 1.15e-50], t$95$3, If[LessEqual[z, 1.05e+126], t$95$2, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \frac{t + y}{t\_1} + \frac{z \cdot x}{x + t}\\
t_3 := a + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
t_4 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+154}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -5.30000000000000024e154 or 1.05e126 < z Initial program 30.6%
Taylor expanded in z around inf 25.1%
associate-/l*81.2%
+-commutative81.2%
+-commutative81.2%
associate-+r+81.2%
+-commutative81.2%
associate-+l+81.2%
Simplified81.2%
if -5.30000000000000024e154 < z < -2.09999999999999993e-39 or -4.70000000000000045e-143 < z < 1.1500000000000001e-50Initial program 79.8%
Taylor expanded in b around 0 79.8%
mul-1-neg79.8%
+-commutative79.8%
associate-+l+79.8%
associate-/l*89.9%
+-commutative89.9%
associate-+r+89.9%
+-commutative89.9%
associate-+l+89.9%
sub-neg89.9%
div-sub89.9%
Simplified90.0%
Taylor expanded in t around inf 76.7%
if -2.09999999999999993e-39 < z < -4.70000000000000045e-143 or 1.1500000000000001e-50 < z < 1.05e126Initial program 66.6%
Taylor expanded in b around 0 66.6%
mul-1-neg66.6%
+-commutative66.6%
associate-+l+66.6%
associate-/l*85.0%
+-commutative85.0%
associate-+r+85.0%
+-commutative85.0%
associate-+l+85.0%
sub-neg85.0%
div-sub85.0%
Simplified85.0%
Taylor expanded in y around 0 85.0%
*-commutative85.0%
Simplified85.0%
Final simplification79.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -1.55e+56)
t_2
(if (<= z -2e-40)
(+ a (/ (* y (- z b)) (+ t y)))
(if (<= z -1.1e-145)
(* a (/ (+ t y) t_1))
(if (<= z -1.85e-149)
(- b)
(if (<= z 4.4e-103)
(/ (- (* a (+ t y)) (* y b)) t_1)
(if (<= z 5.9e+22) (/ (+ (* z x) (* t a)) (+ x t)) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.55e+56) {
tmp = t_2;
} else if (z <= -2e-40) {
tmp = a + ((y * (z - b)) / (t + y));
} else if (z <= -1.1e-145) {
tmp = a * ((t + y) / t_1);
} else if (z <= -1.85e-149) {
tmp = -b;
} else if (z <= 4.4e-103) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else if (z <= 5.9e+22) {
tmp = ((z * x) + (t * a)) / (x + t);
} 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 + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-1.55d+56)) then
tmp = t_2
else if (z <= (-2d-40)) then
tmp = a + ((y * (z - b)) / (t + y))
else if (z <= (-1.1d-145)) then
tmp = a * ((t + y) / t_1)
else if (z <= (-1.85d-149)) then
tmp = -b
else if (z <= 4.4d-103) then
tmp = ((a * (t + y)) - (y * b)) / t_1
else if (z <= 5.9d+22) then
tmp = ((z * x) + (t * a)) / (x + t)
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 + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.55e+56) {
tmp = t_2;
} else if (z <= -2e-40) {
tmp = a + ((y * (z - b)) / (t + y));
} else if (z <= -1.1e-145) {
tmp = a * ((t + y) / t_1);
} else if (z <= -1.85e-149) {
tmp = -b;
} else if (z <= 4.4e-103) {
tmp = ((a * (t + y)) - (y * b)) / t_1;
} else if (z <= 5.9e+22) {
tmp = ((z * x) + (t * a)) / (x + t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -1.55e+56: tmp = t_2 elif z <= -2e-40: tmp = a + ((y * (z - b)) / (t + y)) elif z <= -1.1e-145: tmp = a * ((t + y) / t_1) elif z <= -1.85e-149: tmp = -b elif z <= 4.4e-103: tmp = ((a * (t + y)) - (y * b)) / t_1 elif z <= 5.9e+22: tmp = ((z * x) + (t * a)) / (x + t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -1.55e+56) tmp = t_2; elseif (z <= -2e-40) tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(t + y))); elseif (z <= -1.1e-145) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= -1.85e-149) tmp = Float64(-b); elseif (z <= 4.4e-103) tmp = Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / t_1); elseif (z <= 5.9e+22) tmp = Float64(Float64(Float64(z * x) + Float64(t * a)) / Float64(x + t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -1.55e+56) tmp = t_2; elseif (z <= -2e-40) tmp = a + ((y * (z - b)) / (t + y)); elseif (z <= -1.1e-145) tmp = a * ((t + y) / t_1); elseif (z <= -1.85e-149) tmp = -b; elseif (z <= 4.4e-103) tmp = ((a * (t + y)) - (y * b)) / t_1; elseif (z <= 5.9e+22) tmp = ((z * x) + (t * a)) / (x + t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+56], t$95$2, If[LessEqual[z, -2e-40], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-145], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.85e-149], (-b), If[LessEqual[z, 4.4e-103], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 5.9e+22], N[(N[(N[(z * x), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-40}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t + y}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-145}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-149}:\\
\;\;\;\;-b\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) - y \cdot b}{t\_1}\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.55000000000000002e56 or 5.9000000000000002e22 < z Initial program 39.9%
Taylor expanded in z around inf 30.3%
associate-/l*70.6%
+-commutative70.6%
+-commutative70.6%
associate-+r+70.6%
+-commutative70.6%
associate-+l+70.6%
Simplified70.6%
if -1.55000000000000002e56 < z < -1.9999999999999999e-40Initial program 88.4%
Taylor expanded in b around 0 88.4%
mul-1-neg88.4%
+-commutative88.4%
associate-+l+88.4%
associate-/l*95.8%
+-commutative95.8%
associate-+r+95.8%
+-commutative95.8%
associate-+l+95.8%
sub-neg95.8%
div-sub95.8%
Simplified95.8%
Taylor expanded in t around inf 88.0%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
Simplified72.2%
if -1.9999999999999999e-40 < z < -1.1e-145Initial program 49.0%
Taylor expanded in a around inf 33.8%
associate-/l*70.1%
+-commutative70.1%
associate-+r+70.1%
+-commutative70.1%
associate-+l+70.1%
Simplified70.1%
if -1.1e-145 < z < -1.84999999999999995e-149Initial program 51.8%
Taylor expanded in b around inf 51.8%
associate-*r*51.8%
neg-mul-151.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
if -1.84999999999999995e-149 < z < 4.3999999999999999e-103Initial program 86.0%
Taylor expanded in z around 0 76.7%
*-commutative76.7%
Simplified76.7%
if 4.3999999999999999e-103 < z < 5.9000000000000002e22Initial program 80.0%
Taylor expanded in y around 0 83.7%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ a (/ (+ (* z x) (* y (- z b))) t_1)))
(t_3 (* z (/ (+ x y) t_1))))
(if (<= z -2.5e+154)
t_3
(if (<= z -2.5e-46)
t_2
(if (<= z -7.5e-143)
(* a (/ (+ t y) t_1))
(if (<= z 1.2e+125) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a + (((z * x) + (y * (z - b))) / t_1);
double t_3 = z * ((x + y) / t_1);
double tmp;
if (z <= -2.5e+154) {
tmp = t_3;
} else if (z <= -2.5e-46) {
tmp = t_2;
} else if (z <= -7.5e-143) {
tmp = a * ((t + y) / t_1);
} else if (z <= 1.2e+125) {
tmp = t_2;
} 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 + (x + t)
t_2 = a + (((z * x) + (y * (z - b))) / t_1)
t_3 = z * ((x + y) / t_1)
if (z <= (-2.5d+154)) then
tmp = t_3
else if (z <= (-2.5d-46)) then
tmp = t_2
else if (z <= (-7.5d-143)) then
tmp = a * ((t + y) / t_1)
else if (z <= 1.2d+125) then
tmp = t_2
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 + (x + t);
double t_2 = a + (((z * x) + (y * (z - b))) / t_1);
double t_3 = z * ((x + y) / t_1);
double tmp;
if (z <= -2.5e+154) {
tmp = t_3;
} else if (z <= -2.5e-46) {
tmp = t_2;
} else if (z <= -7.5e-143) {
tmp = a * ((t + y) / t_1);
} else if (z <= 1.2e+125) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a + (((z * x) + (y * (z - b))) / t_1) t_3 = z * ((x + y) / t_1) tmp = 0 if z <= -2.5e+154: tmp = t_3 elif z <= -2.5e-46: tmp = t_2 elif z <= -7.5e-143: tmp = a * ((t + y) / t_1) elif z <= 1.2e+125: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)) t_3 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -2.5e+154) tmp = t_3; elseif (z <= -2.5e-46) tmp = t_2; elseif (z <= -7.5e-143) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 1.2e+125) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a + (((z * x) + (y * (z - b))) / t_1); t_3 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -2.5e+154) tmp = t_3; elseif (z <= -2.5e-46) tmp = t_2; elseif (z <= -7.5e-143) tmp = a * ((t + y) / t_1); elseif (z <= 1.2e+125) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+154], t$95$3, If[LessEqual[z, -2.5e-46], t$95$2, If[LessEqual[z, -7.5e-143], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+125], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
t_3 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+154}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.50000000000000002e154 or 1.2e125 < z Initial program 30.6%
Taylor expanded in z around inf 25.1%
associate-/l*81.2%
+-commutative81.2%
+-commutative81.2%
associate-+r+81.2%
+-commutative81.2%
associate-+l+81.2%
Simplified81.2%
if -2.50000000000000002e154 < z < -2.49999999999999996e-46 or -7.5000000000000003e-143 < z < 1.2e125Initial program 78.5%
Taylor expanded in b around 0 78.6%
mul-1-neg78.6%
+-commutative78.6%
associate-+l+78.6%
associate-/l*88.9%
+-commutative88.9%
associate-+r+88.9%
+-commutative88.9%
associate-+l+88.9%
sub-neg88.9%
div-sub88.9%
Simplified89.0%
Taylor expanded in t around inf 75.9%
if -2.49999999999999996e-46 < z < -7.5000000000000003e-143Initial program 49.0%
Taylor expanded in a around inf 33.8%
associate-/l*70.1%
+-commutative70.1%
associate-+r+70.1%
+-commutative70.1%
associate-+l+70.1%
Simplified70.1%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t y))) (t_2 (+ y (+ x t))) (t_3 (* z (/ (+ x y) t_2))))
(if (<= z -1.6e+96)
t_3
(if (<= z -3.5e-143)
(/ (+ t_1 (* z (+ x y))) t_2)
(if (<= z 1.2e-101)
(/ (- t_1 (* y b)) t_2)
(if (<= z 1e+126)
(* a (+ (* x (/ (/ z a) (+ x t))) (/ t (+ x t))))
t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -1.6e+96) {
tmp = t_3;
} else if (z <= -3.5e-143) {
tmp = (t_1 + (z * (x + y))) / t_2;
} else if (z <= 1.2e-101) {
tmp = (t_1 - (y * b)) / t_2;
} else if (z <= 1e+126) {
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)));
} 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 = a * (t + y)
t_2 = y + (x + t)
t_3 = z * ((x + y) / t_2)
if (z <= (-1.6d+96)) then
tmp = t_3
else if (z <= (-3.5d-143)) then
tmp = (t_1 + (z * (x + y))) / t_2
else if (z <= 1.2d-101) then
tmp = (t_1 - (y * b)) / t_2
else if (z <= 1d+126) then
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)))
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 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * ((x + y) / t_2);
double tmp;
if (z <= -1.6e+96) {
tmp = t_3;
} else if (z <= -3.5e-143) {
tmp = (t_1 + (z * (x + y))) / t_2;
} else if (z <= 1.2e-101) {
tmp = (t_1 - (y * b)) / t_2;
} else if (z <= 1e+126) {
tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + y) t_2 = y + (x + t) t_3 = z * ((x + y) / t_2) tmp = 0 if z <= -1.6e+96: tmp = t_3 elif z <= -3.5e-143: tmp = (t_1 + (z * (x + y))) / t_2 elif z <= 1.2e-101: tmp = (t_1 - (y * b)) / t_2 elif z <= 1e+126: tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(Float64(x + y) / t_2)) tmp = 0.0 if (z <= -1.6e+96) tmp = t_3; elseif (z <= -3.5e-143) tmp = Float64(Float64(t_1 + Float64(z * Float64(x + y))) / t_2); elseif (z <= 1.2e-101) tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2); elseif (z <= 1e+126) tmp = Float64(a * Float64(Float64(x * Float64(Float64(z / a) / Float64(x + t))) + Float64(t / Float64(x + t)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + y); t_2 = y + (x + t); t_3 = z * ((x + y) / t_2); tmp = 0.0; if (z <= -1.6e+96) tmp = t_3; elseif (z <= -3.5e-143) tmp = (t_1 + (z * (x + y))) / t_2; elseif (z <= 1.2e-101) tmp = (t_1 - (y * b)) / t_2; elseif (z <= 1e+126) tmp = a * ((x * ((z / a) / (x + t))) + (t / (x + t))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+96], t$95$3, If[LessEqual[z, -3.5e-143], N[(N[(t$95$1 + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1.2e-101], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1e+126], N[(a * N[(N[(x * N[(N[(z / a), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \frac{x + y}{t\_2}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+96}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-143}:\\
\;\;\;\;\frac{t\_1 + z \cdot \left(x + y\right)}{t\_2}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\
\mathbf{elif}\;z \leq 10^{+126}:\\
\;\;\;\;a \cdot \left(x \cdot \frac{\frac{z}{a}}{x + t} + \frac{t}{x + t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.60000000000000003e96 or 9.99999999999999925e125 < z Initial program 33.2%
Taylor expanded in z around inf 26.5%
associate-/l*74.8%
+-commutative74.8%
+-commutative74.8%
associate-+r+74.8%
+-commutative74.8%
associate-+l+74.8%
Simplified74.8%
if -1.60000000000000003e96 < z < -3.50000000000000005e-143Initial program 72.7%
Taylor expanded in b around 0 66.1%
if -3.50000000000000005e-143 < z < 1.2e-101Initial program 85.2%
Taylor expanded in z around 0 76.1%
*-commutative76.1%
Simplified76.1%
if 1.2e-101 < z < 9.99999999999999925e125Initial program 75.1%
Taylor expanded in a around inf 84.6%
associate--l+84.6%
+-commutative84.6%
+-commutative84.6%
associate-/l*87.3%
+-commutative87.3%
+-commutative87.3%
*-commutative87.3%
+-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 77.3%
+-commutative77.3%
associate-/l*77.4%
associate-/r*77.5%
+-commutative77.5%
+-commutative77.5%
Simplified77.5%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= z -1.12e+160) (not (<= z 2.4e+126)))
(* z (/ (+ x y) t_1))
(+ (* a (/ (+ t y) t_1)) (/ (+ (* z x) (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((z <= -1.12e+160) || !(z <= 2.4e+126)) {
tmp = z * ((x + y) / t_1);
} else {
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - 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 + (x + t)
if ((z <= (-1.12d+160)) .or. (.not. (z <= 2.4d+126))) then
tmp = z * ((x + y) / t_1)
else
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - 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 + (x + t);
double tmp;
if ((z <= -1.12e+160) || !(z <= 2.4e+126)) {
tmp = z * ((x + y) / t_1);
} else {
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (z <= -1.12e+160) or not (z <= 2.4e+126): tmp = z * ((x + y) / t_1) else: tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((z <= -1.12e+160) || !(z <= 2.4e+126)) tmp = Float64(z * Float64(Float64(x + y) / t_1)); else tmp = Float64(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((z <= -1.12e+160) || ~((z <= 2.4e+126))) tmp = z * ((x + y) / t_1); else tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.12e+160], N[Not[LessEqual[z, 2.4e+126]], $MachinePrecision]], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+160} \lor \neg \left(z \leq 2.4 \cdot 10^{+126}\right):\\
\;\;\;\;z \cdot \frac{x + y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1} + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
\end{array}
\end{array}
if z < -1.12e160 or 2.40000000000000012e126 < z Initial program 28.7%
Taylor expanded in z around inf 23.7%
associate-/l*81.3%
+-commutative81.3%
+-commutative81.3%
associate-+r+81.3%
+-commutative81.3%
associate-+l+81.3%
Simplified81.3%
if -1.12e160 < z < 2.40000000000000012e126Initial program 76.7%
Taylor expanded in b around 0 76.7%
mul-1-neg76.7%
+-commutative76.7%
associate-+l+76.7%
associate-/l*88.8%
+-commutative88.8%
associate-+r+88.8%
+-commutative88.8%
associate-+l+88.8%
sub-neg88.8%
div-sub88.8%
Simplified88.8%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (/ (+ x y) t_1)))
(if (<= z -8.5e+144)
(* z (+ (/ (/ (- (* a (+ t y)) (* y b)) t_1) z) t_2))
(if (<= z 2e+127)
(+ (* a (/ (+ t y) t_1)) (/ (+ (* z x) (* y (- z b))) t_1))
(* z t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) / t_1;
double tmp;
if (z <= -8.5e+144) {
tmp = z * (((((a * (t + y)) - (y * b)) / t_1) / z) + t_2);
} else if (z <= 2e+127) {
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1);
} else {
tmp = z * 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 + (x + t)
t_2 = (x + y) / t_1
if (z <= (-8.5d+144)) then
tmp = z * (((((a * (t + y)) - (y * b)) / t_1) / z) + t_2)
else if (z <= 2d+127) then
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1)
else
tmp = z * 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 + (x + t);
double t_2 = (x + y) / t_1;
double tmp;
if (z <= -8.5e+144) {
tmp = z * (((((a * (t + y)) - (y * b)) / t_1) / z) + t_2);
} else if (z <= 2e+127) {
tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1);
} else {
tmp = z * t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (x + y) / t_1 tmp = 0 if z <= -8.5e+144: tmp = z * (((((a * (t + y)) - (y * b)) / t_1) / z) + t_2) elif z <= 2e+127: tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1) else: tmp = z * t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(x + y) / t_1) tmp = 0.0 if (z <= -8.5e+144) tmp = Float64(z * Float64(Float64(Float64(Float64(Float64(a * Float64(t + y)) - Float64(y * b)) / t_1) / z) + t_2)); elseif (z <= 2e+127) tmp = Float64(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)); else tmp = Float64(z * t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (x + y) / t_1; tmp = 0.0; if (z <= -8.5e+144) tmp = z * (((((a * (t + y)) - (y * b)) / t_1) / z) + t_2); elseif (z <= 2e+127) tmp = (a * ((t + y) / t_1)) + (((z * x) + (y * (z - b))) / t_1); else tmp = z * t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[z, -8.5e+144], N[(z * N[(N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / z), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+127], N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(z * t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+144}:\\
\;\;\;\;z \cdot \left(\frac{\frac{a \cdot \left(t + y\right) - y \cdot b}{t\_1}}{z} + t\_2\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1} + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\_2\\
\end{array}
\end{array}
if z < -8.4999999999999998e144Initial program 34.7%
Taylor expanded in z around -inf 81.9%
associate-*r*81.9%
mul-1-neg81.9%
mul-1-neg81.9%
unsub-neg81.9%
associate-*r/81.9%
distribute-lft-in81.9%
neg-mul-181.9%
unsub-neg81.9%
neg-mul-181.9%
+-commutative81.9%
associate-+r+81.9%
+-commutative81.9%
associate-+l+81.9%
Simplified81.9%
if -8.4999999999999998e144 < z < 1.99999999999999991e127Initial program 76.7%
Taylor expanded in b around 0 76.7%
mul-1-neg76.7%
+-commutative76.7%
associate-+l+76.7%
associate-/l*89.1%
+-commutative89.1%
associate-+r+89.1%
+-commutative89.1%
associate-+l+89.1%
sub-neg89.1%
div-sub89.1%
Simplified89.1%
if 1.99999999999999991e127 < z Initial program 26.8%
Taylor expanded in z around inf 27.3%
associate-/l*86.0%
+-commutative86.0%
+-commutative86.0%
associate-+r+86.0%
+-commutative86.0%
associate-+l+86.0%
Simplified86.0%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -8.8e+46)
t_2
(if (<= z -1.55e-144)
(* a (/ (+ t y) t_1))
(if (<= z 6.8e-90)
(* b (- (/ a b) (/ y (+ t y))))
(if (<= z 1.05e+17) (/ (+ (* z x) (* t a)) (+ x t)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -8.8e+46) {
tmp = t_2;
} else if (z <= -1.55e-144) {
tmp = a * ((t + y) / t_1);
} else if (z <= 6.8e-90) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (z <= 1.05e+17) {
tmp = ((z * x) + (t * a)) / (x + t);
} 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 + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-8.8d+46)) then
tmp = t_2
else if (z <= (-1.55d-144)) then
tmp = a * ((t + y) / t_1)
else if (z <= 6.8d-90) then
tmp = b * ((a / b) - (y / (t + y)))
else if (z <= 1.05d+17) then
tmp = ((z * x) + (t * a)) / (x + t)
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 + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -8.8e+46) {
tmp = t_2;
} else if (z <= -1.55e-144) {
tmp = a * ((t + y) / t_1);
} else if (z <= 6.8e-90) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (z <= 1.05e+17) {
tmp = ((z * x) + (t * a)) / (x + t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -8.8e+46: tmp = t_2 elif z <= -1.55e-144: tmp = a * ((t + y) / t_1) elif z <= 6.8e-90: tmp = b * ((a / b) - (y / (t + y))) elif z <= 1.05e+17: tmp = ((z * x) + (t * a)) / (x + t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -8.8e+46) tmp = t_2; elseif (z <= -1.55e-144) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 6.8e-90) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / Float64(t + y)))); elseif (z <= 1.05e+17) tmp = Float64(Float64(Float64(z * x) + Float64(t * a)) / Float64(x + t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -8.8e+46) tmp = t_2; elseif (z <= -1.55e-144) tmp = a * ((t + y) / t_1); elseif (z <= 6.8e-90) tmp = b * ((a / b) - (y / (t + y))); elseif (z <= 1.05e+17) tmp = ((z * x) + (t * a)) / (x + t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.8e+46], t$95$2, If[LessEqual[z, -1.55e-144], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-90], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+17], N[(N[(N[(z * x), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-90}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t + y}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+17}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -8.8000000000000001e46 or 1.05e17 < z Initial program 40.1%
Taylor expanded in z around inf 30.6%
associate-/l*70.3%
+-commutative70.3%
+-commutative70.3%
associate-+r+70.3%
+-commutative70.3%
associate-+l+70.3%
Simplified70.3%
if -8.8000000000000001e46 < z < -1.55e-144Initial program 75.7%
Taylor expanded in a around inf 37.1%
associate-/l*55.7%
+-commutative55.7%
associate-+r+55.7%
+-commutative55.7%
associate-+l+55.7%
Simplified55.7%
if -1.55e-144 < z < 6.79999999999999988e-90Initial program 84.5%
Taylor expanded in z around 0 74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in x around 0 56.4%
Taylor expanded in b around inf 63.8%
+-commutative63.8%
mul-1-neg63.8%
unsub-neg63.8%
+-commutative63.8%
Simplified63.8%
if 6.79999999999999988e-90 < z < 1.05e17Initial program 81.7%
Taylor expanded in y around 0 86.1%
Final simplification67.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* z (/ (+ x y) t_1))))
(if (<= z -1.65e+43)
t_2
(if (<= z -2.7e-144)
(* a (/ (+ t y) t_1))
(if (<= z 13600000000000.0) (* b (- (/ a b) (/ y (+ t y)))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.65e+43) {
tmp = t_2;
} else if (z <= -2.7e-144) {
tmp = a * ((t + y) / t_1);
} else if (z <= 13600000000000.0) {
tmp = b * ((a / b) - (y / (t + y)));
} 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 + (x + t)
t_2 = z * ((x + y) / t_1)
if (z <= (-1.65d+43)) then
tmp = t_2
else if (z <= (-2.7d-144)) then
tmp = a * ((t + y) / t_1)
else if (z <= 13600000000000.0d0) then
tmp = b * ((a / b) - (y / (t + 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 t_1 = y + (x + t);
double t_2 = z * ((x + y) / t_1);
double tmp;
if (z <= -1.65e+43) {
tmp = t_2;
} else if (z <= -2.7e-144) {
tmp = a * ((t + y) / t_1);
} else if (z <= 13600000000000.0) {
tmp = b * ((a / b) - (y / (t + y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * ((x + y) / t_1) tmp = 0 if z <= -1.65e+43: tmp = t_2 elif z <= -2.7e-144: tmp = a * ((t + y) / t_1) elif z <= 13600000000000.0: tmp = b * ((a / b) - (y / (t + y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (z <= -1.65e+43) tmp = t_2; elseif (z <= -2.7e-144) tmp = Float64(a * Float64(Float64(t + y) / t_1)); elseif (z <= 13600000000000.0) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / Float64(t + y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * ((x + y) / t_1); tmp = 0.0; if (z <= -1.65e+43) tmp = t_2; elseif (z <= -2.7e-144) tmp = a * ((t + y) / t_1); elseif (z <= 13600000000000.0) tmp = b * ((a / b) - (y / (t + y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+43], t$95$2, If[LessEqual[z, -2.7e-144], N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 13600000000000.0], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \frac{x + y}{t\_1}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_1}\\
\mathbf{elif}\;z \leq 13600000000000:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t + y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.6500000000000001e43 or 1.36e13 < z Initial program 40.1%
Taylor expanded in z around inf 30.6%
associate-/l*70.3%
+-commutative70.3%
+-commutative70.3%
associate-+r+70.3%
+-commutative70.3%
associate-+l+70.3%
Simplified70.3%
if -1.6500000000000001e43 < z < -2.69999999999999975e-144Initial program 75.7%
Taylor expanded in a around inf 37.1%
associate-/l*55.7%
+-commutative55.7%
associate-+r+55.7%
+-commutative55.7%
associate-+l+55.7%
Simplified55.7%
if -2.69999999999999975e-144 < z < 1.36e13Initial program 84.0%
Taylor expanded in z around 0 69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around 0 54.0%
Taylor expanded in b around inf 61.8%
+-commutative61.8%
mul-1-neg61.8%
unsub-neg61.8%
+-commutative61.8%
Simplified61.8%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= x -8.5e+125)
z
(if (<= x -1.75e-189)
t_1
(if (<= x 1.52e-235)
(* b (- (/ a b) (/ y (+ t y))))
(if (<= x 1.6e+216) t_1 z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (x <= -8.5e+125) {
tmp = z;
} else if (x <= -1.75e-189) {
tmp = t_1;
} else if (x <= 1.52e-235) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (x <= 1.6e+216) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (x <= (-8.5d+125)) then
tmp = z
else if (x <= (-1.75d-189)) then
tmp = t_1
else if (x <= 1.52d-235) then
tmp = b * ((a / b) - (y / (t + y)))
else if (x <= 1.6d+216) then
tmp = t_1
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 t_1 = (z + a) - b;
double tmp;
if (x <= -8.5e+125) {
tmp = z;
} else if (x <= -1.75e-189) {
tmp = t_1;
} else if (x <= 1.52e-235) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (x <= 1.6e+216) {
tmp = t_1;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if x <= -8.5e+125: tmp = z elif x <= -1.75e-189: tmp = t_1 elif x <= 1.52e-235: tmp = b * ((a / b) - (y / (t + y))) elif x <= 1.6e+216: tmp = t_1 else: tmp = z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (x <= -8.5e+125) tmp = z; elseif (x <= -1.75e-189) tmp = t_1; elseif (x <= 1.52e-235) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / Float64(t + y)))); elseif (x <= 1.6e+216) tmp = t_1; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (x <= -8.5e+125) tmp = z; elseif (x <= -1.75e-189) tmp = t_1; elseif (x <= 1.52e-235) tmp = b * ((a / b) - (y / (t + y))); elseif (x <= 1.6e+216) tmp = t_1; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[x, -8.5e+125], z, If[LessEqual[x, -1.75e-189], t$95$1, If[LessEqual[x, 1.52e-235], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+216], t$95$1, z]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+125}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{-235}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t + y}\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -8.49999999999999974e125 or 1.59999999999999985e216 < x Initial program 46.3%
Taylor expanded in x around inf 62.6%
if -8.49999999999999974e125 < x < -1.7500000000000001e-189 or 1.52e-235 < x < 1.59999999999999985e216Initial program 68.0%
Taylor expanded in y around inf 57.6%
if -1.7500000000000001e-189 < x < 1.52e-235Initial program 69.7%
Taylor expanded in z around 0 64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in x around 0 64.5%
Taylor expanded in b around inf 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
+-commutative81.1%
Simplified81.1%
Final simplification62.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -4.8e-49)
z
(if (or (<= x 1.5e-204) (and (not (<= x 2.7e-189)) (<= x 5.5e+167)))
(- a b)
z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.8e-49) {
tmp = z;
} else if ((x <= 1.5e-204) || (!(x <= 2.7e-189) && (x <= 5.5e+167))) {
tmp = 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 <= (-4.8d-49)) then
tmp = z
else if ((x <= 1.5d-204) .or. (.not. (x <= 2.7d-189)) .and. (x <= 5.5d+167)) then
tmp = 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 <= -4.8e-49) {
tmp = z;
} else if ((x <= 1.5e-204) || (!(x <= 2.7e-189) && (x <= 5.5e+167))) {
tmp = a - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.8e-49: tmp = z elif (x <= 1.5e-204) or (not (x <= 2.7e-189) and (x <= 5.5e+167)): tmp = a - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.8e-49) tmp = z; elseif ((x <= 1.5e-204) || (!(x <= 2.7e-189) && (x <= 5.5e+167))) tmp = Float64(a - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.8e-49) tmp = z; elseif ((x <= 1.5e-204) || (~((x <= 2.7e-189)) && (x <= 5.5e+167))) tmp = a - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.8e-49], z, If[Or[LessEqual[x, 1.5e-204], And[N[Not[LessEqual[x, 2.7e-189]], $MachinePrecision], LessEqual[x, 5.5e+167]]], N[(a - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-49}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-204} \lor \neg \left(x \leq 2.7 \cdot 10^{-189}\right) \land x \leq 5.5 \cdot 10^{+167}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -4.79999999999999985e-49 or 1.4999999999999999e-204 < x < 2.6999999999999999e-189 or 5.5000000000000005e167 < x Initial program 56.3%
Taylor expanded in x around inf 55.5%
if -4.79999999999999985e-49 < x < 1.4999999999999999e-204 or 2.6999999999999999e-189 < x < 5.5000000000000005e167Initial program 68.3%
Taylor expanded in z around 0 54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around inf 50.4%
Final simplification52.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -7400000000000.0) (not (<= x 2.65e+157))) (* z (/ (+ x y) (+ y (+ x t)))) (+ a (/ (* y (- z b)) (+ t y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -7400000000000.0) || !(x <= 2.65e+157)) {
tmp = z * ((x + y) / (y + (x + t)));
} else {
tmp = a + ((y * (z - b)) / (t + y));
}
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 <= (-7400000000000.0d0)) .or. (.not. (x <= 2.65d+157))) then
tmp = z * ((x + y) / (y + (x + t)))
else
tmp = a + ((y * (z - b)) / (t + y))
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 <= -7400000000000.0) || !(x <= 2.65e+157)) {
tmp = z * ((x + y) / (y + (x + t)));
} else {
tmp = a + ((y * (z - b)) / (t + y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -7400000000000.0) or not (x <= 2.65e+157): tmp = z * ((x + y) / (y + (x + t))) else: tmp = a + ((y * (z - b)) / (t + y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -7400000000000.0) || !(x <= 2.65e+157)) tmp = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))); else tmp = Float64(a + Float64(Float64(y * Float64(z - b)) / Float64(t + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -7400000000000.0) || ~((x <= 2.65e+157))) tmp = z * ((x + y) / (y + (x + t))); else tmp = a + ((y * (z - b)) / (t + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -7400000000000.0], N[Not[LessEqual[x, 2.65e+157]], $MachinePrecision]], N[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7400000000000 \lor \neg \left(x \leq 2.65 \cdot 10^{+157}\right):\\
\;\;\;\;z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;a + \frac{y \cdot \left(z - b\right)}{t + y}\\
\end{array}
\end{array}
if x < -7.4e12 or 2.6499999999999999e157 < x Initial program 48.9%
Taylor expanded in z around inf 33.2%
associate-/l*63.5%
+-commutative63.5%
+-commutative63.5%
associate-+r+63.5%
+-commutative63.5%
associate-+l+63.5%
Simplified63.5%
if -7.4e12 < x < 2.6499999999999999e157Initial program 71.0%
Taylor expanded in b around 0 71.0%
mul-1-neg71.0%
+-commutative71.0%
associate-+l+71.0%
associate-/l*80.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
associate-+l+80.0%
sub-neg80.0%
div-sub80.0%
Simplified80.1%
Taylor expanded in t around inf 74.9%
Taylor expanded in x around 0 68.1%
+-commutative68.1%
Simplified68.1%
Final simplification66.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.55e+125) z (if (<= x 1.45e+216) (- (+ z a) b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.55e+125) {
tmp = z;
} else if (x <= 1.45e+216) {
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.55d+125)) then
tmp = z
else if (x <= 1.45d+216) 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.55e+125) {
tmp = z;
} else if (x <= 1.45e+216) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.55e+125: tmp = z elif x <= 1.45e+216: tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.55e+125) tmp = z; elseif (x <= 1.45e+216) 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.55e+125) tmp = z; elseif (x <= 1.45e+216) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.55e+125], z, If[LessEqual[x, 1.45e+216], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{+125}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+216}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.5499999999999999e125 or 1.45e216 < x Initial program 46.3%
Taylor expanded in x around inf 62.6%
if -2.5499999999999999e125 < x < 1.45e216Initial program 68.3%
Taylor expanded in y around inf 58.1%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.55e-36) z (if (<= x 5.5e+167) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.55e-36) {
tmp = z;
} else if (x <= 5.5e+167) {
tmp = a;
} 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.55d-36)) then
tmp = z
else if (x <= 5.5d+167) then
tmp = a
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.55e-36) {
tmp = z;
} else if (x <= 5.5e+167) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.55e-36: tmp = z elif x <= 5.5e+167: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.55e-36) tmp = z; elseif (x <= 5.5e+167) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.55e-36) tmp = z; elseif (x <= 5.5e+167) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.55e-36], z, If[LessEqual[x, 5.5e+167], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.55 \cdot 10^{-36}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+167}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -2.54999999999999987e-36 or 5.5000000000000005e167 < x Initial program 53.0%
Taylor expanded in x around inf 56.0%
if -2.54999999999999987e-36 < x < 5.5000000000000005e167Initial program 69.5%
Taylor expanded in t around inf 43.8%
(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 63.0%
Taylor expanded in t around inf 32.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 2024085
(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)))