Am 14.11.2014 um 17:22 schrieb Sven Schreiber:
Hi,
I'm trying to work with matrices converted from series/lists that
contain missings, in order to vectorize and hopefully speed up code.
Somewhat related, so I'm not opening up gazillions of new threads --
"!m" and "m==0" somehow trigger different results, although I thought
they would be equivalent:
gretl-Version 1.10.0cvs
Aktuelle Sitzung: 2014-11-14 17:36
? matrix m = I(4)
Ersetzte Matrix m
? matrix mlog1 = (!m) ? 0 : -log(m)
Ersetzte Matrix mlog1
Warnung: log: Result too large
? matrix mlog2 = (m==0) ? 0 : -log(m) # should be equiv., no?
Ersetzte Matrix mlog2
Warnung: log: Result too large
? print mlog1
mlog1 (4 x 4)
-0 0 0 0
0 -0 0 0
0 0 -0 0
0 0 0 -0
? print mlog2
mlog2 (4 x 4)
-0 inf inf inf
inf -0 inf inf
inf inf -0 inf
inf inf inf -0
intrigued,
Sven