int SVM_detect(svm_model * svm_mdl, float32_t * hog_vec, float32_t thres){ float32_t res = 0; float32_t tmp = 0; float32_t exp_val = 0.1234; int i, j; for(i = 0;i < SVSN;i++) { tmp = 0; for(j = 0; j < SVSL; j++) { tmp += kernel_rbf(((float *)svs_tmp_buf)[j],*(hog_vec + j)); } exp_val = (float32_t)((svm_mdl->gamma) * tmp); exp_val = (float32_t)(0.0 - exp_val); //exp(0.1234); //exp(exp_val); } return res; }
调用exp()函数时,如果传入变量,就跑到硬件中断,传入0.1234可以正常。迷茫