📄 batmath.c
字号:
throw(MAL, "batcalc.exp","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_exp", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: exp(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 179 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_log(int *ret, int *bid);str CMDsciencevoid_log(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.log", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.log","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_log", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: log(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 180 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_log10(int *ret, int *bid);str CMDsciencevoid_log10(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.log10", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.log10","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_log10", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: log10(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 181 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_sqrt(int *ret, int *bid);str CMDsciencevoid_sqrt(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.sqrt", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.sqrt","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_sqrt", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: sqrt(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 182 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_ceil(int *ret, int *bid);str CMDsciencevoid_ceil(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.ceil", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.ceil","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_ceil", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: ceil(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 183 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_fabs(int *ret, int *bid);str CMDsciencevoid_fabs(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.fabs", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.fabs","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_fabs", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: fabs(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 184 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 102 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDsciencevoid_floor(int *ret, int *bid);str CMDsciencevoid_floor(int *ret, int *bid){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.floor", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.floor","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_floor", "can not create bat");}#line 118 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: floor(*(dbl*)p); p+= xx; } *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 185 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 190 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 135 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDscience_fmod(int *ret, int *bid, dbl *d);str CMDscience_fmod(int *ret, int *bid, dbl *d){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.fmod", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.fmod","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_fmod", "can not create bat");}#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: fmod(*(dbl*)p,*d); p+=xx; } if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 190 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 135 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDscience_atan2(int *ret, int *bid, dbl *d);str CMDscience_atan2(int *ret, int *bid, dbl *d){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.atan2", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.atan2","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_atan2", "can not create bat");}#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: atan2(*(dbl*)p,*d); p+=xx; } if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 191 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 135 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"batmath_export str CMDscience_pow(int *ret, int *bid, dbl *d);str CMDscience_pow(int *ret, int *bid, dbl *d){ BAT *b,*bn; dbl *o; BUN p,q; size_t xx; if( (b= BATdescriptor(*bid)) == NULL ){ throw(MAL, "batcalc.pow", "Cannot access descriptor"); } if( BUNsize(b) != sizeof(dbl)){ BBPreleaseref(b->batCacheid); throw(MAL, "batcalc.pow","Unexpected type"); } bn= BATMATHresult(b, TYPE_dbl); #line 23 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"if( bn== NULL) {*ret= 0; throw(MAL, "batcalc.CMDscience_pow", "can not create bat");}#line 151 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx" o = (dbl*) BUNtail(bn, BUNfirst(bn)); xx= BUNsize(b); p = BUNtail(b, BUNfirst(b)); q = BUNtail(b, BUNlast(b)); while(p<q){ *o++ = *(dbl*)p== dbl_nil? dbl_nil: pow(*(dbl*)p,*d); p+=xx; } if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); *ret= bn->batCacheid; BBPkeepref(*ret); BBPreleaseref(b->batCacheid); return MAL_SUCCEED;}#line 192 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"#line 195 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/modules/kernel/batmath.mx"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -