argv0{
0 / 0 = 0.

echo - You sent $calc(%sent / %total * 100) $+ % of the file

Pick one:

You sent 100% of the file
You sent NA% of the file
You sent 0% of the file
}


I see. You want 0 / 0 to be 0.

Then you will get correct answer for all positive values of %total, but now if %total is zero, then you get wrong answer if 0 / 0 = 0.

If 0 / 0 = 1, you will get correct answer for all positive values of %total, but also when %total is zero. If the file does not hold data, you have sent 100% of the file when you have sent 0 bytes of it.

Conclusion:

Your examples support my view that 0 / 0 = 1 is more meaningful than if 0 / 0 = 0.