Compound Interest - help needed for decimals.....

Discussion in 'Tally Developer' started by Amit Kamdar, Mar 19, 2018.

    
  1. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear All Experts,

    Am new in TDL and progressing nicely and more or less I am expanding on projects-TDL made by others to suit my needs.

    Below is the Code which I have expanded but originally made in simple form by some other guy, whose ID i am not aware as i have downloaded it in a zip file. So due credit goes to the original developer.

    The code is for calculating Compound Interest (CI) on monthly, quarterly, half-yearly and yearly basis. Tally-TDL is rounding off the exponential to 2 decimals. Let me explain as below.

    Assume -Principal as 1,25,000/-, ROI as 8% and period as 5 years......

    Exponential ROI for Monthly..... 1.489846 x 1,25,000/- = 1,86,231/- (Int-61233/-)
    Exponential ROI for Quarterly......1.485947 x 1,25,000/- = 1,85,741/- (Int-60741/-)
    Exponential ROI for Half-Yearly.....1.480244 x 1,25,000/- = 1,85,024/- (Int-60024/-)
    Exponential ROI for Yearly.....1.469328 x 1,25,000/- = 1,83,668/- (Int-58668/-)

    However, if you run the code...tally rounds of exponential ROI as 1.49, 1.49, 1.48 and 1.46 respectively

    And it gives the figure as 61,250/-, 61,250/-, 60,000/- and 58,750/- as Interest respectively.

    From the attached code, can the EXPERTS show me how to make Tally take the ROI upto 4 or 6 decimals, so that the actual figures of Compounded Interest is arrived at.

    here is the code attached....

    Help will be greatly appreciated.

    Thanks in Advance.
     

    Attached Files:



Share This Page