It's basically what you suggested with just the percent symbol added in but removing it didn't fix the problem.
Code:
program:
read = raw_field('#pages_read');
total = raw_field('#total_pages');
# if total <= 0 (or undefined), set read to 0
read = cmp(total, 0, 0, 0, read);
# make sure the dividend (total) != 0
total = cmp(total, 0, 1, 1, total);
percent = multiply(divide(read, total), 100);
cmp(percent, 0, '', '', format_number(percent, "{0:2d}%"))
The #pages_read and #total_pages custom columns are integers.