Functions to calculate a 4th variable give only 3 variables.  That is, if given principal amount, interest rate, and payment amount, calculate time period. Any combination of three variables will yield the 4th missing variable.  Written in Java.  Eventually intended to be the core of an Android app.