Division by Zero Error
m.schonewille at economy-x-talk.com
Sat Jul 8 09:03:17 CEST 2017
Usually, I can predict that a numerator is going to be 0, e.g. in
1/(x^2). I just check the value of the numerator before doing the division.
In rare cases, I can't predict the value of the numerator. In those
cases, I put a try control structure around the offending lines and some
code to clean up after the "final" line.
Buy the most extensive book on the
Op 08-Jul-17 om 05:35 schreef Roger Guay via use-livecode:
> I often find that I have to deal with a division by zero error message in plotting functions, solving equation etc. Are there methods or techniques used to programmatically handle or work-around a possible division by zero? e.g. If I want to evaluate y= 1/(x-3), what can I do to deal with a possible x=3 situation?
> Thanks for your help,
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode