Am 15.10.2015 um 12:54 schrieb Sven Schreiber:
gretl-Version 1.10.91cvs
Aktuelle Sitzung: 2015-10-15 12:52
? ii = -37.64
? cc = cdf(N, ii)
? printf "%e %e\n", cc, cc^2
2.384211e-310 0.000000e+000
So here it seems to work ok without any underflow problems, I will now
test the same thing on the server / Linux.
[Sorry, that was quicker than expected, could have sent it together with
the previous email.]
On the Linux server I see an interesting difference between the scalar
and the matrix case:
<gretlcli-session>
? cc = cdf(N,-37.64)
Generated scalar cc = 2.38421e-310
? eval cc^2
0
Warning: pow: Numerical result out of range
? printf "%e", cc^2
0.000000e+00Warning: pow: Numerical result out of range
? eval {cc}.^2
gretl_matrix_dot_op: Numerical result out of range
</gretlcli-session>
It seems to me that if it works for the scalar case (even with a
warning) it should also work for the matrix case, or vice versa
(not-work -> not-work). The latter expression "{cc}.^2" evaluates to
"0"
without error here on Windows. (And no warning is printed out for cc^2,
either.)
Apart from that I wonder how to deal with the situation, as there are
some functions that converge to zero by design (like cdf, pvalue,
logistic etc.) Somehow it feels inefficient --even though it's easy in
the concrete case-- to introduce ad-hoc checks-and-replacements for
small values every time I want to process the results of these functions
further.
Thanks,
sven