%%HP:T(3)F(.);

@ ACTFUNC - Miscellaneous actuarial functions for QLIB/48.
@
@ This directory contains HP 48 user-defined functions for various actuarial
@ functions not built into QLIB/48.  The function names can be used in
@ formulas and programs just like the built-in functions.  Only X table
@ functions are included here, but functions for the other tables (Y and J)
@ can be defined similarly.
@
@ You must install QLIB/48 before downloading this file.
@
@ Argument legend:
@    x  age
@    n  number of years to some future time
@    m  payment frequency (a nonzero integer), such as 12
@    p  percentage, such as 50 or 100

DIR

AX    @ AX(x) = net single premium for life ins paying $1 at end of yr of death
      \<< \-> x 'MX(x)/DX(x)' \>>

ACX   @ ACX(x) = net single premium for life ins paying $1 at moment of death
      @ assumes uniform distribution of deaths (UDD)
      \<< \-> x 'MMX(x,1E99)/DX(x)' \>>

EX    @ E(x,n) = n-year pure endowment at age x
      \<< \-> x n 'DX(x+n)/DX(x)' \>>

JS12  @ JS12(x,p) = p% Joint & Survivor annuity for primary annuitant (x)
      @ Pays full benefit until death of (x), and then p% of full benefit for
      @ for remainder of life of (y).  Payable monthly.
      @ Correct age difference (QXMY) must be set.
      \<< \-> x p 'JSM(x,p,12)' \>>

JSM   @ JSM(x,p,m) = p% Joint & Survivor annuity for primary annuitant (x)
      @ Payable (m)thly.  Correct age diff (QXMY) must be set.
      \<< \-> x p m 'CLMX(x,0,m) + p/100 * (CLMY(x-QXMY,0,m)-CLMJ(x,0,m))' \>>
