4 ms·
This is a non-problem in every language with variadic functions. "add(x, y, z)" looks good to me.
by Rexxar 8y ago
This is a non-problem in every language with variadic functions. "add(x, y, z)" looks good to me.
- dnautics 8y agoYou have to be careful though. In Julia, there is "fma(a,b,c)" which is not necessarily the same as "muladd(a,b,c)". What are the guarantees on add(a,b,c) versus a+b+c? If do add(1.0e30, 1.0, -1.0e30) is that the same (aka IEEE fp addition is noncommutative)
- alboy 8y ago> If do add(1.0e30, 1.0, -1.0e30) is that the same (aka IEEE fp addition is noncommutative) You might be thinking of associativity. Both addition and multiplication are commutative up to NaN.