
(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 21 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 -7e-142) (not (<= z 7.5e+114))) (/ (* y (- (+ (* 9.0 (/ x z)) (/ b (* z y))) (* 4.0 (/ (* a t) y)))) c) (/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* 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 <= -7e-142) || !(z <= 7.5e+114)) {
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= (-7d-142)) .or. (.not. (z <= 7.5d+114))) then
tmp = (y * (((9.0d0 * (x / z)) + (b / (z * y))) - (4.0d0 * ((a * t) / y)))) / c
else
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (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 <= -7e-142) || !(z <= 7.5e+114)) {
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= -7e-142) or not (z <= 7.5e+114): tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / c else: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= -7e-142) || !(z <= 7.5e+114)) tmp = Float64(Float64(y * Float64(Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y))) - Float64(4.0 * Float64(Float64(a * t) / y)))) / c); else tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / 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 <= -7e-142) || ~((z <= 7.5e+114)))
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / c;
else
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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, -7e-142], N[Not[LessEqual[z, 7.5e+114]], $MachinePrecision]], N[(N[(y * N[(N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $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 -7 \cdot 10^{-142} \lor \neg \left(z \leq 7.5 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{y \cdot \left(\left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right) - 4 \cdot \frac{a \cdot t}{y}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.00000000000000029e-142 or 7.5000000000000001e114 < z Initial program 65.3%
associate-+l-65.3%
*-commutative65.3%
associate-*r*66.0%
*-commutative66.0%
associate-+l-66.0%
associate-*l*66.0%
associate-*l*71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in y around inf 68.7%
Taylor expanded in c around 0 86.7%
if -7.00000000000000029e-142 < z < 7.5000000000000001e114Initial program 96.3%
Final simplification91.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 (* y (* 9.0 x))))
(if (<= (/ (- b (- (* a (* t (* z 4.0))) t_1)) (* z c)) INFINITY)
(/ (+ b (- t_1 (* (* z 4.0) (* a t)))) (* z c))
(* -4.0 (/ (* a t) 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 = y * (9.0 * x);
double tmp;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= ((double) INFINITY)) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
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 = y * (9.0 * x);
double tmp;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= Double.POSITIVE_INFINITY) {
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / 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 = y * (9.0 * x) tmp = 0 if ((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= math.inf: tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = -4.0 * ((a * t) / 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(y * Float64(9.0 * x)) tmp = 0.0 if (Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - t_1)) / Float64(z * c)) <= Inf) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * t) / 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 = y * (9.0 * x);
tmp = 0.0;
if (((b - ((a * (t * (z * 4.0))) - t_1)) / (z * c)) <= Inf)
tmp = (b + (t_1 - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = -4.0 * ((a * t) / 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[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - t\_1\right)}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{b + \left(t\_1 - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.6%
associate-+l-87.6%
*-commutative87.6%
associate-*r*86.5%
*-commutative86.5%
associate-+l-86.5%
associate-*l*86.5%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 89.2%
*-commutative89.2%
associate-*r*89.2%
*-commutative89.2%
associate-*r*89.2%
Simplified89.2%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*10.7%
*-commutative10.7%
associate-+l-10.7%
Simplified11.1%
Taylor expanded in t around inf 56.5%
Final simplification86.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
(let* ((t_1 (* 9.0 (* y x))))
(if (<= t -3.1e-23)
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))
(if (or (<= t -1.35e-84) (not (<= t 1.45e-178)))
(/ (- t_1 (* 4.0 (* a (* z t)))) (* z c))
(/ (+ b t_1) (* 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 t_1 = 9.0 * (y * x);
double tmp;
if (t <= -3.1e-23) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if ((t <= -1.35e-84) || !(t <= 1.45e-178)) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (b + t_1) / (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) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (y * x)
if (t <= (-3.1d-23)) then
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
else if ((t <= (-1.35d-84)) .or. (.not. (t <= 1.45d-178))) then
tmp = (t_1 - (4.0d0 * (a * (z * t)))) / (z * c)
else
tmp = (b + t_1) / (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 t_1 = 9.0 * (y * x);
double tmp;
if (t <= -3.1e-23) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if ((t <= -1.35e-84) || !(t <= 1.45e-178)) {
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (b + t_1) / (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): t_1 = 9.0 * (y * x) tmp = 0 if t <= -3.1e-23: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) elif (t <= -1.35e-84) or not (t <= 1.45e-178): tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c) else: tmp = (b + t_1) / (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) t_1 = Float64(9.0 * Float64(y * x)) tmp = 0.0 if (t <= -3.1e-23) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); elseif ((t <= -1.35e-84) || !(t <= 1.45e-178)) tmp = Float64(Float64(t_1 - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); else tmp = Float64(Float64(b + t_1) / 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)
t_1 = 9.0 * (y * x);
tmp = 0.0;
if (t <= -3.1e-23)
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
elseif ((t <= -1.35e-84) || ~((t <= 1.45e-178)))
tmp = (t_1 - (4.0 * (a * (z * t)))) / (z * c);
else
tmp = (b + t_1) / (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_] := Block[{t$95$1 = N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e-23], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.35e-84], N[Not[LessEqual[t, 1.45e-178]], $MachinePrecision]], N[(N[(t$95$1 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b + t$95$1), $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}
t_1 := 9 \cdot \left(y \cdot x\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{-23}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-84} \lor \neg \left(t \leq 1.45 \cdot 10^{-178}\right):\\
\;\;\;\;\frac{t\_1 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + t\_1}{z \cdot c}\\
\end{array}
\end{array}
if t < -3.0999999999999999e-23Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
associate-*l*78.0%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 58.1%
Taylor expanded in t around inf 71.2%
if -3.0999999999999999e-23 < t < -1.35e-84 or 1.4499999999999999e-178 < t Initial program 81.7%
associate-+l-81.7%
*-commutative81.7%
associate-*r*80.4%
*-commutative80.4%
associate-+l-80.4%
associate-*l*80.4%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in b around 0 66.0%
if -1.35e-84 < t < 1.4499999999999999e-178Initial program 85.5%
associate-+l-85.5%
*-commutative85.5%
associate-*r*80.7%
*-commutative80.7%
associate-+l-80.7%
Simplified80.8%
Taylor expanded in t around 0 76.2%
+-commutative76.2%
*-commutative76.2%
Simplified76.2%
Final simplification69.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 (<= y -5.6e-17)
(* x (* 9.0 (/ (/ y c) z)))
(if (<= y -8e-162)
(/ (* t (* a -4.0)) c)
(if (<= y 1.8e-292)
(/ (/ b z) c)
(if (<= y 6.5e+131)
(* -4.0 (* a (/ t c)))
(* (/ (* 9.0 x) z) (/ y 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 (y <= -5.6e-17) {
tmp = x * (9.0 * ((y / c) / z));
} else if (y <= -8e-162) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 1.8e-292) {
tmp = (b / z) / c;
} else if (y <= 6.5e+131) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = ((9.0 * x) / z) * (y / 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 (y <= (-5.6d-17)) then
tmp = x * (9.0d0 * ((y / c) / z))
else if (y <= (-8d-162)) then
tmp = (t * (a * (-4.0d0))) / c
else if (y <= 1.8d-292) then
tmp = (b / z) / c
else if (y <= 6.5d+131) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = ((9.0d0 * x) / z) * (y / 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 (y <= -5.6e-17) {
tmp = x * (9.0 * ((y / c) / z));
} else if (y <= -8e-162) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 1.8e-292) {
tmp = (b / z) / c;
} else if (y <= 6.5e+131) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = ((9.0 * x) / z) * (y / 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 y <= -5.6e-17: tmp = x * (9.0 * ((y / c) / z)) elif y <= -8e-162: tmp = (t * (a * -4.0)) / c elif y <= 1.8e-292: tmp = (b / z) / c elif y <= 6.5e+131: tmp = -4.0 * (a * (t / c)) else: tmp = ((9.0 * x) / z) * (y / 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 (y <= -5.6e-17) tmp = Float64(x * Float64(9.0 * Float64(Float64(y / c) / z))); elseif (y <= -8e-162) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (y <= 1.8e-292) tmp = Float64(Float64(b / z) / c); elseif (y <= 6.5e+131) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(Float64(9.0 * x) / z) * Float64(y / 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 (y <= -5.6e-17)
tmp = x * (9.0 * ((y / c) / z));
elseif (y <= -8e-162)
tmp = (t * (a * -4.0)) / c;
elseif (y <= 1.8e-292)
tmp = (b / z) / c;
elseif (y <= 6.5e+131)
tmp = -4.0 * (a * (t / c));
else
tmp = ((9.0 * x) / z) * (y / 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[y, -5.6e-17], N[(x * N[(9.0 * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e-162], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 1.8e-292], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 6.5e+131], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * x), $MachinePrecision] / z), $MachinePrecision] * N[(y / 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}\;y \leq -5.6 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(9 \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-162}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-292}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+131}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot x}{z} \cdot \frac{y}{c}\\
\end{array}
\end{array}
if y < -5.5999999999999998e-17Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
Simplified81.2%
Taylor expanded in y around inf 84.2%
Taylor expanded in b around 0 65.5%
Taylor expanded in y around inf 46.8%
associate-*r/47.0%
*-commutative47.0%
associate-*r*46.9%
*-commutative46.9%
associate-/r*52.0%
Simplified52.0%
if -5.5999999999999998e-17 < y < -7.99999999999999963e-162Initial program 71.5%
associate-+l-71.5%
*-commutative71.5%
associate-*r*77.4%
*-commutative77.4%
associate-+l-77.4%
associate-*l*77.4%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in x around 0 79.1%
*-commutative79.1%
associate-*r*79.0%
*-commutative79.0%
associate-*r*79.0%
Simplified79.0%
Taylor expanded in z around inf 58.2%
associate-*r/58.3%
associate-*r*58.3%
Simplified58.3%
if -7.99999999999999963e-162 < y < 1.8000000000000001e-292Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*89.9%
*-commutative89.9%
associate-+l-89.9%
Simplified89.9%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
*-un-lft-identity56.9%
associate-/r*56.9%
Applied egg-rr56.9%
*-un-lft-identity56.9%
Applied egg-rr56.9%
if 1.8000000000000001e-292 < y < 6.5e131Initial program 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
Simplified78.1%
Taylor expanded in t around inf 44.5%
associate-/l*44.5%
Simplified44.5%
if 6.5e131 < y Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*75.1%
*-commutative75.1%
associate-+l-75.1%
Simplified75.2%
Taylor expanded in x around inf 52.8%
*-commutative52.8%
associate-/l*59.5%
associate-*l*59.5%
*-commutative59.5%
associate-*r/59.5%
*-commutative59.5%
associate-/l*59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in x around 0 52.8%
associate-*r/52.7%
associate-*r*52.8%
*-commutative52.8%
times-frac72.5%
Simplified72.5%
Final simplification54.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 (* x (* 9.0 (/ (/ y c) z)))))
(if (<= y -1.2e-18)
t_1
(if (<= y -2e-161)
(/ (* t (* a -4.0)) c)
(if (<= y 1.85e-292)
(/ (/ b z) c)
(if (<= y 1.85e+133) (* -4.0 (* a (/ t 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 = x * (9.0 * ((y / c) / z));
double tmp;
if (y <= -1.2e-18) {
tmp = t_1;
} else if (y <= -2e-161) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 1.85e-292) {
tmp = (b / z) / c;
} else if (y <= 1.85e+133) {
tmp = -4.0 * (a * (t / 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 = x * (9.0d0 * ((y / c) / z))
if (y <= (-1.2d-18)) then
tmp = t_1
else if (y <= (-2d-161)) then
tmp = (t * (a * (-4.0d0))) / c
else if (y <= 1.85d-292) then
tmp = (b / z) / c
else if (y <= 1.85d+133) then
tmp = (-4.0d0) * (a * (t / 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 = x * (9.0 * ((y / c) / z));
double tmp;
if (y <= -1.2e-18) {
tmp = t_1;
} else if (y <= -2e-161) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 1.85e-292) {
tmp = (b / z) / c;
} else if (y <= 1.85e+133) {
tmp = -4.0 * (a * (t / 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 = x * (9.0 * ((y / c) / z)) tmp = 0 if y <= -1.2e-18: tmp = t_1 elif y <= -2e-161: tmp = (t * (a * -4.0)) / c elif y <= 1.85e-292: tmp = (b / z) / c elif y <= 1.85e+133: tmp = -4.0 * (a * (t / 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(x * Float64(9.0 * Float64(Float64(y / c) / z))) tmp = 0.0 if (y <= -1.2e-18) tmp = t_1; elseif (y <= -2e-161) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (y <= 1.85e-292) tmp = Float64(Float64(b / z) / c); elseif (y <= 1.85e+133) tmp = Float64(-4.0 * Float64(a * Float64(t / 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 = x * (9.0 * ((y / c) / z));
tmp = 0.0;
if (y <= -1.2e-18)
tmp = t_1;
elseif (y <= -2e-161)
tmp = (t * (a * -4.0)) / c;
elseif (y <= 1.85e-292)
tmp = (b / z) / c;
elseif (y <= 1.85e+133)
tmp = -4.0 * (a * (t / 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[(x * N[(9.0 * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e-18], t$95$1, If[LessEqual[y, -2e-161], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 1.85e-292], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 1.85e+133], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $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 := x \cdot \left(9 \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-161}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-292}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+133}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.19999999999999997e-18 or 1.85000000000000012e133 < y Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*78.7%
*-commutative78.7%
associate-+l-78.7%
Simplified78.7%
Taylor expanded in y around inf 81.4%
Taylor expanded in b around 0 67.6%
Taylor expanded in y around inf 49.2%
associate-*r/52.1%
*-commutative52.1%
associate-*r*52.1%
*-commutative52.1%
associate-/r*59.8%
Simplified59.8%
if -1.19999999999999997e-18 < y < -2.00000000000000006e-161Initial program 74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*76.6%
*-commutative76.6%
associate-+l-76.6%
associate-*l*76.6%
associate-*l*78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in x around 0 78.3%
*-commutative78.3%
associate-*r*78.3%
*-commutative78.3%
associate-*r*78.3%
Simplified78.3%
Taylor expanded in z around inf 56.6%
associate-*r/56.7%
associate-*r*56.7%
Simplified56.7%
if -2.00000000000000006e-161 < y < 1.84999999999999998e-292Initial program 80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*90.1%
*-commutative90.1%
associate-+l-90.1%
Simplified90.1%
Taylor expanded in b around inf 55.6%
*-commutative55.6%
Simplified55.6%
*-un-lft-identity55.6%
associate-/r*55.6%
Applied egg-rr55.6%
*-un-lft-identity55.6%
Applied egg-rr55.6%
if 1.84999999999999998e-292 < y < 1.85000000000000012e133Initial program 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
Simplified78.1%
Taylor expanded in t around inf 44.5%
associate-/l*44.5%
Simplified44.5%
Final simplification53.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
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))))
(if (<= y -1.5e-29)
t_1
(if (<= y -3.4e-161)
(/ (* t (* a -4.0)) c)
(if (<= y 2.3e-292)
(/ (/ b z) c)
(if (<= y 4e+132) (* -4.0 (* a (/ t 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 * (x * (y / (z * c)));
double tmp;
if (y <= -1.5e-29) {
tmp = t_1;
} else if (y <= -3.4e-161) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 2.3e-292) {
tmp = (b / z) / c;
} else if (y <= 4e+132) {
tmp = -4.0 * (a * (t / 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 * (x * (y / (z * c)))
if (y <= (-1.5d-29)) then
tmp = t_1
else if (y <= (-3.4d-161)) then
tmp = (t * (a * (-4.0d0))) / c
else if (y <= 2.3d-292) then
tmp = (b / z) / c
else if (y <= 4d+132) then
tmp = (-4.0d0) * (a * (t / 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 * (x * (y / (z * c)));
double tmp;
if (y <= -1.5e-29) {
tmp = t_1;
} else if (y <= -3.4e-161) {
tmp = (t * (a * -4.0)) / c;
} else if (y <= 2.3e-292) {
tmp = (b / z) / c;
} else if (y <= 4e+132) {
tmp = -4.0 * (a * (t / 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 * (x * (y / (z * c))) tmp = 0 if y <= -1.5e-29: tmp = t_1 elif y <= -3.4e-161: tmp = (t * (a * -4.0)) / c elif y <= 2.3e-292: tmp = (b / z) / c elif y <= 4e+132: tmp = -4.0 * (a * (t / 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(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (y <= -1.5e-29) tmp = t_1; elseif (y <= -3.4e-161) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (y <= 2.3e-292) tmp = Float64(Float64(b / z) / c); elseif (y <= 4e+132) tmp = Float64(-4.0 * Float64(a * Float64(t / 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 * (x * (y / (z * c)));
tmp = 0.0;
if (y <= -1.5e-29)
tmp = t_1;
elseif (y <= -3.4e-161)
tmp = (t * (a * -4.0)) / c;
elseif (y <= 2.3e-292)
tmp = (b / z) / c;
elseif (y <= 4e+132)
tmp = -4.0 * (a * (t / 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[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e-29], t$95$1, If[LessEqual[y, -3.4e-161], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 2.3e-292], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 4e+132], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $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 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-161}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-292}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+132}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5000000000000001e-29 or 3.99999999999999996e132 < y Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*78.2%
*-commutative78.2%
associate-+l-78.2%
Simplified78.3%
Taylor expanded in x around inf 48.4%
associate-/l*51.2%
*-commutative51.2%
Simplified51.2%
if -1.5000000000000001e-29 < y < -3.39999999999999982e-161Initial program 76.4%
associate-+l-76.4%
*-commutative76.4%
associate-*r*78.6%
*-commutative78.6%
associate-+l-78.6%
associate-*l*78.6%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 80.5%
*-commutative80.5%
associate-*r*80.4%
*-commutative80.4%
associate-*r*80.4%
Simplified80.4%
Taylor expanded in z around inf 56.9%
associate-*r/57.0%
associate-*r*57.0%
Simplified57.0%
if -3.39999999999999982e-161 < y < 2.2999999999999999e-292Initial program 80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*90.1%
*-commutative90.1%
associate-+l-90.1%
Simplified90.1%
Taylor expanded in b around inf 55.6%
*-commutative55.6%
Simplified55.6%
*-un-lft-identity55.6%
associate-/r*55.6%
Applied egg-rr55.6%
*-un-lft-identity55.6%
Applied egg-rr55.6%
if 2.2999999999999999e-292 < y < 3.99999999999999996e132Initial program 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*78.1%
*-commutative78.1%
associate-+l-78.1%
Simplified78.1%
Taylor expanded in t around inf 44.5%
associate-/l*44.5%
Simplified44.5%
Final simplification50.1%
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 (<= c 5.5e-17) (/ (+ b (- (* y (* 9.0 x)) (* (* z 4.0) (* a t)))) (* z c)) (+ (/ (* t (* a -4.0)) c) (* y (/ (- (/ (/ b c) y) (/ (* x -9.0) 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 (c <= 5.5e-17) {
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) / c) + (y * ((((b / c) / y) - ((x * -9.0) / 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 (c <= 5.5d-17) then
tmp = (b + ((y * (9.0d0 * x)) - ((z * 4.0d0) * (a * t)))) / (z * c)
else
tmp = ((t * (a * (-4.0d0))) / c) + (y * ((((b / c) / y) - ((x * (-9.0d0)) / 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 (c <= 5.5e-17) {
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) / c) + (y * ((((b / c) / y) - ((x * -9.0) / 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 c <= 5.5e-17: tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = ((t * (a * -4.0)) / c) + (y * ((((b / c) / y) - ((x * -9.0) / 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 (c <= 5.5e-17) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) / c) + Float64(y * Float64(Float64(Float64(Float64(b / c) / y) - Float64(Float64(x * -9.0) / 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 (c <= 5.5e-17)
tmp = (b + ((y * (9.0 * x)) - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = ((t * (a * -4.0)) / c) + (y * ((((b / c) / y) - ((x * -9.0) / 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[c, 5.5e-17], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] + N[(y * N[(N[(N[(N[(b / c), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x * -9.0), $MachinePrecision] / c), $MachinePrecision]), $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}\;c \leq 5.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c} + y \cdot \frac{\frac{\frac{b}{c}}{y} - \frac{x \cdot -9}{c}}{z}\\
\end{array}
\end{array}
if c < 5.50000000000000001e-17Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*83.1%
*-commutative83.1%
associate-+l-83.1%
associate-*l*83.1%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in x around 0 85.5%
*-commutative85.5%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
Simplified85.5%
if 5.50000000000000001e-17 < c Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*72.6%
*-commutative72.6%
associate-+l-72.6%
associate-*l*72.6%
associate-*l*75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in y around inf 71.2%
Taylor expanded in z around -inf 90.8%
mul-1-neg90.8%
unsub-neg90.8%
associate-*r/90.8%
*-commutative90.8%
*-commutative90.8%
associate-*l*90.8%
associate-/l*89.9%
mul-1-neg89.9%
unsub-neg89.9%
associate-*r/89.8%
*-commutative89.8%
associate-/r*87.1%
Simplified87.1%
Final simplification86.0%
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 (<= y -2.15e-85)
(/ (* y (+ (* 9.0 (/ x c)) (/ b (* y c)))) z)
(if (<= y 1e+131)
(+ (/ b (* z c)) (* -4.0 (* a (/ t c))))
(* y (- (/ (/ (/ b y) c) z) (* (/ x c) (/ -9.0 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 (y <= -2.15e-85) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else if (y <= 1e+131) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else {
tmp = y * ((((b / y) / c) / z) - ((x / c) * (-9.0 / 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 (y <= (-2.15d-85)) then
tmp = (y * ((9.0d0 * (x / c)) + (b / (y * c)))) / z
else if (y <= 1d+131) then
tmp = (b / (z * c)) + ((-4.0d0) * (a * (t / c)))
else
tmp = y * ((((b / y) / c) / z) - ((x / c) * ((-9.0d0) / 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 (y <= -2.15e-85) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else if (y <= 1e+131) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else {
tmp = y * ((((b / y) / c) / z) - ((x / c) * (-9.0 / 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 y <= -2.15e-85: tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z elif y <= 1e+131: tmp = (b / (z * c)) + (-4.0 * (a * (t / c))) else: tmp = y * ((((b / y) / c) / z) - ((x / c) * (-9.0 / 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 (y <= -2.15e-85) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c)) + Float64(b / Float64(y * c)))) / z); elseif (y <= 1e+131) tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(a * Float64(t / c)))); else tmp = Float64(y * Float64(Float64(Float64(Float64(b / y) / c) / z) - Float64(Float64(x / c) * Float64(-9.0 / 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 (y <= -2.15e-85)
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
elseif (y <= 1e+131)
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
else
tmp = y * ((((b / y) / c) / z) - ((x / c) * (-9.0 / 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[y, -2.15e-85], N[(N[(y * N[(N[(9.0 * N[(x / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1e+131], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(N[(b / y), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision] - N[(N[(x / c), $MachinePrecision] * N[(-9.0 / z), $MachinePrecision]), $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}\;y \leq -2.15 \cdot 10^{-85}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c} + \frac{b}{y \cdot c}\right)}{z}\\
\mathbf{elif}\;y \leq 10^{+131}:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\frac{\frac{b}{y}}{c}}{z} - \frac{x}{c} \cdot \frac{-9}{z}\right)\\
\end{array}
\end{array}
if y < -2.14999999999999999e-85Initial program 83.7%
associate-+l-83.7%
*-commutative83.7%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.2%
associate-*l*83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y around inf 75.1%
Taylor expanded in z around 0 64.1%
if -2.14999999999999999e-85 < y < 9.9999999999999991e130Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*80.9%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in y around inf 60.8%
clear-num60.8%
inv-pow60.8%
*-commutative60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 75.0%
cancel-sign-sub-inv75.0%
metadata-eval75.0%
*-commutative75.0%
associate-/l*71.1%
Simplified71.1%
if 9.9999999999999991e130 < y Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*75.1%
*-commutative75.1%
associate-+l-75.1%
Simplified75.2%
Taylor expanded in t around 0 61.6%
+-commutative61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around -inf 59.6%
mul-1-neg59.6%
*-commutative59.6%
distribute-rgt-neg-in59.6%
mul-1-neg59.6%
associate-/r*59.1%
*-commutative59.1%
unsub-neg59.1%
associate-*r/59.2%
*-commutative59.2%
times-frac70.3%
*-commutative70.3%
associate-/r*77.3%
associate-/r*77.1%
*-commutative77.1%
associate-/r*79.4%
Simplified79.4%
Final simplification70.5%
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 (<= y -1.4e-84) (not (<= y 1.6e+132))) (/ (* y (+ (* 9.0 (/ x c)) (/ b (* y c)))) z) (+ (/ b (* z c)) (* -4.0 (* a (/ t 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 ((y <= -1.4e-84) || !(y <= 1.6e+132)) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else {
tmp = (b / (z * c)) + (-4.0 * (a * (t / 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 ((y <= (-1.4d-84)) .or. (.not. (y <= 1.6d+132))) then
tmp = (y * ((9.0d0 * (x / c)) + (b / (y * c)))) / z
else
tmp = (b / (z * c)) + ((-4.0d0) * (a * (t / 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 ((y <= -1.4e-84) || !(y <= 1.6e+132)) {
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
} else {
tmp = (b / (z * c)) + (-4.0 * (a * (t / 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 (y <= -1.4e-84) or not (y <= 1.6e+132): tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z else: tmp = (b / (z * c)) + (-4.0 * (a * (t / 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 ((y <= -1.4e-84) || !(y <= 1.6e+132)) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c)) + Float64(b / Float64(y * c)))) / z); else tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(a * Float64(t / 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 ((y <= -1.4e-84) || ~((y <= 1.6e+132)))
tmp = (y * ((9.0 * (x / c)) + (b / (y * c)))) / z;
else
tmp = (b / (z * c)) + (-4.0 * (a * (t / 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[y, -1.4e-84], N[Not[LessEqual[y, 1.6e+132]], $MachinePrecision]], N[(N[(y * N[(N[(9.0 * N[(x / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $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}\;y \leq -1.4 \cdot 10^{-84} \lor \neg \left(y \leq 1.6 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c} + \frac{b}{y \cdot c}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if y < -1.39999999999999991e-84 or 1.5999999999999999e132 < y Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y around inf 74.2%
Taylor expanded in z around 0 67.4%
if -1.39999999999999991e-84 < y < 1.5999999999999999e132Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
associate-*l*80.9%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in y around inf 60.8%
clear-num60.8%
inv-pow60.8%
*-commutative60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 75.0%
cancel-sign-sub-inv75.0%
metadata-eval75.0%
*-commutative75.0%
associate-/l*71.1%
Simplified71.1%
Final simplification69.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 (<= t -1020000000.0)
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))
(if (<= t 3.1e-196)
(/ (+ b (* 9.0 (* y x))) (* z c))
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* 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 (t <= -1020000000.0) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (t <= 3.1e-196) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (t <= (-1020000000.0d0)) then
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
else if (t <= 3.1d-196) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (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 (t <= -1020000000.0) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (t <= 3.1e-196) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 t <= -1020000000.0: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) elif t <= 3.1e-196: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (t <= -1020000000.0) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); elseif (t <= 3.1e-196) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * 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 (t <= -1020000000.0)
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
elseif (t <= 3.1e-196)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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[t, -1020000000.0], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-196], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $MachinePrecision]), $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}\;t \leq -1020000000:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-196}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\end{array}
\end{array}
if t < -1.02e9Initial program 65.5%
associate-+l-65.5%
*-commutative65.5%
associate-*r*75.8%
*-commutative75.8%
associate-+l-75.8%
associate-*l*75.7%
associate-*l*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around 0 55.8%
Taylor expanded in t around inf 70.3%
if -1.02e9 < t < 3.09999999999999993e-196Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*78.8%
*-commutative78.8%
associate-+l-78.8%
Simplified78.8%
Taylor expanded in t around 0 71.4%
+-commutative71.4%
*-commutative71.4%
Simplified71.4%
if 3.09999999999999993e-196 < t Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*82.8%
*-commutative82.8%
associate-+l-82.8%
associate-*l*82.8%
associate-*l*84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in x around 0 59.1%
Taylor expanded in a around inf 60.3%
Final simplification66.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
(if (<= t -370000000.0)
(+ (/ b (* z c)) (* -4.0 (* a (/ t c))))
(if (<= t 3.1e-196)
(/ (+ b (* 9.0 (* y x))) (* z c))
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* 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 (t <= -370000000.0) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else if (t <= 3.1e-196) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (t <= (-370000000.0d0)) then
tmp = (b / (z * c)) + ((-4.0d0) * (a * (t / c)))
else if (t <= 3.1d-196) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (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 (t <= -370000000.0) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else if (t <= 3.1e-196) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 t <= -370000000.0: tmp = (b / (z * c)) + (-4.0 * (a * (t / c))) elif t <= 3.1e-196: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = a * ((-4.0 * (t / c)) + (b / (a * (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 (t <= -370000000.0) tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(a * Float64(t / c)))); elseif (t <= 3.1e-196) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * 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 (t <= -370000000.0)
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
elseif (t <= 3.1e-196)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = a * ((-4.0 * (t / c)) + (b / (a * (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[t, -370000000.0], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-196], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $MachinePrecision]), $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}\;t \leq -370000000:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-196}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\end{array}
\end{array}
if t < -3.7e8Initial program 65.5%
associate-+l-65.5%
*-commutative65.5%
associate-*r*75.8%
*-commutative75.8%
associate-+l-75.8%
associate-*l*75.7%
associate-*l*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y around inf 63.3%
clear-num63.3%
inv-pow63.3%
*-commutative63.3%
Applied egg-rr63.3%
unpow-163.3%
associate-/l*65.4%
Simplified65.4%
Taylor expanded in y around 0 76.0%
cancel-sign-sub-inv76.0%
metadata-eval76.0%
*-commutative76.0%
associate-/l*78.1%
Simplified78.1%
if -3.7e8 < t < 3.09999999999999993e-196Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*78.8%
*-commutative78.8%
associate-+l-78.8%
Simplified78.8%
Taylor expanded in t around 0 71.4%
+-commutative71.4%
*-commutative71.4%
Simplified71.4%
if 3.09999999999999993e-196 < t Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*82.8%
*-commutative82.8%
associate-+l-82.8%
associate-*l*82.8%
associate-*l*84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in x around 0 59.1%
Taylor expanded in a around inf 60.3%
Final simplification67.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 (<= z 7.2e+50) (/ (+ b (- (* x (* y 9.0)) (* (* z 4.0) (* a t)))) (* z c)) (* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))))
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 <= 7.2e+50) {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
}
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 <= 7.2d+50) then
tmp = (b + ((x * (y * 9.0d0)) - ((z * 4.0d0) * (a * t)))) / (z * c)
else
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
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 <= 7.2e+50) {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c);
} else {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
}
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 <= 7.2e+50: tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c) else: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) 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 <= 7.2e+50) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); 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 <= 7.2e+50)
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c);
else
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
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, 7.2e+50], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $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 7.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\end{array}
\end{array}
if z < 7.19999999999999972e50Initial program 85.5%
associate-+l-85.5%
*-commutative85.5%
associate-*r*86.8%
*-commutative86.8%
associate-+l-86.8%
associate-*l*86.8%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
if 7.19999999999999972e50 < z Initial program 62.3%
associate-+l-62.3%
*-commutative62.3%
associate-*r*58.0%
*-commutative58.0%
associate-+l-58.0%
associate-*l*58.0%
associate-*l*66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in x around 0 57.7%
Taylor expanded in t around inf 72.6%
Final simplification84.0%
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 (<= y -9.2e-73)
(/ (+ b (* 9.0 (* y x))) (* z c))
(if (<= y 1.8e+132)
(+ (/ b (* z c)) (* -4.0 (* a (/ t c))))
(* (/ (* 9.0 x) z) (/ y 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 (y <= -9.2e-73) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else if (y <= 1.8e+132) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else {
tmp = ((9.0 * x) / z) * (y / 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 (y <= (-9.2d-73)) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else if (y <= 1.8d+132) then
tmp = (b / (z * c)) + ((-4.0d0) * (a * (t / c)))
else
tmp = ((9.0d0 * x) / z) * (y / 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 (y <= -9.2e-73) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else if (y <= 1.8e+132) {
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
} else {
tmp = ((9.0 * x) / z) * (y / 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 y <= -9.2e-73: tmp = (b + (9.0 * (y * x))) / (z * c) elif y <= 1.8e+132: tmp = (b / (z * c)) + (-4.0 * (a * (t / c))) else: tmp = ((9.0 * x) / z) * (y / 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 (y <= -9.2e-73) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); elseif (y <= 1.8e+132) tmp = Float64(Float64(b / Float64(z * c)) + Float64(-4.0 * Float64(a * Float64(t / c)))); else tmp = Float64(Float64(Float64(9.0 * x) / z) * Float64(y / 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 (y <= -9.2e-73)
tmp = (b + (9.0 * (y * x))) / (z * c);
elseif (y <= 1.8e+132)
tmp = (b / (z * c)) + (-4.0 * (a * (t / c)));
else
tmp = ((9.0 * x) / z) * (y / 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[y, -9.2e-73], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+132], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * x), $MachinePrecision] / z), $MachinePrecision] * N[(y / 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}\;y \leq -9.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+132}:\\
\;\;\;\;\frac{b}{z \cdot c} + -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot x}{z} \cdot \frac{y}{c}\\
\end{array}
\end{array}
if y < -9.19999999999999953e-73Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
Simplified80.9%
Taylor expanded in t around 0 63.1%
+-commutative63.1%
*-commutative63.1%
Simplified63.1%
if -9.19999999999999953e-73 < y < 1.80000000000000008e132Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*81.1%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 61.1%
clear-num61.1%
inv-pow61.1%
*-commutative61.1%
Applied egg-rr61.1%
unpow-161.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in y around 0 75.2%
cancel-sign-sub-inv75.2%
metadata-eval75.2%
*-commutative75.2%
associate-/l*71.3%
Simplified71.3%
if 1.80000000000000008e132 < y Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*75.1%
*-commutative75.1%
associate-+l-75.1%
Simplified75.2%
Taylor expanded in x around inf 52.8%
*-commutative52.8%
associate-/l*59.5%
associate-*l*59.5%
*-commutative59.5%
associate-*r/59.5%
*-commutative59.5%
associate-/l*59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in x around 0 52.8%
associate-*r/52.7%
associate-*r*52.8%
*-commutative52.8%
times-frac72.5%
Simplified72.5%
Final simplification69.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
(if (<= b -1.16e+50)
(/ 1.0 (* z (/ c b)))
(if (<= b -3.5e-158)
(* 9.0 (/ (* y x) (* z c)))
(if (<= b 1.6e+81) (* -4.0 (* a (/ t c))) (/ (/ 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.16e+50) {
tmp = 1.0 / (z * (c / b));
} else if (b <= -3.5e-158) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (b <= 1.6e+81) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (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.16d+50)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= (-3.5d-158)) then
tmp = 9.0d0 * ((y * x) / (z * c))
else if (b <= 1.6d+81) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (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.16e+50) {
tmp = 1.0 / (z * (c / b));
} else if (b <= -3.5e-158) {
tmp = 9.0 * ((y * x) / (z * c));
} else if (b <= 1.6e+81) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (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.16e+50: tmp = 1.0 / (z * (c / b)) elif b <= -3.5e-158: tmp = 9.0 * ((y * x) / (z * c)) elif b <= 1.6e+81: tmp = -4.0 * (a * (t / c)) else: tmp = (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.16e+50) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= -3.5e-158) tmp = Float64(9.0 * Float64(Float64(y * x) / Float64(z * c))); elseif (b <= 1.6e+81) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b / 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.16e+50)
tmp = 1.0 / (z * (c / b));
elseif (b <= -3.5e-158)
tmp = 9.0 * ((y * x) / (z * c));
elseif (b <= 1.6e+81)
tmp = -4.0 * (a * (t / c));
else
tmp = (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.16e+50], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.5e-158], N[(9.0 * N[(N[(y * x), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+81], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $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.16 \cdot 10^{+50}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-158}:\\
\;\;\;\;9 \cdot \frac{y \cdot x}{z \cdot c}\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+81}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -1.16e50Initial program 78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*69.3%
*-commutative69.3%
associate-+l-69.3%
Simplified69.3%
Taylor expanded in b around inf 56.3%
*-commutative56.3%
Simplified56.3%
clear-num56.2%
inv-pow56.2%
Applied egg-rr56.2%
unpow-156.2%
associate-/l*64.0%
Simplified64.0%
if -1.16e50 < b < -3.50000000000000012e-158Initial program 78.7%
associate-+l-78.7%
*-commutative78.7%
associate-*r*82.3%
*-commutative82.3%
associate-+l-82.3%
Simplified82.5%
Taylor expanded in x around inf 49.1%
if -3.50000000000000012e-158 < b < 1.6e81Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
Simplified81.1%
Taylor expanded in t around inf 55.6%
associate-/l*55.8%
Simplified55.8%
if 1.6e81 < b Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*84.3%
*-commutative84.3%
associate-+l-84.3%
Simplified84.3%
Taylor expanded in b around inf 62.5%
*-commutative62.5%
Simplified62.5%
*-un-lft-identity62.5%
associate-/r*66.7%
Applied egg-rr66.7%
*-un-lft-identity66.7%
Applied egg-rr66.7%
Final simplification57.5%
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 (<= a -1.1e-100)
(* -4.0 (* a (* t (/ 1.0 c))))
(if (<= a 6e+123)
(/ (+ b (* 9.0 (* y x))) (* z c))
(* -4.0 (/ (* a t) 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 (a <= -1.1e-100) {
tmp = -4.0 * (a * (t * (1.0 / c)));
} else if (a <= 6e+123) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / 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 (a <= (-1.1d-100)) then
tmp = (-4.0d0) * (a * (t * (1.0d0 / c)))
else if (a <= 6d+123) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = (-4.0d0) * ((a * t) / 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 (a <= -1.1e-100) {
tmp = -4.0 * (a * (t * (1.0 / c)));
} else if (a <= 6e+123) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = -4.0 * ((a * t) / 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 a <= -1.1e-100: tmp = -4.0 * (a * (t * (1.0 / c))) elif a <= 6e+123: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = -4.0 * ((a * t) / 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 (a <= -1.1e-100) tmp = Float64(-4.0 * Float64(a * Float64(t * Float64(1.0 / c)))); elseif (a <= 6e+123) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * t) / 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 (a <= -1.1e-100)
tmp = -4.0 * (a * (t * (1.0 / c)));
elseif (a <= 6e+123)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = -4.0 * ((a * t) / 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[a, -1.1e-100], N[(-4.0 * N[(a * N[(t * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+123], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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}\;a \leq -1.1 \cdot 10^{-100}:\\
\;\;\;\;-4 \cdot \left(a \cdot \left(t \cdot \frac{1}{c}\right)\right)\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+123}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if a < -1.09999999999999995e-100Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*78.0%
*-commutative78.0%
associate-+l-78.0%
Simplified78.1%
Taylor expanded in t around inf 58.5%
associate-/l*59.5%
Simplified59.5%
div-inv59.5%
Applied egg-rr59.5%
if -1.09999999999999995e-100 < a < 6.00000000000000016e123Initial program 78.1%
associate-+l-78.1%
*-commutative78.1%
associate-*r*83.7%
*-commutative83.7%
associate-+l-83.7%
Simplified83.6%
Taylor expanded in t around 0 71.5%
+-commutative71.5%
*-commutative71.5%
Simplified71.5%
if 6.00000000000000016e123 < a Initial program 78.8%
associate-+l-78.8%
*-commutative78.8%
associate-*r*68.3%
*-commutative68.3%
associate-+l-68.3%
Simplified68.3%
Taylor expanded in t around inf 72.4%
Final simplification67.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 (<= b -1.45e+58) (not (<= b 7.5e+81))) (/ (/ b z) c) (* -4.0 (/ (* a t) 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.45e+58) || !(b <= 7.5e+81)) {
tmp = (b / z) / c;
} else {
tmp = -4.0 * ((a * t) / 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.45d+58)) .or. (.not. (b <= 7.5d+81))) then
tmp = (b / z) / c
else
tmp = (-4.0d0) * ((a * t) / 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.45e+58) || !(b <= 7.5e+81)) {
tmp = (b / z) / c;
} else {
tmp = -4.0 * ((a * t) / 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.45e+58) or not (b <= 7.5e+81): tmp = (b / z) / c else: tmp = -4.0 * ((a * t) / 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.45e+58) || !(b <= 7.5e+81)) tmp = Float64(Float64(b / z) / c); else tmp = Float64(-4.0 * Float64(Float64(a * t) / 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.45e+58) || ~((b <= 7.5e+81)))
tmp = (b / z) / c;
else
tmp = -4.0 * ((a * t) / 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[b, -1.45e+58], N[Not[LessEqual[b, 7.5e+81]], $MachinePrecision]], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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.45 \cdot 10^{+58} \lor \neg \left(b \leq 7.5 \cdot 10^{+81}\right):\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if b < -1.45000000000000001e58 or 7.49999999999999973e81 < b Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*77.7%
*-commutative77.7%
associate-+l-77.7%
Simplified77.7%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
*-un-lft-identity60.7%
associate-/r*65.4%
Applied egg-rr65.4%
*-un-lft-identity65.4%
Applied egg-rr65.4%
if -1.45000000000000001e58 < b < 7.49999999999999973e81Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
Simplified81.2%
Taylor expanded in t around inf 50.1%
Final simplification55.0%
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 (<= t -1.45e-65) (not (<= t 6.4e-165))) (* -4.0 (* a (/ t c))) (/ (/ 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 ((t <= -1.45e-65) || !(t <= 6.4e-165)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (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 ((t <= (-1.45d-65)) .or. (.not. (t <= 6.4d-165))) then
tmp = (-4.0d0) * (a * (t / c))
else
tmp = (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 ((t <= -1.45e-65) || !(t <= 6.4e-165)) {
tmp = -4.0 * (a * (t / c));
} else {
tmp = (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 (t <= -1.45e-65) or not (t <= 6.4e-165): tmp = -4.0 * (a * (t / c)) else: tmp = (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 ((t <= -1.45e-65) || !(t <= 6.4e-165)) tmp = Float64(-4.0 * Float64(a * Float64(t / c))); else tmp = Float64(Float64(b / 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 ((t <= -1.45e-65) || ~((t <= 6.4e-165)))
tmp = -4.0 * (a * (t / c));
else
tmp = (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[t, -1.45e-65], N[Not[LessEqual[t, 6.4e-165]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $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}\;t \leq -1.45 \cdot 10^{-65} \lor \neg \left(t \leq 6.4 \cdot 10^{-165}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if t < -1.4499999999999999e-65 or 6.40000000000000026e-165 < t Initial program 78.1%
associate-+l-78.1%
*-commutative78.1%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
Simplified81.1%
Taylor expanded in t around inf 51.3%
associate-/l*51.9%
Simplified51.9%
if -1.4499999999999999e-65 < t < 6.40000000000000026e-165Initial program 84.1%
associate-+l-84.1%
*-commutative84.1%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
Simplified77.8%
Taylor expanded in b around inf 42.3%
*-commutative42.3%
Simplified42.3%
*-un-lft-identity42.3%
associate-/r*43.4%
Applied egg-rr43.4%
*-un-lft-identity43.4%
Applied egg-rr43.4%
Final simplification49.1%
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 -5.1e+57) (/ 1.0 (* z (/ c b))) (if (<= b 1.4e+81) (/ (* t (* a -4.0)) c) (/ (/ 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 <= -5.1e+57) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 1.4e+81) {
tmp = (t * (a * -4.0)) / c;
} else {
tmp = (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 <= (-5.1d+57)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 1.4d+81) then
tmp = (t * (a * (-4.0d0))) / c
else
tmp = (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 <= -5.1e+57) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 1.4e+81) {
tmp = (t * (a * -4.0)) / c;
} else {
tmp = (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 <= -5.1e+57: tmp = 1.0 / (z * (c / b)) elif b <= 1.4e+81: tmp = (t * (a * -4.0)) / c else: tmp = (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 <= -5.1e+57) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 1.4e+81) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); else tmp = Float64(Float64(b / 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 <= -5.1e+57)
tmp = 1.0 / (z * (c / b));
elseif (b <= 1.4e+81)
tmp = (t * (a * -4.0)) / c;
else
tmp = (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, -5.1e+57], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+81], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $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 -5.1 \cdot 10^{+57}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+81}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -5.10000000000000023e57Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
Simplified70.2%
Taylor expanded in b around inf 58.8%
*-commutative58.8%
Simplified58.8%
clear-num58.8%
inv-pow58.8%
Applied egg-rr58.8%
unpow-158.8%
associate-/l*66.9%
Simplified66.9%
if -5.10000000000000023e57 < b < 1.39999999999999997e81Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.1%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in x around 0 83.0%
*-commutative83.0%
associate-*r*83.0%
*-commutative83.0%
associate-*r*83.1%
Simplified83.1%
Taylor expanded in z around inf 50.1%
associate-*r/50.1%
associate-*r*50.1%
Simplified50.1%
if 1.39999999999999997e81 < b Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*84.3%
*-commutative84.3%
associate-+l-84.3%
Simplified84.3%
Taylor expanded in b around inf 62.5%
*-commutative62.5%
Simplified62.5%
*-un-lft-identity62.5%
associate-/r*66.7%
Applied egg-rr66.7%
*-un-lft-identity66.7%
Applied egg-rr66.7%
Final simplification55.5%
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.4e+57) (/ 1.0 (* z (/ c b))) (if (<= b 3.5e+81) (* -4.0 (/ (* a t) c)) (/ (/ 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.4e+57) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.5e+81) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (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.4d+57)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 3.5d+81) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = (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.4e+57) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.5e+81) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (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.4e+57: tmp = 1.0 / (z * (c / b)) elif b <= 3.5e+81: tmp = -4.0 * ((a * t) / c) else: tmp = (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.4e+57) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 3.5e+81) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(Float64(b / 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.4e+57)
tmp = 1.0 / (z * (c / b));
elseif (b <= 3.5e+81)
tmp = -4.0 * ((a * t) / c);
else
tmp = (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.4e+57], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.5e+81], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $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.4 \cdot 10^{+57}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -1.4e57Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
Simplified70.2%
Taylor expanded in b around inf 58.8%
*-commutative58.8%
Simplified58.8%
clear-num58.8%
inv-pow58.8%
Applied egg-rr58.8%
unpow-158.8%
associate-/l*66.9%
Simplified66.9%
if -1.4e57 < b < 3.5e81Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
Simplified81.2%
Taylor expanded in t around inf 50.1%
if 3.5e81 < b Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*84.3%
*-commutative84.3%
associate-+l-84.3%
Simplified84.3%
Taylor expanded in b around inf 62.5%
*-commutative62.5%
Simplified62.5%
*-un-lft-identity62.5%
associate-/r*66.7%
Applied egg-rr66.7%
*-un-lft-identity66.7%
Applied egg-rr66.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 (/ (/ 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(Float64(b / 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[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{z}}{c}
\end{array}
Initial program 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
Simplified80.0%
Taylor expanded in b around inf 33.4%
*-commutative33.4%
Simplified33.4%
*-un-lft-identity33.4%
associate-/r*34.6%
Applied egg-rr34.6%
*-un-lft-identity34.6%
Applied egg-rr34.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 (* 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 80.1%
associate-+l-80.1%
*-commutative80.1%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
Simplified80.0%
Taylor expanded in b around inf 33.4%
*-commutative33.4%
Simplified33.4%
(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 2024181
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))