Recently I stumbled upon a weird bug when I used a package that sets the NumericQ result of symbols you are feeding into a certain function to true.
Here is a minimal working example of what I mean:
NumericQ[a] ^= True; NumericQ[b] ^= True; a + a (-1.`) - 2 b + 2.` 0 b + 2 b
The output of the above expression should be 0 but it gives
0. - 2 b
Exchanging any of the floats with integers gives the correct result. Could someone explain to me what is happening here? Is this a bug I should report?
Another hint could be that when I decrease the factor in front of the first b by one, the result is decreased by 2:
a + a (-1.`) - 3 b + 2.` 0 b + 2 b
0. - 4 b
Any ideas are welcome.