Their gods do the math for them. Remember clerics and druids don't do the work, their gods GIVE the magic via the portfolios.
Bard Music has the formula hidden in the notes. Wasn't there a UA Bard that stated all this?
What about a cleric devoted to the Buddhism or another religion without gods, angles, or other divine beings?