in static double speed(double d, double mu) - "v" is easy to find as quadratic equation root, without E and W could you advise how it is possible to include cmath for sqrt() function?
add: oups, sqrt() is also needed if going through E = 0.5mv**2. I can't include sqrt() function = "use of undeclared identifier 'sqrt'".
still there is a question - how many days must be considered in a year for end date (not interest) calculations - 360 or 365/366?
p.s. I do understand it should be as in a real life, but have doubt that interest is calculated within 360 days and end date must be added from 365/366 days/year.
Just to clear: 360 banking days doesn't mean that the same must be used at the end date calculations? I mean the dates must be "real", including leapyear consitions etc?
Because I got right days quantity, but not right end date, calculated with:
360 days in a year
12 months
30 days in a month
p.s. dateNbDays(100.0, 101.0, 0.98) means 01/07/2017 with 360 days calendar, and not 01/01/2017 as in sample test.
solved.
any help is appreciated, thank's!
in static double speed(double d, double mu) - "v" is easy to find as quadratic equation root, without E and W could you advise how it is possible to include cmath for sqrt() function?
add: oups, sqrt() is also needed if going through E = 0.5mv**2. I can't include sqrt() function = "use of undeclared identifier 'sqrt'".
As in real life. Use
date
functions of your language.Yes, it is banks:-)
still there is a question - how many days must be considered in a year for end date (not interest) calculations - 360 or 365/366?
p.s. I do understand it should be as in a real life, but have doubt that interest is calculated within 360 days and end date must be added from 365/366 days/year.
Maybe you should adapt your code, be sure that there is no error in the test. Cheers!
Just to clear: 360 banking days doesn't mean that the same must be used at the end date calculations? I mean the dates must be "real", including leapyear consitions etc?
Because I got right days quantity, but not right end date, calculated with:
p.s. dateNbDays(100.0, 101.0, 0.98) means 01/07/2017 with 360 days calendar, and not 01/01/2017 as in sample test.