Use Singeli float binary search
This commit is contained in:
parent
ee84f9fe1f
commit
5424c57b7e
@ -350,7 +350,22 @@ B GRADE_CAT(c2)(B t, B w, B x) {
|
||||
if (LIKELY(we<el_B & xe<el_B)) {
|
||||
if (elNum(we)) { // number
|
||||
if (elNum(xe)) {
|
||||
if (!elInt(we) | !elInt(xe)) goto gen;
|
||||
if (!elInt(we) | !elInt(xe)) {
|
||||
#if SINGELI
|
||||
if (we<=el_f64 && xe<=el_f64) {
|
||||
w=toF64Any(w); x=toF64Any(x);
|
||||
f64* wi = tyany_ptr(w);
|
||||
f64* xi = tyany_ptr(x);
|
||||
if (CHECK_VALID && !FL_HAS(w,fl)) {
|
||||
for (i64 i = 0; i < (i64)wia-1; i++) if (wi[i] GRADE_UD(>,<) wi[i+1]) thrM(GRADE_CHR": 𝕨 must be sorted"GRADE_UD(," in descending order"));
|
||||
FL_SET(w, fl);
|
||||
}
|
||||
si_bins[3*2 + GRADE_UD(0,1)](wi, wia, xi, xia, rp);
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
goto gen;
|
||||
}
|
||||
w=toI32Any(w); x=toI32Any(x);
|
||||
} else {
|
||||
for (u64 i=0; i<xia; i++) rp[i]=wia;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user