Division by Zero Error

hh hh at hyperhh.de
Sat Jul 8 03:08:43 EDT 2017


-- d0 is what you judge as "is at about zero" for your input
-- select it such in size, that you don't get an "overflow" or
-- such that 1/d0 is your max ± vertical plot value (= clipping)

function f3 x
   local d0=0.001 
   if abs(x-3) < d0 then
      return empty -- don't plot in case of an empty return
   else return 1/(x-3)
end f3





More information about the use-livecode mailing list