Open lellid opened 3 months ago
Hello, the implementation of Hypotenuse is buggy. The following test fails:
[Fact] void TestHypotenuse() { Assert.True(double.IsNaN(SpecialFunctions.Hypotenuse(double.NaN, 0))); }
This has severe consequences, because e.g. the following test also fails:
[Fact] void TestL2Norm() { var v = Vector<double>.Build.Dense([double.NaN, 0]); Assert.True(double.IsNaN(v.L2Norm())); }
Best regards, Dirk
Please have a look at the implementation of System.Numerics.Complex.Magnitude. If it not affects performance, you can it even call directly in Hypotenuse.
Dirk
Hello, the implementation of Hypotenuse is buggy. The following test fails:
This has severe consequences, because e.g. the following test also fails:
Best regards, Dirk