ffi: validate the value passed to the float setters