Ad
  • Custom User Avatar

    Just a regular JS :)

  • Default User Avatar

    Thank you! :) it looks super cool :D

  • Custom User Avatar

    It's Code golf, and all the variable names are unicode characters.

  • Default User Avatar

    what is that? :) havent seen something like that ever :D how it is even working?

  • Default User Avatar

    So as many I figured it out that it was not a yearly compound but it was daily compound.
    Every days interest has to be added before calculating another days interest. Then it all adds up.

  • Default User Avatar

    Im super lost with this one. In the example of dateNbDays(100, 101, 0.98) i get an answer of 368 days instead of 366 days. I can not figure out the problem.
    In my understanding in 360 days the interest is going to be 0.98 so in total after 360 days there is going to be 100.98 in the bank. On day 361 from 100.98 i will start counting interst of 0.98/360(per day). Which makes 100.98*(0.98/36000)= 0.0027489/day of interest. So after 366 days I get 100.9964934, after 367 I get 100.9992423 and only after 368 days I get 101.0019912.
    Please let me know where my logic is bad as I can not see it. Thank you!