Post your Gambas programming questions here.
5 posts • Page 1 of 1
As has already been stated, these kind of rounding errors are to be expected on a digital computer.
- you will get the same result if you perform the same calculations in LibreOffice Calc (...on the same computer)
- the error is very, very small
- using something like;
myCosine = Cos(Rad(90))...doesn't make much sense.
It would be better to code something like this;
myCosine = Round(Cos(Rad(90)),-10)I hope this helps.
Edit; sorry, forgot the Rad