mathnet/mathnet-numerics — Issue #21: Sparse arithmetics: accidential zeros inconsistent with Equals
Author: cdrnet
Created: 2011-10-12 23:00:19+00:00
State: open
Labels: Priority - MEDIUM

Currently sparse arithmetics allows accidential zeros (e.g. (null, 5)+(1, -5) = (1,0) instead of (1,null)). However, IEquatable>.Equals is currently implemented such that (1,0) is not equal to (1,null). This is inconsistent.

Either one of the two should be fixed:
* avoid accidential zeros in arithmetic routines
* change Equals implementation to treat accidential zeros the same as full zeros