View Single Post
Old 02-15-2020, 09:21 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The problem is that the addition has to be done in a similar way to the division. So, it should be:

Code:
program: divide(field("size"),add(field("#pages"),1));
But, that actually gives zero for everything as the "size" column is always zero. You need to use the booksize function:

Code:
program: divide(booksize(),add(field("#pages"),1));
"booksize()" is the size in bytes for one of the formats for the book. It looks like it is the size of the largest format.
davidfor is offline   Reply With Quote