This diagram is from an HP-12C Manual on the formulas used for compound interest:

The HP 12C uses these formulas when calculating the TVM values. The first formula is only used when "n" is an integer. (Actually, formulas 2 and 3 equal formula 1 for integer n).
The second and third formulas are used when there is a fractional part to "n". The second formula uses simple interest from the fractional part, the third formula uses compound interest for the fractional part.
Financial calculators (that I know of) made after the 12C (10bii, 17bii, TI BA) use the first formula if "n" is an integer or has fractional parts.