octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

norm( x ) = inf for x > sqrt( realmax )


From: Andy Adler
Subject: norm( x ) = inf for x > sqrt( realmax )
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 <address@hidden> 1(613)562-5800x6218



reply via email to

[Prev in Thread] Current Thread [Next in Thread]