[LON-CAPA-users] Illegal division by zero

Bob Gonzales rgonzal at binghamton.edu
Fri May 29 08:44:45 EDT 2015


Hi,

I've gotten a couple of email bombs on a problem where the error is
"Illegal division by zero".  The text of the message is:

Illegal division by zero at (eval 53074) line 5.

 occurred while running

$t2=&random(1,3);
$sub2=&choose($t2,"carbon","hydrogen","oxygen");
$f2=&choose($t2,20.0,24.0,2.0);
$ansb=($ansa/$f1)* $f2 * 6.0221e23;


The "Script Vars" in the message shows "$f1=6.0221e+23".  The actual code
defines $f1 as "6.0221e23" via a &choose function.

This has happened for 3 students on 3 different access servers.

Does anyone have any ideas about what's going on or what I'm doing wrong
here?

Thanks,
Bob Gonzales
Chemistry Dept
Binghamton University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20150529/d7d6f92c/attachment.html>


More information about the LON-CAPA-users mailing list