Algeabraic operation with #calc
Hi
== 1 == #calc, used in blockMeshDict context, seems to give different answers for the following: == 2 == b 4; c 3; d 10; // First one-line calculation a #calc "b / d * c"; // Second one-line calculation a #calc "(b * c) / d"; == 3 == I could not find any reasoning behind the difference; therefore, I thought it would be better to consider it as a small bug. |
You don't include the answers you get in your post, which would help debugging a lot. I'm guessing integer division is to blame.
|
You could try to define b, c and d as scalars:
Code:
b 4.0; |
All times are GMT -4. The time now is 10:30. |