
January 6th, 2004, 03:19 PM
|
|
Junior Member
|
|
Join Date: Jan 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
floating-point division
I have the following code in a script:
Code:
' Pecentage Interest on Loan
YearlyInterestPercent = 6.5
' Get Annual Interst Rate from Interest Percentage
YearlyInterestRate = YearlyInterestPercent / 100
' Divide Yearly Interest Rate by 12
' to Get Monthly Interst Rate
MonthlyInterestRate = YearlyInterestRate / 12
These values are supplied by the user using a form but I made them static for this example. For some reason, when dividing the Yearly Interst rate by twelve, MonthlyInterestRate equals 5.41666666666667E-03. The result should be 0.005416667. Does anyone know what I can do to correct this?
|