
(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 19 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 -1e-35) (not (<= z 1.3e+79))) (/ (- (+ (/ b z) (* 9.0 (* (/ y z) x))) (* 4.0 (* a t))) c) (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1e-35) || !(z <= 1.3e+79)) {
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1e-35) || !(z <= 1.3e+79)) tmp = Float64(Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(y / z) * x))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return 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, -1e-35], N[Not[LessEqual[z, 1.3e+79]], $MachinePrecision]], N[(N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $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 -1 \cdot 10^{-35} \lor \neg \left(z \leq 1.3 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{\left(\frac{b}{z} + 9 \cdot \left(\frac{y}{z} \cdot x\right)\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.00000000000000001e-35 or 1.30000000000000007e79 < z Initial program 63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*59.3%
*-commutative59.3%
associate-+l-59.3%
associate-*l*59.3%
associate-*l*65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in x around 0 78.9%
Taylor expanded in c around 0 87.3%
associate-*r/96.2%
*-commutative96.2%
Applied egg-rr96.2%
if -1.00000000000000001e-35 < z < 1.30000000000000007e79Initial program 93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*94.6%
*-commutative94.6%
associate-+l-94.6%
Simplified95.4%
Final simplification95.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))))
(if (<= t_1 -2e+121)
(* x (/ (/ y c) (/ z 9.0)))
(if (<= t_1 -5e-233)
(* a (/ (* t -4.0) c))
(if (<= t_1 4e-299)
(/ 1.0 (/ (* z c) b))
(if (<= t_1 1e+94)
(* t (/ (* a -4.0) c))
(* 9.0 (/ (* x (/ y 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -2e+121) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 9.0 * ((x * (y / 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) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-2d+121)) then
tmp = x * ((y / c) / (z / 9.0d0))
else if (t_1 <= (-5d-233)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t_1 <= 4d-299) then
tmp = 1.0d0 / ((z * c) / b)
else if (t_1 <= 1d+94) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = 9.0d0 * ((x * (y / 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -2e+121) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 9.0 * ((x * (y / 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): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -2e+121: tmp = x * ((y / c) / (z / 9.0)) elif t_1 <= -5e-233: tmp = a * ((t * -4.0) / c) elif t_1 <= 4e-299: tmp = 1.0 / ((z * c) / b) elif t_1 <= 1e+94: tmp = t * ((a * -4.0) / c) else: tmp = 9.0 * ((x * (y / 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) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -2e+121) tmp = Float64(x * Float64(Float64(y / c) / Float64(z / 9.0))); elseif (t_1 <= -5e-233) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t_1 <= 4e-299) tmp = Float64(1.0 / Float64(Float64(z * c) / b)); elseif (t_1 <= 1e+94) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = Float64(9.0 * Float64(Float64(x * Float64(y / 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)
t_1 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -2e+121)
tmp = x * ((y / c) / (z / 9.0));
elseif (t_1 <= -5e-233)
tmp = a * ((t * -4.0) / c);
elseif (t_1 <= 4e-299)
tmp = 1.0 / ((z * c) / b);
elseif (t_1 <= 1e+94)
tmp = t * ((a * -4.0) / c);
else
tmp = 9.0 * ((x * (y / 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_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+121], N[(x * N[(N[(y / c), $MachinePrecision] / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-233], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-299], N[(1.0 / N[(N[(z * c), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $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}\;t\_1 \leq -2 \cdot 10^{+121}:\\
\;\;\;\;x \cdot \frac{\frac{y}{c}}{\frac{z}{9}}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-299}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000007e121Initial program 68.6%
associate-+l-68.6%
*-commutative68.6%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified72.5%
Taylor expanded in x around inf 58.1%
*-commutative58.1%
associate-/l*70.7%
associate-*l*70.7%
*-commutative70.7%
associate-*r/70.7%
*-commutative70.7%
associate-/l*70.5%
*-commutative70.5%
Simplified70.5%
clear-num70.6%
inv-pow70.6%
*-commutative70.6%
Applied egg-rr70.6%
unpow-170.6%
Simplified70.6%
pow170.6%
un-div-inv70.7%
associate-/l*70.7%
Applied egg-rr70.7%
unpow170.7%
associate-/r*76.7%
Simplified76.7%
if -2.00000000000000007e121 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000012e-233Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*69.0%
*-commutative69.0%
associate-+l-69.0%
Simplified68.9%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-/l*51.3%
associate-*r*51.3%
*-commutative51.3%
*-commutative51.3%
associate-*l/51.3%
Simplified51.3%
if -5.00000000000000012e-233 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 3.99999999999999997e-299Initial program 90.3%
associate-+l-90.3%
*-commutative90.3%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
Simplified87.7%
Taylor expanded in b around inf 60.5%
*-commutative60.5%
Simplified60.5%
*-commutative60.5%
clear-num60.6%
inv-pow60.6%
Applied egg-rr60.6%
unpow-160.6%
Simplified60.6%
if 3.99999999999999997e-299 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e94Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around 0 87.7%
Taylor expanded in z around inf 64.3%
associate-*r/64.3%
associate-*r*64.3%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
if 1e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified70.6%
Taylor expanded in x around inf 51.0%
associate-/l*54.9%
Applied egg-rr54.9%
associate-/r*60.5%
associate-*r/60.7%
Simplified60.7%
Final simplification63.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))))
(if (<= t_1 -2e+121)
(* 9.0 (* (/ y c) (/ x z)))
(if (<= t_1 -5e-233)
(* a (/ (* t -4.0) c))
(if (<= t_1 4e-299)
(/ 1.0 (/ (* z c) b))
(if (<= t_1 1e+94)
(* t (/ (* a -4.0) c))
(* 9.0 (/ (* x (/ y 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -2e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 9.0 * ((x * (y / 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) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-2d+121)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if (t_1 <= (-5d-233)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t_1 <= 4d-299) then
tmp = 1.0d0 / ((z * c) / b)
else if (t_1 <= 1d+94) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = 9.0d0 * ((x * (y / 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -2e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 9.0 * ((x * (y / 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): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -2e+121: tmp = 9.0 * ((y / c) * (x / z)) elif t_1 <= -5e-233: tmp = a * ((t * -4.0) / c) elif t_1 <= 4e-299: tmp = 1.0 / ((z * c) / b) elif t_1 <= 1e+94: tmp = t * ((a * -4.0) / c) else: tmp = 9.0 * ((x * (y / 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) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -2e+121) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif (t_1 <= -5e-233) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t_1 <= 4e-299) tmp = Float64(1.0 / Float64(Float64(z * c) / b)); elseif (t_1 <= 1e+94) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = Float64(9.0 * Float64(Float64(x * Float64(y / 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)
t_1 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -2e+121)
tmp = 9.0 * ((y / c) * (x / z));
elseif (t_1 <= -5e-233)
tmp = a * ((t * -4.0) / c);
elseif (t_1 <= 4e-299)
tmp = 1.0 / ((z * c) / b);
elseif (t_1 <= 1e+94)
tmp = t * ((a * -4.0) / c);
else
tmp = 9.0 * ((x * (y / 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_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+121], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-233], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-299], N[(1.0 / N[(N[(z * c), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $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}\;t\_1 \leq -2 \cdot 10^{+121}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-299}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000007e121Initial program 68.6%
associate-+l-68.6%
*-commutative68.6%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified72.5%
Taylor expanded in x around inf 58.1%
*-commutative58.1%
associate-/l*70.7%
associate-*l*70.7%
*-commutative70.7%
associate-*r/70.7%
*-commutative70.7%
associate-/l*70.5%
*-commutative70.5%
Simplified70.5%
clear-num70.6%
inv-pow70.6%
*-commutative70.6%
Applied egg-rr70.6%
unpow-170.6%
Simplified70.6%
Taylor expanded in x around 0 58.1%
*-commutative58.1%
times-frac74.8%
Simplified74.8%
if -2.00000000000000007e121 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000012e-233Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*69.0%
*-commutative69.0%
associate-+l-69.0%
Simplified68.9%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-/l*51.3%
associate-*r*51.3%
*-commutative51.3%
*-commutative51.3%
associate-*l/51.3%
Simplified51.3%
if -5.00000000000000012e-233 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 3.99999999999999997e-299Initial program 90.3%
associate-+l-90.3%
*-commutative90.3%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
Simplified87.7%
Taylor expanded in b around inf 60.5%
*-commutative60.5%
Simplified60.5%
*-commutative60.5%
clear-num60.6%
inv-pow60.6%
Applied egg-rr60.6%
unpow-160.6%
Simplified60.6%
if 3.99999999999999997e-299 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e94Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around 0 87.7%
Taylor expanded in z around inf 64.3%
associate-*r/64.3%
associate-*r*64.3%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
if 1e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 72.5%
associate-+l-72.5%
*-commutative72.5%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified70.6%
Taylor expanded in x around inf 51.0%
associate-/l*54.9%
Applied egg-rr54.9%
associate-/r*60.5%
associate-*r/60.7%
Simplified60.7%
Final simplification63.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))) (t_2 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= t_1 -2e+121)
t_2
(if (<= t_1 -5e-233)
(* a (/ (* t -4.0) c))
(if (<= t_1 4e-299)
(/ 1.0 (/ (* z c) b))
(if (<= t_1 1e+94) (* t (/ (* a -4.0) c)) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t_1 <= -2e+121) {
tmp = t_2;
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (9.0d0 * x)
t_2 = 9.0d0 * ((y / c) * (x / z))
if (t_1 <= (-2d+121)) then
tmp = t_2
else if (t_1 <= (-5d-233)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t_1 <= 4d-299) then
tmp = 1.0d0 / ((z * c) / b)
else if (t_1 <= 1d+94) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (t_1 <= -2e+121) {
tmp = t_2;
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) t_2 = 9.0 * ((y / c) * (x / z)) tmp = 0 if t_1 <= -2e+121: tmp = t_2 elif t_1 <= -5e-233: tmp = a * ((t * -4.0) / c) elif t_1 <= 4e-299: tmp = 1.0 / ((z * c) / b) elif t_1 <= 1e+94: tmp = t * ((a * -4.0) / c) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) t_2 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (t_1 <= -2e+121) tmp = t_2; elseif (t_1 <= -5e-233) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t_1 <= 4e-299) tmp = Float64(1.0 / Float64(Float64(z * c) / b)); elseif (t_1 <= 1e+94) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
t_2 = 9.0 * ((y / c) * (x / z));
tmp = 0.0;
if (t_1 <= -2e+121)
tmp = t_2;
elseif (t_1 <= -5e-233)
tmp = a * ((t * -4.0) / c);
elseif (t_1 <= 4e-299)
tmp = 1.0 / ((z * c) / b);
elseif (t_1 <= 1e+94)
tmp = t * ((a * -4.0) / c);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+121], t$95$2, If[LessEqual[t$95$1, -5e-233], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-299], N[(1.0 / N[(N[(z * c), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
t_2 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+121}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-299}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000007e121 or 1e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 70.5%
associate-+l-70.5%
*-commutative70.5%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified71.6%
Taylor expanded in x around inf 54.7%
*-commutative54.7%
associate-/l*63.1%
associate-*l*63.1%
*-commutative63.1%
associate-*r/63.1%
*-commutative63.1%
associate-/l*63.0%
*-commutative63.0%
Simplified63.0%
clear-num63.0%
inv-pow63.0%
*-commutative63.0%
Applied egg-rr63.0%
unpow-163.0%
Simplified63.0%
Taylor expanded in x around 0 54.7%
*-commutative54.7%
times-frac69.3%
Simplified69.3%
if -2.00000000000000007e121 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000012e-233Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*69.0%
*-commutative69.0%
associate-+l-69.0%
Simplified68.9%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-/l*51.3%
associate-*r*51.3%
*-commutative51.3%
*-commutative51.3%
associate-*l/51.3%
Simplified51.3%
if -5.00000000000000012e-233 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 3.99999999999999997e-299Initial program 90.3%
associate-+l-90.3%
*-commutative90.3%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
Simplified87.7%
Taylor expanded in b around inf 60.5%
*-commutative60.5%
Simplified60.5%
*-commutative60.5%
clear-num60.6%
inv-pow60.6%
Applied egg-rr60.6%
unpow-160.6%
Simplified60.6%
if 3.99999999999999997e-299 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e94Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around 0 87.7%
Taylor expanded in z around inf 64.3%
associate-*r/64.3%
associate-*r*64.3%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
Final simplification63.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))) (t_2 (* 9.0 (* x (/ y (* z c))))))
(if (<= t_1 -2e+121)
t_2
(if (<= t_1 -5e-233)
(* a (/ (* t -4.0) c))
(if (<= t_1 4e-299)
(/ 1.0 (/ (* z c) b))
(if (<= t_1 1e+94) (* t (/ (* a -4.0) c)) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (t_1 <= -2e+121) {
tmp = t_2;
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (9.0d0 * x)
t_2 = 9.0d0 * (x * (y / (z * c)))
if (t_1 <= (-2d+121)) then
tmp = t_2
else if (t_1 <= (-5d-233)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t_1 <= 4d-299) then
tmp = 1.0d0 / ((z * c) / b)
else if (t_1 <= 1d+94) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (t_1 <= -2e+121) {
tmp = t_2;
} else if (t_1 <= -5e-233) {
tmp = a * ((t * -4.0) / c);
} else if (t_1 <= 4e-299) {
tmp = 1.0 / ((z * c) / b);
} else if (t_1 <= 1e+94) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) t_2 = 9.0 * (x * (y / (z * c))) tmp = 0 if t_1 <= -2e+121: tmp = t_2 elif t_1 <= -5e-233: tmp = a * ((t * -4.0) / c) elif t_1 <= 4e-299: tmp = 1.0 / ((z * c) / b) elif t_1 <= 1e+94: tmp = t * ((a * -4.0) / c) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (t_1 <= -2e+121) tmp = t_2; elseif (t_1 <= -5e-233) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t_1 <= 4e-299) tmp = Float64(1.0 / Float64(Float64(z * c) / b)); elseif (t_1 <= 1e+94) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
t_2 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (t_1 <= -2e+121)
tmp = t_2;
elseif (t_1 <= -5e-233)
tmp = a * ((t * -4.0) / c);
elseif (t_1 <= 4e-299)
tmp = 1.0 / ((z * c) / b);
elseif (t_1 <= 1e+94)
tmp = t * ((a * -4.0) / c);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+121], t$95$2, If[LessEqual[t$95$1, -5e-233], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-299], N[(1.0 / N[(N[(z * c), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+121}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-299}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b}}\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000007e121 or 1e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 70.5%
associate-+l-70.5%
*-commutative70.5%
associate-*r*70.5%
*-commutative70.5%
associate-+l-70.5%
Simplified71.6%
Taylor expanded in x around inf 54.7%
associate-/l*63.1%
*-commutative63.1%
Simplified63.1%
if -2.00000000000000007e121 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000012e-233Initial program 74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*69.0%
*-commutative69.0%
associate-+l-69.0%
Simplified68.9%
Taylor expanded in t around inf 47.8%
*-commutative47.8%
associate-/l*51.3%
associate-*r*51.3%
*-commutative51.3%
*-commutative51.3%
associate-*l/51.3%
Simplified51.3%
if -5.00000000000000012e-233 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 3.99999999999999997e-299Initial program 90.3%
associate-+l-90.3%
*-commutative90.3%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
Simplified87.7%
Taylor expanded in b around inf 60.5%
*-commutative60.5%
Simplified60.5%
*-commutative60.5%
clear-num60.6%
inv-pow60.6%
Applied egg-rr60.6%
unpow-160.6%
Simplified60.6%
if 3.99999999999999997e-299 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e94Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around 0 87.7%
Taylor expanded in z around inf 64.3%
associate-*r/64.3%
associate-*r*64.3%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
Final simplification61.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 (* y (* 9.0 x))))
(if (<= t_1 -1e+133)
(* x (/ (/ y c) (/ z 9.0)))
(if (<= t_1 2e+109)
(- (/ b (* z c)) (* 4.0 (/ (* a t) c)))
(if (<= t_1 2e+225)
(/ (+ (/ b z) (* 9.0 (/ (* y x) z))) c)
(* x (/ (* y (/ 9.0 z)) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 2e+109) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else if (t_1 <= 2e+225) {
tmp = ((b / z) + (9.0 * ((y * x) / z))) / c;
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-1d+133)) then
tmp = x * ((y / c) / (z / 9.0d0))
else if (t_1 <= 2d+109) then
tmp = (b / (z * c)) - (4.0d0 * ((a * t) / c))
else if (t_1 <= 2d+225) then
tmp = ((b / z) + (9.0d0 * ((y * x) / z))) / c
else
tmp = x * ((y * (9.0d0 / z)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 2e+109) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else if (t_1 <= 2e+225) {
tmp = ((b / z) + (9.0 * ((y * x) / z))) / c;
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -1e+133: tmp = x * ((y / c) / (z / 9.0)) elif t_1 <= 2e+109: tmp = (b / (z * c)) - (4.0 * ((a * t) / c)) elif t_1 <= 2e+225: tmp = ((b / z) + (9.0 * ((y * x) / z))) / c else: tmp = x * ((y * (9.0 / z)) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -1e+133) tmp = Float64(x * Float64(Float64(y / c) / Float64(z / 9.0))); elseif (t_1 <= 2e+109) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(Float64(a * t) / c))); elseif (t_1 <= 2e+225) tmp = Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(y * x) / z))) / c); else tmp = Float64(x * Float64(Float64(y * Float64(9.0 / 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 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -1e+133)
tmp = x * ((y / c) / (z / 9.0));
elseif (t_1 <= 2e+109)
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
elseif (t_1 <= 2e+225)
tmp = ((b / z) + (9.0 * ((y * x) / z))) / c;
else
tmp = x * ((y * (9.0 / z)) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+133], N[(x * N[(N[(y / c), $MachinePrecision] / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+109], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(x * N[(N[(y * N[(9.0 / z), $MachinePrecision]), $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}\;t\_1 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;x \cdot \frac{\frac{y}{c}}{\frac{z}{9}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+109}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y \cdot x}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \frac{9}{z}}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
Simplified72.8%
Taylor expanded in x around inf 59.4%
*-commutative59.4%
associate-/l*72.7%
associate-*l*72.8%
*-commutative72.8%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.6%
*-commutative72.6%
Simplified72.6%
clear-num72.6%
inv-pow72.6%
*-commutative72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
pow172.6%
un-div-inv72.8%
associate-/l*72.7%
Applied egg-rr72.7%
unpow172.7%
associate-/r*77.3%
Simplified77.3%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999996e109Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*81.3%
*-commutative81.3%
associate-+l-81.3%
associate-*l*81.3%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in x around 0 89.6%
Taylor expanded in x around 0 84.3%
if 1.99999999999999996e109 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999986e225Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*77.8%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x around 0 82.2%
Taylor expanded in c around 0 90.9%
Taylor expanded in a around 0 68.8%
if 1.99999999999999986e225 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 60.8%
associate-+l-60.8%
*-commutative60.8%
associate-*r*56.6%
*-commutative56.6%
associate-+l-56.6%
Simplified56.8%
Taylor expanded in x around inf 56.3%
*-commutative56.3%
associate-/l*69.1%
associate-*l*69.0%
*-commutative69.0%
associate-*r/69.0%
*-commutative69.0%
associate-/l*69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in y around 0 69.0%
associate-*r/69.0%
*-commutative69.0%
times-frac77.8%
associate-*l/73.6%
Simplified73.6%
Final simplification80.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))))
(if (<= t_1 -1e+133)
(* x (/ (/ y c) (/ z 9.0)))
(if (<= t_1 1e+94)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(if (<= t_1 5e+193)
(/ (+ b (* 9.0 (* y x))) (* z c))
(* x (/ (* y (/ 9.0 z)) c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 1e+94) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (t_1 <= 5e+193) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-1d+133)) then
tmp = x * ((y / c) / (z / 9.0d0))
else if (t_1 <= 1d+94) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else if (t_1 <= 5d+193) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = x * ((y * (9.0d0 / z)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 1e+94) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (t_1 <= 5e+193) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -1e+133: tmp = x * ((y / c) / (z / 9.0)) elif t_1 <= 1e+94: tmp = ((b / z) - (4.0 * (a * t))) / c elif t_1 <= 5e+193: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = x * ((y * (9.0 / z)) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -1e+133) tmp = Float64(x * Float64(Float64(y / c) / Float64(z / 9.0))); elseif (t_1 <= 1e+94) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); elseif (t_1 <= 5e+193) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(x * Float64(Float64(y * Float64(9.0 / 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 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -1e+133)
tmp = x * ((y / c) / (z / 9.0));
elseif (t_1 <= 1e+94)
tmp = ((b / z) - (4.0 * (a * t))) / c;
elseif (t_1 <= 5e+193)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = x * ((y * (9.0 / z)) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+133], N[(x * N[(N[(y / c), $MachinePrecision] / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+94], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 5e+193], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(9.0 / z), $MachinePrecision]), $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}\;t\_1 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;x \cdot \frac{\frac{y}{c}}{\frac{z}{9}}\\
\mathbf{elif}\;t\_1 \leq 10^{+94}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+193}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \frac{9}{z}}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
Simplified72.8%
Taylor expanded in x around inf 59.4%
*-commutative59.4%
associate-/l*72.7%
associate-*l*72.8%
*-commutative72.8%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.6%
*-commutative72.6%
Simplified72.6%
clear-num72.6%
inv-pow72.6%
*-commutative72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
pow172.6%
un-div-inv72.8%
associate-/l*72.7%
Applied egg-rr72.7%
unpow172.7%
associate-/r*77.3%
Simplified77.3%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e94Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*80.7%
*-commutative80.7%
associate-+l-80.7%
associate-*l*80.7%
associate-*l*81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in x around 0 89.3%
Taylor expanded in x around 0 84.4%
Taylor expanded in c around 0 84.0%
if 1e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999972e193Initial program 90.1%
associate-+l-90.1%
*-commutative90.1%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
Simplified85.3%
Taylor expanded in t around 0 75.4%
+-commutative75.4%
*-commutative75.4%
Simplified75.4%
if 4.99999999999999972e193 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 60.3%
associate-+l-60.3%
*-commutative60.3%
associate-*r*60.3%
*-commutative60.3%
associate-+l-60.3%
Simplified60.5%
Taylor expanded in x around inf 47.0%
*-commutative47.0%
associate-/l*56.8%
associate-*l*56.7%
*-commutative56.7%
associate-*r/56.7%
*-commutative56.7%
associate-/l*56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in y around 0 56.7%
associate-*r/56.7%
*-commutative56.7%
times-frac69.9%
associate-*l/66.7%
Simplified66.7%
Final simplification80.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
(let* ((t_1 (* y (* 9.0 x))))
(if (or (<= t_1 -5e+97) (not (<= t_1 2e+95)))
(/ (- (* 9.0 (* (/ y z) x)) (* t (* 4.0 a))) c)
(- (/ 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 t_1 = y * (9.0 * x);
double tmp;
if ((t_1 <= -5e+97) || !(t_1 <= 2e+95)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if ((t_1 <= (-5d+97)) .or. (.not. (t_1 <= 2d+95))) then
tmp = ((9.0d0 * ((y / z) * x)) - (t * (4.0d0 * a))) / c
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 t_1 = y * (9.0 * x);
double tmp;
if ((t_1 <= -5e+97) || !(t_1 <= 2e+95)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} 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): t_1 = y * (9.0 * x) tmp = 0 if (t_1 <= -5e+97) or not (t_1 <= 2e+95): tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c 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) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if ((t_1 <= -5e+97) || !(t_1 <= 2e+95)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / z) * x)) - Float64(t * Float64(4.0 * a))) / c); else tmp = Float64(Float64(b / Float64(z * c)) - 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 ((t_1 <= -5e+97) || ~((t_1 <= 2e+95)))
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
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_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+97], N[Not[LessEqual[t$95$1, 2e+95]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+97} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{9 \cdot \left(\frac{y}{z} \cdot x\right) - t \cdot \left(4 \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.99999999999999999e97 or 2.00000000000000004e95 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
associate-*l*70.8%
associate-*l*71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in x around 0 62.1%
Taylor expanded in c around 0 69.1%
Taylor expanded in b around 0 68.6%
*-commutative68.6%
associate-*r/80.2%
associate-*r*80.2%
*-commutative80.2%
Simplified80.2%
if -4.99999999999999999e97 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000004e95Initial program 83.2%
associate-+l-83.2%
*-commutative83.2%
associate-*r*80.8%
*-commutative80.8%
associate-+l-80.8%
associate-*l*80.8%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x around 0 89.6%
Taylor expanded in x around 0 85.3%
Final simplification83.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))))
(if (<= t_1 -1e+133)
(* x (/ (/ y c) (/ z 9.0)))
(if (<= t_1 2e+132)
(- (/ b (* z c)) (* 4.0 (/ (* a t) c)))
(/ (* y (+ (* 9.0 (/ x c)) (/ b (* y 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 2e+132) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else {
tmp = (y * ((9.0 * (x / c)) + (b / (y * 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) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-1d+133)) then
tmp = x * ((y / c) / (z / 9.0d0))
else if (t_1 <= 2d+132) then
tmp = (b / (z * c)) - (4.0d0 * ((a * t) / c))
else
tmp = (y * ((9.0d0 * (x / c)) + (b / (y * 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 t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 2e+132) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else {
tmp = (y * ((9.0 * (x / c)) + (b / (y * 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): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -1e+133: tmp = x * ((y / c) / (z / 9.0)) elif t_1 <= 2e+132: tmp = (b / (z * c)) - (4.0 * ((a * t) / c)) else: tmp = (y * ((9.0 * (x / c)) + (b / (y * 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) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -1e+133) tmp = Float64(x * Float64(Float64(y / c) / Float64(z / 9.0))); elseif (t_1 <= 2e+132) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(Float64(a * t) / c))); else tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c)) + Float64(b / Float64(y * 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)
t_1 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -1e+133)
tmp = x * ((y / c) / (z / 9.0));
elseif (t_1 <= 2e+132)
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
else
tmp = (y * ((9.0 * (x / c)) + (b / (y * 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_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+133], N[(x * N[(N[(y / c), $MachinePrecision] / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+132], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(9.0 * N[(x / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;x \cdot \frac{\frac{y}{c}}{\frac{z}{9}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+132}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c} + \frac{b}{y \cdot c}\right)}{z}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
Simplified72.8%
Taylor expanded in x around inf 59.4%
*-commutative59.4%
associate-/l*72.7%
associate-*l*72.8%
*-commutative72.8%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.6%
*-commutative72.6%
Simplified72.6%
clear-num72.6%
inv-pow72.6%
*-commutative72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
pow172.6%
un-div-inv72.8%
associate-/l*72.7%
Applied egg-rr72.7%
unpow172.7%
associate-/r*77.3%
Simplified77.3%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999998e132Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.2%
associate-*l*83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in x around 0 89.3%
Taylor expanded in x around 0 83.2%
if 1.99999999999999998e132 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 65.5%
associate-+l-65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
associate-+l-65.5%
associate-*l*65.5%
associate-*l*65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y around inf 74.1%
Taylor expanded in z around 0 70.5%
Final simplification80.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
(let* ((t_1 (/ (+ b (* 9.0 (* y x))) (* z c))))
(if (<= t -8.8e+172)
(* -4.0 (/ 1.0 (/ 1.0 (* a (/ t c)))))
(if (<= t -3.3e+71)
t_1
(if (<= t -3.5e+33)
(* -4.0 (/ 1.0 (/ (/ c t) a)))
(if (<= t 2.2e-138) t_1 (* t (/ -4.0 (/ c a)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (y * x))) / (z * c);
double tmp;
if (t <= -8.8e+172) {
tmp = -4.0 * (1.0 / (1.0 / (a * (t / c))));
} else if (t <= -3.3e+71) {
tmp = t_1;
} else if (t <= -3.5e+33) {
tmp = -4.0 * (1.0 / ((c / t) / a));
} else if (t <= 2.2e-138) {
tmp = t_1;
} else {
tmp = t * (-4.0 / (c / a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b + (9.0d0 * (y * x))) / (z * c)
if (t <= (-8.8d+172)) then
tmp = (-4.0d0) * (1.0d0 / (1.0d0 / (a * (t / c))))
else if (t <= (-3.3d+71)) then
tmp = t_1
else if (t <= (-3.5d+33)) then
tmp = (-4.0d0) * (1.0d0 / ((c / t) / a))
else if (t <= 2.2d-138) then
tmp = t_1
else
tmp = t * ((-4.0d0) / (c / a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (y * x))) / (z * c);
double tmp;
if (t <= -8.8e+172) {
tmp = -4.0 * (1.0 / (1.0 / (a * (t / c))));
} else if (t <= -3.3e+71) {
tmp = t_1;
} else if (t <= -3.5e+33) {
tmp = -4.0 * (1.0 / ((c / t) / a));
} else if (t <= 2.2e-138) {
tmp = t_1;
} else {
tmp = t * (-4.0 / (c / a));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (9.0 * (y * x))) / (z * c) tmp = 0 if t <= -8.8e+172: tmp = -4.0 * (1.0 / (1.0 / (a * (t / c)))) elif t <= -3.3e+71: tmp = t_1 elif t <= -3.5e+33: tmp = -4.0 * (1.0 / ((c / t) / a)) elif t <= 2.2e-138: tmp = t_1 else: tmp = t * (-4.0 / (c / a)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)) tmp = 0.0 if (t <= -8.8e+172) tmp = Float64(-4.0 * Float64(1.0 / Float64(1.0 / Float64(a * Float64(t / c))))); elseif (t <= -3.3e+71) tmp = t_1; elseif (t <= -3.5e+33) tmp = Float64(-4.0 * Float64(1.0 / Float64(Float64(c / t) / a))); elseif (t <= 2.2e-138) tmp = t_1; else tmp = Float64(t * Float64(-4.0 / Float64(c / a))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (9.0 * (y * x))) / (z * c);
tmp = 0.0;
if (t <= -8.8e+172)
tmp = -4.0 * (1.0 / (1.0 / (a * (t / c))));
elseif (t <= -3.3e+71)
tmp = t_1;
elseif (t <= -3.5e+33)
tmp = -4.0 * (1.0 / ((c / t) / a));
elseif (t <= 2.2e-138)
tmp = t_1;
else
tmp = t * (-4.0 / (c / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+172], N[(-4.0 * N[(1.0 / N[(1.0 / N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.3e+71], t$95$1, If[LessEqual[t, -3.5e+33], N[(-4.0 * N[(1.0 / N[(N[(c / t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-138], t$95$1, N[(t * N[(-4.0 / N[(c / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{+172}:\\
\;\;\;\;-4 \cdot \frac{1}{\frac{1}{a \cdot \frac{t}{c}}}\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{+33}:\\
\;\;\;\;-4 \cdot \frac{1}{\frac{\frac{c}{t}}{a}}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-4}{\frac{c}{a}}\\
\end{array}
\end{array}
if t < -8.8000000000000005e172Initial program 66.4%
associate-+l-66.4%
*-commutative66.4%
associate-*r*72.8%
*-commutative72.8%
associate-+l-72.8%
Simplified76.3%
Taylor expanded in t around inf 67.0%
clear-num66.9%
inv-pow66.9%
*-commutative66.9%
Applied egg-rr66.9%
unpow-166.9%
*-commutative66.9%
Simplified66.9%
clear-num67.0%
associate-*r/79.3%
inv-pow79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
if -8.8000000000000005e172 < t < -3.2999999999999998e71 or -3.5000000000000001e33 < t < 2.1999999999999999e-138Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*80.1%
*-commutative80.1%
associate-+l-80.1%
Simplified80.1%
Taylor expanded in t around 0 66.4%
+-commutative66.4%
*-commutative66.4%
Simplified66.4%
if -3.2999999999999998e71 < t < -3.5000000000000001e33Initial program 68.1%
associate-+l-68.1%
*-commutative68.1%
associate-*r*68.3%
*-commutative68.3%
associate-+l-68.3%
Simplified68.3%
Taylor expanded in t around inf 45.6%
clear-num45.6%
inv-pow45.6%
*-commutative45.6%
Applied egg-rr45.6%
unpow-145.6%
associate-/r*56.3%
Simplified56.3%
if 2.1999999999999999e-138 < t Initial program 74.0%
associate-+l-74.0%
*-commutative74.0%
associate-*r*74.0%
*-commutative74.0%
associate-+l-74.0%
Simplified74.2%
Taylor expanded in t around inf 49.3%
clear-num49.2%
inv-pow49.2%
*-commutative49.2%
Applied egg-rr49.2%
unpow-149.2%
*-commutative49.2%
Simplified49.2%
un-div-inv49.2%
associate-/r*51.3%
Applied egg-rr51.3%
associate-/r/51.4%
Simplified51.4%
Final simplification62.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 (<= z -7.5e-16) (not (<= z 2.5e-71))) (/ (- (+ (/ b z) (* 9.0 (* (/ y z) x))) (* 4.0 (* a t))) c) (/ (+ b (* t (- (* 9.0 (/ (* y x) t)) (* 4.0 (* z 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 ((z <= -7.5e-16) || !(z <= 2.5e-71)) {
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (t * ((9.0 * ((y * x) / t)) - (4.0 * (z * 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 ((z <= (-7.5d-16)) .or. (.not. (z <= 2.5d-71))) then
tmp = (((b / z) + (9.0d0 * ((y / z) * x))) - (4.0d0 * (a * t))) / c
else
tmp = (b + (t * ((9.0d0 * ((y * x) / t)) - (4.0d0 * (z * 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 ((z <= -7.5e-16) || !(z <= 2.5e-71)) {
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (t * ((9.0 * ((y * x) / t)) - (4.0 * (z * 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 (z <= -7.5e-16) or not (z <= 2.5e-71): tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c else: tmp = (b + (t * ((9.0 * ((y * x) / t)) - (4.0 * (z * 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 ((z <= -7.5e-16) || !(z <= 2.5e-71)) tmp = Float64(Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(y / z) * x))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(t * Float64(Float64(9.0 * Float64(Float64(y * x) / t)) - Float64(4.0 * Float64(z * 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 ((z <= -7.5e-16) || ~((z <= 2.5e-71)))
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
else
tmp = (b + (t * ((9.0 * ((y * x) / t)) - (4.0 * (z * 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[Or[LessEqual[z, -7.5e-16], N[Not[LessEqual[z, 2.5e-71]], $MachinePrecision]], N[(N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(t * N[(N[(9.0 * N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * a), $MachinePrecision]), $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.5 \cdot 10^{-16} \lor \neg \left(z \leq 2.5 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{\left(\frac{b}{z} + 9 \cdot \left(\frac{y}{z} \cdot x\right)\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + t \cdot \left(9 \cdot \frac{y \cdot x}{t} - 4 \cdot \left(z \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.5e-16 or 2.49999999999999999e-71 < z Initial program 68.1%
associate-+l-68.1%
*-commutative68.1%
associate-*r*65.6%
*-commutative65.6%
associate-+l-65.6%
associate-*l*65.6%
associate-*l*70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in x around 0 81.2%
Taylor expanded in c around 0 88.8%
associate-*r/95.9%
*-commutative95.9%
Applied egg-rr95.9%
if -7.5e-16 < z < 2.49999999999999999e-71Initial program 93.9%
associate-+l-93.9%
*-commutative93.9%
associate-*r*94.3%
*-commutative94.3%
associate-+l-94.3%
associate-*l*94.3%
associate-*l*89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in t around inf 91.3%
Final simplification94.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
(let* ((t_1 (* y (* 9.0 x))))
(if (<= t_1 -1e+133)
(* x (/ (/ y c) (/ z 9.0)))
(if (<= t_1 1e+147)
(- (/ b (* z c)) (* 4.0 (/ (* a t) c)))
(* x (/ (* y (/ 9.0 z)) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 1e+147) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if (t_1 <= (-1d+133)) then
tmp = x * ((y / c) / (z / 9.0d0))
else if (t_1 <= 1d+147) then
tmp = (b / (z * c)) - (4.0d0 * ((a * t) / c))
else
tmp = x * ((y * (9.0d0 / z)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if (t_1 <= -1e+133) {
tmp = x * ((y / c) / (z / 9.0));
} else if (t_1 <= 1e+147) {
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
} else {
tmp = x * ((y * (9.0 / z)) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) tmp = 0 if t_1 <= -1e+133: tmp = x * ((y / c) / (z / 9.0)) elif t_1 <= 1e+147: tmp = (b / (z * c)) - (4.0 * ((a * t) / c)) else: tmp = x * ((y * (9.0 / z)) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_1 <= -1e+133) tmp = Float64(x * Float64(Float64(y / c) / Float64(z / 9.0))); elseif (t_1 <= 1e+147) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(Float64(a * t) / c))); else tmp = Float64(x * Float64(Float64(y * Float64(9.0 / 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 = y * (9.0 * x);
tmp = 0.0;
if (t_1 <= -1e+133)
tmp = x * ((y / c) / (z / 9.0));
elseif (t_1 <= 1e+147)
tmp = (b / (z * c)) - (4.0 * ((a * t) / c));
else
tmp = x * ((y * (9.0 / z)) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+133], N[(x * N[(N[(y / c), $MachinePrecision] / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+147], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y * N[(9.0 / z), $MachinePrecision]), $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}\;t\_1 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;x \cdot \frac{\frac{y}{c}}{\frac{z}{9}}\\
\mathbf{elif}\;t\_1 \leq 10^{+147}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y \cdot \frac{9}{z}}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 68.7%
associate-+l-68.7%
*-commutative68.7%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
Simplified72.8%
Taylor expanded in x around inf 59.4%
*-commutative59.4%
associate-/l*72.7%
associate-*l*72.8%
*-commutative72.8%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.6%
*-commutative72.6%
Simplified72.6%
clear-num72.6%
inv-pow72.6%
*-commutative72.6%
Applied egg-rr72.6%
unpow-172.6%
Simplified72.6%
pow172.6%
un-div-inv72.8%
associate-/l*72.7%
Applied egg-rr72.7%
unpow172.7%
associate-/r*77.3%
Simplified77.3%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999998e146Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*81.7%
*-commutative81.7%
associate-+l-81.7%
associate-*l*81.6%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in x around 0 89.5%
Taylor expanded in x around 0 82.5%
if 9.9999999999999998e146 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 61.7%
associate-+l-61.7%
*-commutative61.7%
associate-*r*61.7%
*-commutative61.7%
associate-+l-61.7%
Simplified61.9%
Taylor expanded in x around inf 50.6%
*-commutative50.6%
associate-/l*58.7%
associate-*l*58.6%
*-commutative58.6%
associate-*r/58.6%
*-commutative58.6%
associate-/l*58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in y around 0 58.6%
associate-*r/58.6%
*-commutative58.6%
times-frac69.6%
associate-*l/66.9%
Simplified66.9%
Final simplification79.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.8e-35) (not (<= z 4.4e-35))) (/ (- (+ (/ b z) (* 9.0 (* (/ y z) x))) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.8e-35) || !(z <= 4.4e-35)) {
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.8d-35)) .or. (.not. (z <= 4.4d-35))) then
tmp = (((b / z) + (9.0d0 * ((y / z) * x))) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.8e-35) || !(z <= 4.4e-35)) {
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.8e-35) or not (z <= 4.4e-35): tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.8e-35) || !(z <= 4.4e-35)) tmp = Float64(Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(y / z) * x))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.8e-35) || ~((z <= 4.4e-35)))
tmp = (((b / z) + (9.0 * ((y / z) * x))) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.8e-35], N[Not[LessEqual[z, 4.4e-35]], $MachinePrecision]], N[(N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $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 -1.8 \cdot 10^{-35} \lor \neg \left(z \leq 4.4 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{\left(\frac{b}{z} + 9 \cdot \left(\frac{y}{z} \cdot x\right)\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.80000000000000009e-35 or 4.39999999999999987e-35 < z Initial program 66.3%
associate-+l-66.3%
*-commutative66.3%
associate-*r*63.8%
*-commutative63.8%
associate-+l-63.8%
associate-*l*63.7%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around 0 79.7%
Taylor expanded in c around 0 87.4%
associate-*r/94.7%
*-commutative94.7%
Applied egg-rr94.7%
if -1.80000000000000009e-35 < z < 4.39999999999999987e-35Initial program 95.9%
Final simplification95.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 (or (<= z -2.5e+127) (not (<= z 4.4e+153))) (/ (- (* 9.0 (* (/ y z) x)) (* t (* 4.0 a))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+127) || !(z <= 4.4e+153)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+127)) .or. (.not. (z <= 4.4d+153))) then
tmp = ((9.0d0 * ((y / z) * x)) - (t * (4.0d0 * a))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+127) || !(z <= 4.4e+153)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+127) or not (z <= 4.4e+153): tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+127) || !(z <= 4.4e+153)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / z) * x)) - Float64(t * Float64(4.0 * a))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+127) || ~((z <= 4.4e+153)))
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+127], N[Not[LessEqual[z, 4.4e+153]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $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 -2.5 \cdot 10^{+127} \lor \neg \left(z \leq 4.4 \cdot 10^{+153}\right):\\
\;\;\;\;\frac{9 \cdot \left(\frac{y}{z} \cdot x\right) - t \cdot \left(4 \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.5000000000000002e127 or 4.3999999999999999e153 < z Initial program 49.1%
associate-+l-49.1%
*-commutative49.1%
associate-*r*44.2%
*-commutative44.2%
associate-+l-44.2%
associate-*l*44.2%
associate-*l*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around 0 75.7%
Taylor expanded in c around 0 85.5%
Taylor expanded in b around 0 70.0%
*-commutative70.0%
associate-*r/82.5%
associate-*r*82.5%
*-commutative82.5%
Simplified82.5%
if -2.5000000000000002e127 < z < 4.3999999999999999e153Initial program 91.5%
Final simplification88.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 (if (or (<= z -1.65e+130) (not (<= z 1.8e+154))) (/ (- (* 9.0 (* (/ y z) x)) (* t (* 4.0 a))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.65e+130) || !(z <= 1.8e+154)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.65d+130)) .or. (.not. (z <= 1.8d+154))) then
tmp = ((9.0d0 * ((y / z) * x)) - (t * (4.0d0 * a))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.65e+130) || !(z <= 1.8e+154)) {
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.65e+130) or not (z <= 1.8e+154): tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.65e+130) || !(z <= 1.8e+154)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / z) * x)) - Float64(t * Float64(4.0 * a))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.65e+130) || ~((z <= 1.8e+154)))
tmp = ((9.0 * ((y / z) * x)) - (t * (4.0 * a))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.65e+130], N[Not[LessEqual[z, 1.8e+154]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+130} \lor \neg \left(z \leq 1.8 \cdot 10^{+154}\right):\\
\;\;\;\;\frac{9 \cdot \left(\frac{y}{z} \cdot x\right) - t \cdot \left(4 \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.65e130 or 1.8e154 < z Initial program 49.1%
associate-+l-49.1%
*-commutative49.1%
associate-*r*44.2%
*-commutative44.2%
associate-+l-44.2%
associate-*l*44.2%
associate-*l*51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around 0 75.7%
Taylor expanded in c around 0 85.5%
Taylor expanded in b around 0 70.0%
*-commutative70.0%
associate-*r/82.5%
associate-*r*82.5%
*-commutative82.5%
Simplified82.5%
if -1.65e130 < z < 1.8e154Initial program 91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.6%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Final simplification87.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1.5e+143) (not (<= b 2.9e+153))) (/ (/ b c) z) (* a (/ (* t -4.0) 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.5e+143) || !(b <= 2.9e+153)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / 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.5d+143)) .or. (.not. (b <= 2.9d+153))) then
tmp = (b / c) / z
else
tmp = a * ((t * (-4.0d0)) / 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.5e+143) || !(b <= 2.9e+153)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / 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.5e+143) or not (b <= 2.9e+153): tmp = (b / c) / z else: tmp = a * ((t * -4.0) / 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.5e+143) || !(b <= 2.9e+153)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(Float64(t * -4.0) / 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.5e+143) || ~((b <= 2.9e+153)))
tmp = (b / c) / z;
else
tmp = a * ((t * -4.0) / 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.5e+143], N[Not[LessEqual[b, 2.9e+153]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(N[(t * -4.0), $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.5 \cdot 10^{+143} \lor \neg \left(b \leq 2.9 \cdot 10^{+153}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if b < -1.5e143 or 2.90000000000000002e153 < b Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
associate-*l*83.3%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in x around 0 73.0%
Taylor expanded in c around 0 70.5%
associate-*r/74.5%
*-commutative74.5%
Applied egg-rr74.5%
Taylor expanded in b around inf 63.5%
associate-/r*69.5%
Simplified69.5%
if -1.5e143 < b < 2.90000000000000002e153Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*74.4%
*-commutative74.4%
associate-+l-74.4%
Simplified75.0%
Taylor expanded in t around inf 49.0%
*-commutative49.0%
associate-/l*49.5%
associate-*r*49.5%
*-commutative49.5%
*-commutative49.5%
associate-*l/49.5%
Simplified49.5%
Final simplification54.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 (or (<= b -5e+144) (not (<= b 4.9e+151))) (/ (/ b c) z) (* -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 <= -5e+144) || !(b <= 4.9e+151)) {
tmp = (b / c) / z;
} 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 <= (-5d+144)) .or. (.not. (b <= 4.9d+151))) then
tmp = (b / c) / z
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 <= -5e+144) || !(b <= 4.9e+151)) {
tmp = (b / c) / z;
} 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 <= -5e+144) or not (b <= 4.9e+151): tmp = (b / c) / z 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 <= -5e+144) || !(b <= 4.9e+151)) tmp = Float64(Float64(b / c) / z); 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 <= -5e+144) || ~((b <= 4.9e+151)))
tmp = (b / c) / z;
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, -5e+144], N[Not[LessEqual[b, 4.9e+151]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $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 -5 \cdot 10^{+144} \lor \neg \left(b \leq 4.9 \cdot 10^{+151}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if b < -4.9999999999999999e144 or 4.8999999999999999e151 < b Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
associate-*l*83.3%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in x around 0 73.0%
Taylor expanded in c around 0 70.5%
associate-*r/74.5%
*-commutative74.5%
Applied egg-rr74.5%
Taylor expanded in b around inf 63.5%
associate-/r*69.5%
Simplified69.5%
if -4.9999999999999999e144 < b < 4.8999999999999999e151Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*74.4%
*-commutative74.4%
associate-+l-74.4%
Simplified75.0%
Taylor expanded in t around inf 49.0%
Final simplification54.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 (<= c 8.6e-253) (/ b (* z c)) (/ (/ b c) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 8.6e-253) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 8.6d-253) then
tmp = b / (z * c)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 8.6e-253) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if c <= 8.6e-253: tmp = b / (z * c) else: tmp = (b / c) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 8.6e-253) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (c <= 8.6e-253)
tmp = b / (z * c);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 8.6e-253], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 8.6 \cdot 10^{-253}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if c < 8.6000000000000003e-253Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
Simplified79.8%
Taylor expanded in b around inf 38.5%
*-commutative38.5%
Simplified38.5%
if 8.6000000000000003e-253 < c Initial program 74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.0%
*-commutative74.0%
associate-+l-74.0%
associate-*l*74.0%
associate-*l*74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in x around 0 75.6%
Taylor expanded in c around 0 78.3%
associate-*r/82.0%
*-commutative82.0%
Applied egg-rr82.0%
Taylor expanded in b around inf 24.8%
associate-/r*29.8%
Simplified29.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ 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 78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
Simplified77.2%
Taylor expanded in b around inf 32.3%
*-commutative32.3%
Simplified32.3%
(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 2024193
(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)))