Moonsoft Software Solutions

division by zero

Started 10 Jan 2014 · 1 reply

  1. moon_1407
    I am trying to output a result from an equation and keep getting a "division by zero" error. None of the calculations results in zero in denominator. Please help.
  2. Moonsoft support
    Hi,
    there must be a division by zero resulting at your code. We suggest to double-check your inputs, maybe you can comment out the division line and print the operands at the output to confirm they have the value expected.

    Any typo at a name variable can also cause the value to behave as 0. For ex, with a field named input1

    $result=100/$input_1; //this will cause a division by 0 error

    Hope this helps, regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket