dc Remainder By Zero
This page answers questions like these:
- Why is dc saying “dc: remainder by zero”?
Related Links:
dc Non-zero Scale In Exponent
dc Stop Line Breaks
dc: remainder by zero
$ dc
0 sL
19 lL %
dc: remainder by zero
17 0 %
dc: remainder by zero
- % is the remainder operator. It’s similar to a modulo operator, but negative inputs will give negative outputs.
- If you get the “dc: remainder by zero” message, you are accidentally trying to divide by zero then get the remainder, but it’s not possible to divide by zero, so you get the cryptic error message instead.
- To stop this, fix your code so that you never attempt to calculate the remainder after division by zero. Maybe you have the arguments in the wrong order, or the operator in the wrong position?
- To get the equivalent of the modulus operator, you can use “VALUE MODULUS % MODULUS + MODULUS %”.
Related Links:
dc Non-zero Scale In Exponent
dc Stop Line Breaks
Home > Linux / Unix > dc Remainder By Zero
Tags: remainder by zero, dc remainder by zero, dc, linux, unix, solaris, bsd, aix
Copyright © HelpDoco.com
dc-remainder-by-zero.txt
Linux-Unix/dc-remainder-by-zero.htm
1