I noticed an odd behavior which I feel is a bug (I can’t think of a good use case for this). The
Sum() function (as well as the add operator a.k.a. the
+ sign, and probably other math functions?) seems to infer the numeric type from the first operand of the list of values to sum. Thus if the first operand is an integer, the output of the entire operation seems to become an integer, even if the second operand is a decimal value. Thus an equation of “120 + 28.25” which should come out to “148.25” is instead shown as “148” with the decimal portion truncated or rounded.
What’s even more odd is that at one point when I moused-over the “148”, the tooltip value was correct, i.e. “148.25”. So I know the value is used internally, but the display is influenced by which operand was first in the equation or
What do the Coda engineers think? I attached a small .GIF showing the problem in my Doc below: