A simple pure JavaScript present value calculator