- changed status to resolved
norm2 doesn't adhere to spec
Issue #346
resolved
The Math.norm2 specification defines the function as follows: norm2(x) = sqrt(dot(x , x))
The Inferno implementation doesn't appear to adhere to this see libmath/blas.c
double
norm2(int n, double *x)
{
double sum = 0;
if (n <= 0)
return 0;
while (n--) {
sum += *x * *x;
x++;
}
return sum;
}
Comments (1)
-
reporter - Log in to comment
This has been address with commit 98979994313ec2fd6f9dfd62c57254a10a73afe2