void polezero_comment_float(char *p, pzmeta_t *meta, pzcomment_t *c) { char *pp; char *s; int nerr; float *f; nerr = 1; f = (float *) ((void *) meta + c->off); pp = polezero_comment_token( p ); if(!pp || !*pp) { *f = 0.0; return; } s = strdup(pp); pp = s; /* Find the end of the number */ while(pp && is_numexp(*pp)) { pp++; } /* Truncate the string */ if(pp && *pp) { *pp = 0; } *f = cdouble(s, &nerr); free(s); s = NULL; if(nerr != 0) { fprintf(stdout, "polezero-comment: Error converting float: '%s'\n", p); *f = 0.0; } }
cdouble Bsemff_BCL::zparam(const double q2) const { const cdouble kq = sqrt(cdouble(mBpi2-q2)); return (kq-kt)/(kq+kt); }