Watch the operator precedence and type casting rules! The term
90/180
delivers in C++ the value of 0, as it is an int division. Excel will probably convert both 90 and 180 to double first and comes to a result of 0.5.
Try writing 90./180. in your C++ expression and see the difference.
Also: Your expression is numerically not very stable. You arr adding something in the range of 50 to a value of 6767250. That's 5 orders of magnitude difference. In type float you would probably get a totally erratic result. In double things run somewhat better, but don't expect the result to have more than 15 - 5 = 10 significant digits.