Re: How to prevent division by zero?

new topic     » goto parent     » topic index » view thread      » older message » newer message
SnakeCharmer said...

I need to prevent division by zero.

This should be enough ...

include std/math.e 
if x = 0  
  y = PINF -- Positive infinity 
else 
  y = 1 / x 
end if 

[/quote]

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu