
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.8e+83) (not (<= z 5.2e+70))) (/ (- (* (* 9.0 (/ y z)) x) (* 4.0 (* a t))) c) (/ (+ (- (* y (* 9.0 x)) (* a (* t (* z 4.0)))) b) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.8e+83) || !(z <= 5.2e+70)) {
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
} else {
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.8d+83)) .or. (.not. (z <= 5.2d+70))) then
tmp = (((9.0d0 * (y / z)) * x) - (4.0d0 * (a * t))) / c
else
tmp = (((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0)))) + b) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.8e+83) || !(z <= 5.2e+70)) {
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
} else {
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.8e+83) or not (z <= 5.2e+70): tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c else: tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.8e+83) || !(z <= 5.2e+70)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / z)) * x) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0)))) + b) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.8e+83) || ~((z <= 5.2e+70)))
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
else
tmp = (((y * (9.0 * x)) - (a * (t * (z * 4.0)))) + b) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.8e+83], N[Not[LessEqual[z, 5.2e+70]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+83} \lor \neg \left(z \leq 5.2 \cdot 10^{+70}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{y}{z}\right) \cdot x - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right) + b}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.8000000000000002e83 or 5.2000000000000001e70 < z Initial program 49.1%
associate-+l-49.1%
*-commutative49.1%
associate-*r*53.7%
*-commutative53.7%
associate-+l-53.7%
associate-*l*53.8%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in z around inf 58.6%
Taylor expanded in b around 0 74.9%
associate-*r/74.9%
Applied egg-rr74.9%
associate-/l*74.9%
associate-*r/82.4%
*-commutative82.4%
associate-*r*82.4%
Simplified82.4%
if -3.8000000000000002e83 < z < 5.2000000000000001e70Initial program 95.5%
Final simplification90.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))))
(if (<= z -3.4e-28)
(* -4.0 (/ (* a t) c))
(if (<= z -1.15e-59)
t_1
(if (<= z -2.8e-150)
(* a (/ (* t -4.0) c))
(if (<= z 5.4e-205)
t_1
(if (<= z 4.4e-70) (/ b (* z c)) (* t (* -4.0 (/ a c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (z <= -3.4e-28) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= -1.15e-59) {
tmp = t_1;
} else if (z <= -2.8e-150) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 5.4e-205) {
tmp = t_1;
} else if (z <= 4.4e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
if (z <= (-3.4d-28)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= (-1.15d-59)) then
tmp = t_1
else if (z <= (-2.8d-150)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= 5.4d-205) then
tmp = t_1
else if (z <= 4.4d-70) then
tmp = b / (z * c)
else
tmp = t * ((-4.0d0) * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (z <= -3.4e-28) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= -1.15e-59) {
tmp = t_1;
} else if (z <= -2.8e-150) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 5.4e-205) {
tmp = t_1;
} else if (z <= 4.4e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) tmp = 0 if z <= -3.4e-28: tmp = -4.0 * ((a * t) / c) elif z <= -1.15e-59: tmp = t_1 elif z <= -2.8e-150: tmp = a * ((t * -4.0) / c) elif z <= 5.4e-205: tmp = t_1 elif z <= 4.4e-70: tmp = b / (z * c) else: tmp = t * (-4.0 * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (z <= -3.4e-28) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= -1.15e-59) tmp = t_1; elseif (z <= -2.8e-150) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= 5.4e-205) tmp = t_1; elseif (z <= 4.4e-70) tmp = Float64(b / Float64(z * c)); else tmp = Float64(t * Float64(-4.0 * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (z <= -3.4e-28)
tmp = -4.0 * ((a * t) / c);
elseif (z <= -1.15e-59)
tmp = t_1;
elseif (z <= -2.8e-150)
tmp = a * ((t * -4.0) / c);
elseif (z <= 5.4e-205)
tmp = t_1;
elseif (z <= 4.4e-70)
tmp = b / (z * c);
else
tmp = t * (-4.0 * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-28], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-59], t$95$1, If[LessEqual[z, -2.8e-150], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-205], t$95$1, If[LessEqual[z, 4.4e-70], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-28}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-150}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-70}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -3.4000000000000001e-28Initial program 63.6%
associate-+l-63.6%
*-commutative63.6%
associate-*r*66.7%
*-commutative66.7%
associate-+l-66.7%
associate-*l*66.7%
associate-*l*69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
Simplified59.1%
if -3.4000000000000001e-28 < z < -1.1499999999999999e-59 or -2.79999999999999996e-150 < z < 5.4000000000000002e-205Initial program 98.0%
associate-+l-98.0%
*-commutative98.0%
associate-*r*98.0%
*-commutative98.0%
associate-+l-98.0%
associate-*l*98.0%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around inf 74.6%
associate-/l*72.9%
*-commutative72.9%
Applied egg-rr72.9%
if -1.1499999999999999e-59 < z < -2.79999999999999996e-150Initial program 99.5%
associate-+l-99.5%
*-commutative99.5%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 39.8%
*-commutative39.8%
associate-/l*51.2%
associate-*r*51.2%
associate-*l/51.2%
Simplified51.2%
if 5.4000000000000002e-205 < z < 4.3999999999999998e-70Initial program 97.8%
associate-+l-97.8%
*-commutative97.8%
associate-*r*95.3%
*-commutative95.3%
associate-+l-95.3%
associate-*l*95.3%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in b around inf 60.0%
*-commutative60.0%
Simplified60.0%
if 4.3999999999999998e-70 < z Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
associate-*l*64.9%
associate-*l*69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t around inf 71.9%
Taylor expanded in x around 0 63.6%
associate-/r*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in a around inf 60.2%
Final simplification61.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.8e-28)
(* -4.0 (/ (* a t) c))
(if (<= z -1.2e-58)
(* 9.0 (/ (* y x) (* z c)))
(if (<= z -2.4e-150)
(* a (/ (* t -4.0) c))
(if (<= z 9e-204)
(* 9.0 (* x (/ y (* z c))))
(if (<= z 2.55e-70) (/ b (* z c)) (* t (* -4.0 (/ a c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.8e-28) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= -1.2e-58) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (z <= -2.4e-150) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 9e-204) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.55e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-2.8d-28)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= (-1.2d-58)) then
tmp = 9.0d0 * ((y * x) / (z * c))
else if (z <= (-2.4d-150)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= 9d-204) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (z <= 2.55d-70) then
tmp = b / (z * c)
else
tmp = t * ((-4.0d0) * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.8e-28) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= -1.2e-58) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (z <= -2.4e-150) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 9e-204) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (z <= 2.55e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.8e-28: tmp = -4.0 * ((a * t) / c) elif z <= -1.2e-58: tmp = 9.0 * ((y * x) / (z * c)) elif z <= -2.4e-150: tmp = a * ((t * -4.0) / c) elif z <= 9e-204: tmp = 9.0 * (x * (y / (z * c))) elif z <= 2.55e-70: tmp = b / (z * c) else: tmp = t * (-4.0 * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.8e-28) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= -1.2e-58) tmp = Float64(9.0 * Float64(Float64(y * x) / Float64(z * c))); elseif (z <= -2.4e-150) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= 9e-204) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (z <= 2.55e-70) tmp = Float64(b / Float64(z * c)); else tmp = Float64(t * Float64(-4.0 * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.8e-28)
tmp = -4.0 * ((a * t) / c);
elseif (z <= -1.2e-58)
tmp = 9.0 * ((y * x) / (z * c));
elseif (z <= -2.4e-150)
tmp = a * ((t * -4.0) / c);
elseif (z <= 9e-204)
tmp = 9.0 * (x * (y / (z * c)));
elseif (z <= 2.55e-70)
tmp = b / (z * c);
else
tmp = t * (-4.0 * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.8e-28], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-58], N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-150], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-204], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-70], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-28}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-58}:\\
\;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-150}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-204}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-70}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -2.7999999999999998e-28Initial program 63.6%
associate-+l-63.6%
*-commutative63.6%
associate-*r*66.7%
*-commutative66.7%
associate-+l-66.7%
associate-*l*66.7%
associate-*l*69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
Simplified59.1%
if -2.7999999999999998e-28 < z < -1.2e-58Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 86.0%
if -1.2e-58 < z < -2.4e-150Initial program 99.5%
associate-+l-99.5%
*-commutative99.5%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 39.8%
*-commutative39.8%
associate-/l*51.2%
associate-*r*51.2%
associate-*l/51.2%
Simplified51.2%
if -2.4e-150 < z < 8.99999999999999948e-204Initial program 97.7%
associate-+l-97.7%
*-commutative97.7%
associate-*r*97.7%
*-commutative97.7%
associate-+l-97.7%
associate-*l*97.7%
associate-*l*88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in x around inf 72.8%
associate-/l*70.8%
*-commutative70.8%
Applied egg-rr70.8%
if 8.99999999999999948e-204 < z < 2.55000000000000013e-70Initial program 97.8%
associate-+l-97.8%
*-commutative97.8%
associate-*r*95.3%
*-commutative95.3%
associate-+l-95.3%
associate-*l*95.3%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in b around inf 60.0%
*-commutative60.0%
Simplified60.0%
if 2.55000000000000013e-70 < z Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
associate-*l*64.9%
associate-*l*69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t around inf 71.9%
Taylor expanded in x around 0 63.6%
associate-/r*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in a around inf 60.2%
Final simplification61.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* x (* 9.0 y))) (* z c))))
(if (<= z -1.3e-15)
(* -4.0 (/ (* a t) c))
(if (<= z 9e-10)
t_1
(if (<= z 1.52e+56)
(* a (/ (* t -4.0) c))
(if (<= z 4.5e+116) t_1 (* t (* -4.0 (/ a c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (x * (9.0 * y))) / (z * c);
double tmp;
if (z <= -1.3e-15) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 9e-10) {
tmp = t_1;
} else if (z <= 1.52e+56) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 4.5e+116) {
tmp = t_1;
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b + (x * (9.0d0 * y))) / (z * c)
if (z <= (-1.3d-15)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= 9d-10) then
tmp = t_1
else if (z <= 1.52d+56) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= 4.5d+116) then
tmp = t_1
else
tmp = t * ((-4.0d0) * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (x * (9.0 * y))) / (z * c);
double tmp;
if (z <= -1.3e-15) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 9e-10) {
tmp = t_1;
} else if (z <= 1.52e+56) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 4.5e+116) {
tmp = t_1;
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (x * (9.0 * y))) / (z * c) tmp = 0 if z <= -1.3e-15: tmp = -4.0 * ((a * t) / c) elif z <= 9e-10: tmp = t_1 elif z <= 1.52e+56: tmp = a * ((t * -4.0) / c) elif z <= 4.5e+116: tmp = t_1 else: tmp = t * (-4.0 * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)) tmp = 0.0 if (z <= -1.3e-15) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= 9e-10) tmp = t_1; elseif (z <= 1.52e+56) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= 4.5e+116) tmp = t_1; else tmp = Float64(t * Float64(-4.0 * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (x * (9.0 * y))) / (z * c);
tmp = 0.0;
if (z <= -1.3e-15)
tmp = -4.0 * ((a * t) / c);
elseif (z <= 9e-10)
tmp = t_1;
elseif (z <= 1.52e+56)
tmp = a * ((t * -4.0) / c);
elseif (z <= 4.5e+116)
tmp = t_1;
else
tmp = t * (-4.0 * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e-15], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-10], t$95$1, If[LessEqual[z, 1.52e+56], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+116], t$95$1, N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-15}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -1.30000000000000002e-15Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*65.6%
*-commutative65.6%
associate-+l-65.6%
associate-*l*65.6%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 59.4%
*-commutative59.4%
Simplified59.4%
if -1.30000000000000002e-15 < z < 8.9999999999999999e-10 or 1.52e56 < z < 4.50000000000000016e116Initial program 95.6%
associate-+l-95.6%
*-commutative95.6%
associate-*r*95.9%
*-commutative95.9%
associate-+l-95.9%
associate-*l*95.9%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 77.7%
associate-*r*77.7%
*-commutative77.7%
associate-*r*77.7%
Simplified77.7%
if 8.9999999999999999e-10 < z < 1.52e56Initial program 92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*85.6%
*-commutative85.6%
associate-+l-85.6%
associate-*l*85.6%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in z around inf 65.1%
*-commutative65.1%
associate-/l*72.2%
associate-*r*72.2%
associate-*l/72.2%
Simplified72.2%
if 4.50000000000000016e116 < z Initial program 42.3%
associate-+l-42.3%
*-commutative42.3%
associate-*r*45.8%
*-commutative45.8%
associate-+l-45.8%
associate-*l*45.9%
associate-*l*51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in t around inf 73.4%
Taylor expanded in x around 0 69.9%
associate-/r*71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in a around inf 67.9%
Final simplification71.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (- (* (* 9.0 (/ y z)) x) (* 4.0 (* a t))) c)))
(if (<= z -6e-60)
t_1
(if (<= z -4.35e-134)
(/ (- b (* 4.0 (* a (* z t)))) (* z c))
(if (<= z 7e-60) (/ (+ b (* x (* 9.0 y))) (* z c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -6e-60) {
tmp = t_1;
} else if (z <= -4.35e-134) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 7e-60) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (((9.0d0 * (y / z)) * x) - (4.0d0 * (a * t))) / c
if (z <= (-6d-60)) then
tmp = t_1
else if (z <= (-4.35d-134)) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (z * c)
else if (z <= 7d-60) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
double tmp;
if (z <= -6e-60) {
tmp = t_1;
} else if (z <= -4.35e-134) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (z <= 7e-60) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c tmp = 0 if z <= -6e-60: tmp = t_1 elif z <= -4.35e-134: tmp = (b - (4.0 * (a * (z * t)))) / (z * c) elif z <= 7e-60: tmp = (b + (x * (9.0 * y))) / (z * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(9.0 * Float64(y / z)) * x) - Float64(4.0 * Float64(a * t))) / c) tmp = 0.0 if (z <= -6e-60) tmp = t_1; elseif (z <= -4.35e-134) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif (z <= 7e-60) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
tmp = 0.0;
if (z <= -6e-60)
tmp = t_1;
elseif (z <= -4.35e-134)
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
elseif (z <= 7e-60)
tmp = (b + (x * (9.0 * y))) / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -6e-60], t$95$1, If[LessEqual[z, -4.35e-134], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-60], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(9 \cdot \frac{y}{z}\right) \cdot x - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{if}\;z \leq -6 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.35 \cdot 10^{-134}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-60}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.00000000000000038e-60 or 6.99999999999999952e-60 < z Initial program 63.5%
associate-+l-63.5%
*-commutative63.5%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
associate-*l*66.6%
associate-*l*70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in z around inf 70.4%
Taylor expanded in b around 0 74.8%
associate-*r/74.7%
Applied egg-rr74.7%
associate-/l*74.8%
associate-*r/79.6%
*-commutative79.6%
associate-*r*79.6%
Simplified79.6%
if -6.00000000000000038e-60 < z < -4.3500000000000001e-134Initial program 99.4%
associate-+l-99.4%
*-commutative99.4%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
associate-*l*95.1%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 92.7%
if -4.3500000000000001e-134 < z < 6.99999999999999952e-60Initial program 97.9%
associate-+l-97.9%
*-commutative97.9%
associate-*r*96.8%
*-commutative96.8%
associate-+l-96.8%
associate-*l*96.8%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in x around inf 83.5%
associate-*r*83.5%
*-commutative83.5%
associate-*r*83.5%
Simplified83.5%
Final simplification81.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.5e+83) (not (<= z 7.2e+116))) (/ (- (* (* 9.0 (/ y z)) x) (* 4.0 (* a t))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+83) || !(z <= 7.2e+116)) {
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.5d+83)) .or. (.not. (z <= 7.2d+116))) then
tmp = (((9.0d0 * (y / z)) * x) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+83) || !(z <= 7.2e+116)) {
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.5e+83) or not (z <= 7.2e+116): tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.5e+83) || !(z <= 7.2e+116)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / z)) * x) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.5e+83) || ~((z <= 7.2e+116)))
tmp = (((9.0 * (y / z)) * x) - (4.0 * (a * t))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.5e+83], N[Not[LessEqual[z, 7.2e+116]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+83} \lor \neg \left(z \leq 7.2 \cdot 10^{+116}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{y}{z}\right) \cdot x - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.49999999999999977e83 or 7.19999999999999941e116 < z Initial program 46.9%
associate-+l-46.9%
*-commutative46.9%
associate-*r*49.8%
*-commutative49.8%
associate-+l-49.8%
associate-*l*49.9%
associate-*l*55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in z around inf 55.1%
Taylor expanded in b around 0 74.9%
associate-*r/74.9%
Applied egg-rr74.9%
associate-/l*74.9%
associate-*r/83.0%
*-commutative83.0%
associate-*r*82.9%
Simplified82.9%
if -3.49999999999999977e83 < z < 7.19999999999999941e116Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*94.7%
*-commutative94.7%
associate-+l-94.7%
associate-*l*94.7%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Final simplification88.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= a -7e-79)
(not (or (<= a 1.95e-50) (and (not (<= a 4.6e-25)) (<= a 4100.0)))))
(* a (/ (* t -4.0) c))
(/ (/ b c) z)))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -7e-79) || !((a <= 1.95e-50) || (!(a <= 4.6e-25) && (a <= 4100.0)))) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((a <= (-7d-79)) .or. (.not. (a <= 1.95d-50) .or. (.not. (a <= 4.6d-25)) .and. (a <= 4100.0d0))) then
tmp = a * ((t * (-4.0d0)) / c)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -7e-79) || !((a <= 1.95e-50) || (!(a <= 4.6e-25) && (a <= 4100.0)))) {
tmp = a * ((t * -4.0) / c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -7e-79) or not ((a <= 1.95e-50) or (not (a <= 4.6e-25) and (a <= 4100.0))): tmp = a * ((t * -4.0) / c) else: tmp = (b / c) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -7e-79) || !((a <= 1.95e-50) || (!(a <= 4.6e-25) && (a <= 4100.0)))) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -7e-79) || ~(((a <= 1.95e-50) || (~((a <= 4.6e-25)) && (a <= 4100.0)))))
tmp = a * ((t * -4.0) / c);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -7e-79], N[Not[Or[LessEqual[a, 1.95e-50], And[N[Not[LessEqual[a, 4.6e-25]], $MachinePrecision], LessEqual[a, 4100.0]]]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-79} \lor \neg \left(a \leq 1.95 \cdot 10^{-50} \lor \neg \left(a \leq 4.6 \cdot 10^{-25}\right) \land a \leq 4100\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if a < -7.00000000000000059e-79 or 1.9500000000000001e-50 < a < 4.5999999999999998e-25 or 4100 < a Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*72.3%
*-commutative72.3%
associate-+l-72.3%
associate-*l*72.3%
associate-*l*71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in z around inf 50.1%
*-commutative50.1%
associate-/l*53.3%
associate-*r*53.3%
associate-*l/53.3%
Simplified53.3%
if -7.00000000000000059e-79 < a < 1.9500000000000001e-50 or 4.5999999999999998e-25 < a < 4100Initial program 79.2%
associate-+l-79.2%
*-commutative79.2%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in b around inf 37.6%
associate-/r*42.8%
Simplified42.8%
Final simplification49.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)) (t_2 (* t (* -4.0 (/ a c)))))
(if (<= a -7.8e-79)
t_2
(if (<= a 9.2e-51)
t_1
(if (<= a 1.85e-25)
(* a (/ (* t -4.0) c))
(if (<= a 14800.0) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = t * (-4.0 * (a / c));
double tmp;
if (a <= -7.8e-79) {
tmp = t_2;
} else if (a <= 9.2e-51) {
tmp = t_1;
} else if (a <= 1.85e-25) {
tmp = a * ((t * -4.0) / c);
} else if (a <= 14800.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b / c) / z
t_2 = t * ((-4.0d0) * (a / c))
if (a <= (-7.8d-79)) then
tmp = t_2
else if (a <= 9.2d-51) then
tmp = t_1
else if (a <= 1.85d-25) then
tmp = a * ((t * (-4.0d0)) / c)
else if (a <= 14800.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = t * (-4.0 * (a / c));
double tmp;
if (a <= -7.8e-79) {
tmp = t_2;
} else if (a <= 9.2e-51) {
tmp = t_1;
} else if (a <= 1.85e-25) {
tmp = a * ((t * -4.0) / c);
} else if (a <= 14800.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z t_2 = t * (-4.0 * (a / c)) tmp = 0 if a <= -7.8e-79: tmp = t_2 elif a <= 9.2e-51: tmp = t_1 elif a <= 1.85e-25: tmp = a * ((t * -4.0) / c) elif a <= 14800.0: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) t_2 = Float64(t * Float64(-4.0 * Float64(a / c))) tmp = 0.0 if (a <= -7.8e-79) tmp = t_2; elseif (a <= 9.2e-51) tmp = t_1; elseif (a <= 1.85e-25) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (a <= 14800.0) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
t_2 = t * (-4.0 * (a / c));
tmp = 0.0;
if (a <= -7.8e-79)
tmp = t_2;
elseif (a <= 9.2e-51)
tmp = t_1;
elseif (a <= 1.85e-25)
tmp = a * ((t * -4.0) / c);
elseif (a <= 14800.0)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e-79], t$95$2, If[LessEqual[a, 9.2e-51], t$95$1, If[LessEqual[a, 1.85e-25], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 14800.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
t_2 := t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\mathbf{if}\;a \leq -7.8 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;a \leq 14800:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -7.80000000000000011e-79 or 14800 < a Initial program 75.1%
associate-+l-75.1%
*-commutative75.1%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
associate-*l*71.4%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in t around inf 67.6%
Taylor expanded in x around 0 62.4%
associate-/r*59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in a around inf 53.9%
if -7.80000000000000011e-79 < a < 9.20000000000000007e-51 or 1.85000000000000004e-25 < a < 14800Initial program 79.2%
associate-+l-79.2%
*-commutative79.2%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in b around inf 37.6%
associate-/r*42.8%
Simplified42.8%
if 9.20000000000000007e-51 < a < 1.85000000000000004e-25Initial program 93.0%
associate-+l-93.0%
*-commutative93.0%
associate-*r*92.7%
*-commutative92.7%
associate-+l-92.7%
associate-*l*92.7%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in z around inf 71.2%
*-commutative71.2%
associate-/l*71.2%
associate-*r*71.5%
associate-*l/71.5%
Simplified71.5%
Final simplification50.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -1.6e-47)
(/ (* t (+ (* a -4.0) (/ b (* z t)))) c)
(if (<= b 2.25e-7)
(/ (- (* 9.0 (/ (* y x) z)) (* 4.0 (* a t))) c)
(/ (+ (* y (* 9.0 x)) b) (* z c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.6e-47) {
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
} else if (b <= 2.25e-7) {
tmp = ((9.0 * ((y * x) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-1.6d-47)) then
tmp = (t * ((a * (-4.0d0)) + (b / (z * t)))) / c
else if (b <= 2.25d-7) then
tmp = ((9.0d0 * ((y * x) / z)) - (4.0d0 * (a * t))) / c
else
tmp = ((y * (9.0d0 * x)) + b) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.6e-47) {
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
} else if (b <= 2.25e-7) {
tmp = ((9.0 * ((y * x) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = ((y * (9.0 * x)) + b) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -1.6e-47: tmp = (t * ((a * -4.0) + (b / (z * t)))) / c elif b <= 2.25e-7: tmp = ((9.0 * ((y * x) / z)) - (4.0 * (a * t))) / c else: tmp = ((y * (9.0 * x)) + b) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -1.6e-47) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(b / Float64(z * t)))) / c); elseif (b <= 2.25e-7) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y * x) / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(Float64(y * Float64(9.0 * x)) + b) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -1.6e-47)
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
elseif (b <= 2.25e-7)
tmp = ((9.0 * ((y * x) / z)) - (4.0 * (a * t))) / c;
else
tmp = ((y * (9.0 * x)) + b) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.6e-47], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 2.25e-7], N[(N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4 + \frac{b}{z \cdot t}\right)}{c}\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{-7}:\\
\;\;\;\;\frac{9 \cdot \frac{y \cdot x}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right) + b}{z \cdot c}\\
\end{array}
\end{array}
if b < -1.6e-47Initial program 73.2%
associate-+l-73.2%
*-commutative73.2%
associate-*r*74.5%
*-commutative74.5%
associate-+l-74.5%
associate-*l*74.5%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t around inf 77.8%
Taylor expanded in x around 0 73.0%
associate-/r*68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in c around 0 73.1%
if -1.6e-47 < b < 2.2499999999999999e-7Initial program 74.5%
associate-+l-74.5%
*-commutative74.5%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
associate-*l*74.8%
associate-*l*74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in z around inf 72.1%
Taylor expanded in b around 0 80.3%
if 2.2499999999999999e-7 < b Initial program 85.5%
associate-+l-85.5%
*-commutative85.5%
associate-*r*88.4%
*-commutative88.4%
associate-+l-88.4%
associate-*l*88.4%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in x around inf 77.2%
associate-*r*77.2%
Simplified77.2%
Final simplification77.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.02e+75)
(/ (+ b (* x (* 9.0 y))) (* z c))
(if (<= x 8.6e+101)
(/ (* t (+ (* a -4.0) (/ b (* z t)))) c)
(* 9.0 (* y (/ (/ x c) z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.02e+75) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (x <= 8.6e+101) {
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
} else {
tmp = 9.0 * (y * ((x / c) / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (x <= (-1.02d+75)) then
tmp = (b + (x * (9.0d0 * y))) / (z * c)
else if (x <= 8.6d+101) then
tmp = (t * ((a * (-4.0d0)) + (b / (z * t)))) / c
else
tmp = 9.0d0 * (y * ((x / c) / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.02e+75) {
tmp = (b + (x * (9.0 * y))) / (z * c);
} else if (x <= 8.6e+101) {
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
} else {
tmp = 9.0 * (y * ((x / c) / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.02e+75: tmp = (b + (x * (9.0 * y))) / (z * c) elif x <= 8.6e+101: tmp = (t * ((a * -4.0) + (b / (z * t)))) / c else: tmp = 9.0 * (y * ((x / c) / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.02e+75) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c)); elseif (x <= 8.6e+101) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) + Float64(b / Float64(z * t)))) / c); else tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c) / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.02e+75)
tmp = (b + (x * (9.0 * y))) / (z * c);
elseif (x <= 8.6e+101)
tmp = (t * ((a * -4.0) + (b / (z * t)))) / c;
else
tmp = 9.0 * (y * ((x / c) / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.02e+75], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.6e+101], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(b / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(y * N[(N[(x / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+75}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{+101}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4 + \frac{b}{z \cdot t}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c}}{z}\right)\\
\end{array}
\end{array}
if x < -1.0200000000000001e75Initial program 67.3%
associate-+l-67.3%
*-commutative67.3%
associate-*r*71.5%
*-commutative71.5%
associate-+l-71.5%
associate-*l*71.5%
associate-*l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around inf 56.9%
associate-*r*56.9%
*-commutative56.9%
associate-*r*57.0%
Simplified57.0%
if -1.0200000000000001e75 < x < 8.6000000000000002e101Initial program 80.9%
associate-+l-80.9%
*-commutative80.9%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*81.1%
associate-*l*83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in t around inf 74.1%
Taylor expanded in x around 0 65.6%
associate-/r*62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in c around 0 67.1%
if 8.6000000000000002e101 < x Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
associate-*l*74.6%
associate-*l*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in z around inf 66.0%
Taylor expanded in x around inf 48.0%
times-frac47.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in y around 0 48.0%
*-commutative48.0%
associate-*r/48.5%
associate-/r*47.8%
Simplified47.8%
Final simplification61.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -4e-21) (* -4.0 (/ (* a t) c)) (if (<= z 1.22e-70) (/ b (* z c)) (* t (* -4.0 (/ a c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4e-21) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 1.22e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-4d-21)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= 1.22d-70) then
tmp = b / (z * c)
else
tmp = t * ((-4.0d0) * (a / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4e-21) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 1.22e-70) {
tmp = b / (z * c);
} else {
tmp = t * (-4.0 * (a / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -4e-21: tmp = -4.0 * ((a * t) / c) elif z <= 1.22e-70: tmp = b / (z * c) else: tmp = t * (-4.0 * (a / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -4e-21) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= 1.22e-70) tmp = Float64(b / Float64(z * c)); else tmp = Float64(t * Float64(-4.0 * Float64(a / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -4e-21)
tmp = -4.0 * ((a * t) / c);
elseif (z <= 1.22e-70)
tmp = b / (z * c);
else
tmp = t * (-4.0 * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4e-21], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e-70], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-21}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-70}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -3.99999999999999963e-21Initial program 62.4%
associate-+l-62.4%
*-commutative62.4%
associate-*r*65.6%
*-commutative65.6%
associate-+l-65.6%
associate-*l*65.6%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around inf 59.4%
*-commutative59.4%
Simplified59.4%
if -3.99999999999999963e-21 < z < 1.22e-70Initial program 98.2%
associate-+l-98.2%
*-commutative98.2%
associate-*r*96.8%
*-commutative96.8%
associate-+l-96.8%
associate-*l*96.8%
associate-*l*90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in b around inf 44.2%
*-commutative44.2%
Simplified44.2%
if 1.22e-70 < z Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
associate-*l*64.9%
associate-*l*69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t around inf 71.9%
Taylor expanded in x around 0 63.6%
associate-/r*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in a around inf 60.2%
Final simplification53.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*78.3%
*-commutative78.3%
associate-+l-78.3%
associate-*l*78.3%
associate-*l*78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in b around inf 29.6%
*-commutative29.6%
Simplified29.6%
Final simplification29.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (b / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*78.3%
*-commutative78.3%
associate-+l-78.3%
associate-*l*78.3%
associate-*l*78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in b around inf 29.6%
associate-/r*30.6%
Simplified30.6%
Final simplification30.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024115
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))