pv = float(input("Enter your present value here: "))
pmt = float(input("Enter your periodic payment in an annuity(PMT) here: "))
i = float(input("""Enter your periodic interest rate as decimal number
ex: 30% = 0.3
Enter your periodic interest rate here: """)
npgpv = -math.log( 1 - ( ( 1 * pv ) / pmt ) ) / math.log( 1 + i )
print("Result: ", npgpv)
it's giving me fallowing error:
npgpv = -math.log( 1 - ( i * pv ) )
ValueError: math domain error
What can I do to calculate this formula ?