CAMLprim value sunml_nvec_par_n_vdotprod(value vx, value vy) { CAMLparam2(vx, vy); realtype r = N_VDotProd_Parallel(NVEC_VAL(vx), NVEC_VAL(vy)); CAMLreturn(caml_copy_double(r)); }
CAMLprim value caml_div_float(value f, value g) { return caml_copy_double(Double_val(f) / Double_val(g)); }
CAMLprim value caml_acos_float(value f) { return caml_copy_double(acos(Double_val(f))); }
CAMLprim value caml_atan2_float(value f, value g) { return caml_copy_double(atan2(Double_val(f), Double_val(g))); }
CAMLprim value caml_log10_float(value f) { return caml_copy_double(log10(Double_val(f))); }
CAMLprim value caml_power_float(value f, value g) { return caml_copy_double(pow(Double_val(f), Double_val(g))); }
CAMLprim value caml_gc_minor_words(value v) { CAMLparam0 (); /* v is ignored */ CAMLreturn(caml_copy_double(caml_gc_minor_words_unboxed())); }
CAMLprim value caml_fmod_float(value f1, value f2) { return caml_copy_double(fmod(Double_val(f1), Double_val(f2))); }
CAMLprim value caml_copysign_float(value f, value g) { return caml_copy_double(caml_copysign(Double_val(f), Double_val(g))); }
/* dereference and return a datetime as epoch */ value caml_oci_get_date_as_double(value defs) { CAMLparam1(defs); oci_define_t d = Oci_defhandle_val(defs); CAMLreturn(caml_copy_double(ocidate_to_epoch(d.ptr))); }
CAMLprim value sunml_nvec_par_n_vminquotient(value vnum, value vdenom) { CAMLparam2(vnum, vdenom); realtype r = N_VMinQuotient_Parallel(NVEC_VAL(vnum), NVEC_VAL(vdenom)); CAMLreturn(caml_copy_double(r)); }
CAMLprim value sunml_nvec_par_n_vl1norm(value vx) { CAMLparam1(vx); realtype r = N_VL1Norm_Parallel(NVEC_VAL(vx)); CAMLreturn(caml_copy_double(r)); }
CAMLprim value sunml_nvec_par_n_vwl2norm(value vx, value vw) { CAMLparam2(vx, vw); realtype r = N_VWL2Norm_Parallel(NVEC_VAL(vx), NVEC_VAL(vw)); CAMLreturn(caml_copy_double(r)); }
CAMLprim value caml_exp_float(value f) { return caml_copy_double(exp(Double_val(f))); }
CAMLprim value float_of_int64(value v) { CAMLparam1(v); CAMLreturn (caml_copy_double((double)Int64_val(v))); }
CAMLprim value caml_floor_float(value f) { return caml_copy_double(floor(Double_val(f))); }
CAMLprim value float_of_uint128(value v) { CAMLparam1(v); CAMLreturn (caml_copy_double((double)Uint128_val(v))); }
CAMLprim value caml_ldexp_float(value f, value i) { return caml_copy_double(ldexp(Double_val(f), Int_val(i))); }
CAMLprim value caml_sfSprite_getScaleY(value sprite) { sfVector2f scale = sfSprite_getScale(SfSprite_val(sprite)); return caml_copy_double(scale.y); }
CAMLprim value caml_sqrt_float(value f) { return caml_copy_double(sqrt(Double_val(f))); }
CAMLprim value caml_sfSprite_getRotation(value sprite) { return caml_copy_double( sfSprite_getRotation(SfSprite_val(sprite))); }
CAMLprim value caml_tanh_float(value f) { return caml_copy_double(tanh(Double_val(f))); }
CAMLprim value caml_float_of_int(value n) { return caml_copy_double((double) Long_val(n)); }
CAMLprim value caml_atan_float(value f) { return caml_copy_double(atan(Double_val(f))); }
CAMLprim value caml_neg_float(value f) { return caml_copy_double(- Double_val(f)); }
CAMLprim value caml_ceil_float(value f) { return caml_copy_double(ceil(Double_val(f))); }
CAMLprim value ml_nvec_par_n_vmin(value vx) { CAMLparam1(vx); realtype r = N_VMin_Parallel(NVEC_VAL(vx)); CAMLreturn(caml_copy_double(r)); }