Present value of a future sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due.