I'm trying to understand some code in the D language runtime. It seems like there are separate functions for the following two things:
array1[] += scalar * array2[];
array1[] += array2[] * scalar;
Why can't these be done with one function? I thought multiplication was commutative even in inexact floating-point arithmetic.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…