Retard code monkey here.
I'm trying to find out how to create an algebraic function which would input the number of items a search query returned, and output the number of pages, given that X items per page are allowed. How do I do this?
I know how to do that using set builder notation, but this isn't what I need in this practical world.
ceil(number of items/X)
>>7788053
num_pg = 1 + ((items - 1) / X);