Hi Kevin,

thanks, fixed in SVN 684.

/// Jürgen


On 10/13/2015 01:22 AM, Kevin Anderson wrote:
Subtract with a complex on the left and a float on the right acts as if the operands were swapped:
 
    2J8 - 3.0
1J¯8
    3.0 - 2J8
1J¯8
 
However, complex minus int or int minus complex is OK:
    2J8 - 3
¯1J8
    3 - 2J8
1J¯8
 
FloatCell.cc::bif_subtract is executing "return A->bif_subtract(Z, this)" when A is not a real, no doubt inspired by the pattern used in FloatCell::bif_add. It should rather take its inspiration from IntCell::subtract and do "bif_negative(Z); return A->bif_add(Z,Z);" instead.

Reply via email to