I have a problem with one macro. It is calculating incorrectly parameter julian_day. It is returning a value of 2452930.25, where it should return a value of 2452930.312847. The first part day_frac calculates ok, and returnes a value of 17.812847, and the second part floor(365.25*(year+4716.0)) + floor(30.6001*(month+1)) is returning a value of 2454450. Up to this point it is ok, then it adds and subtracts as follows:
2454450+17.812847-1524.5 which should result in 2452943.312847, right? But instead it returns a value of 2452943.25
P.S. on the third step it subtracts -13, su end result should be 2452930.312847.
Here is the program: Please help fix this program.
Best regards,
Mantas