Division by Zero Error
Mark Schonewille
m.schonewille at economy-x-talk.com
Sat Jul 8 03:03:17 EDT 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.
Kind regards,
Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch
Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com
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,
>
> Roger
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list