From maintainers-request at octave dot org Sun Oct 30 04:34:21 2005 Subject: norm( x ) = inf for x > sqrt( realmax ) From: Andy Adler To: octave-maintainers at bevo dot che dot wisc dot edu Date: Sun, 30 Oct 2005 05:32:49 -0500 (EST) I'd like to point of a difference between octave and the competition. for any x > sqrt( realmax ) octave (cvs build) gives norm( x) = inf, while Matlab (>=6.5) gives the correct value (I just checked an old octave (2.1.42) and got octave:1> norm(1.35e154) ans = NaN + NaNi ) There seems to be some special logic in the Matlab norm function, because making the calculation by hand gives inf >> P=2;V= realmax; sum(abs(V).^P)^(1/P) ans = Inf >> norm(V) ans = 1.7977e+308 -- Andy Adler 1(613)562-5800x6218