fixed bug for threshold setting

all functions receiving t_float or float must receive double (this
needs to be changed in all the externals)