Question: Execution of the program after the error message 'division by zero'

Hi,

I am writing a simple program on Maple with the command :

som:=0;

for a from 3000 to 5000 by 100 do

for b from 100 to 1000 by 100 do

for c from 3000 to 3000 by 100 do

for d from 1000 to 1000 by 100 do

for e from 1000 to 10000 by 1000 do

for f from 200 to 2000 by 100 do

for p from 1 to 10 by 1 do

tot:=0;

 

C2:=c*d-N^2*(f^2-b*d);

C3:=a*d-e*f;

C4:=c*e-N^2*(a*f-e*b);

 

if (C2>0 and C3>0 and C4>0)

then

print(a,b,c,d,e,f,p);

som:=som+1;

fi;

od;od;od;od;od;od;od;

som;

 

That gives me the error messsage: Error, numeric exception: division by zero

Is there a simple way to say to the program to continue to execute even it falls at some point to « bad » parameter constellations with division by zero ?

Thank you for your help !

Best regards,

Basak

Please Wait...