From ripley at stats.ox.ac.uk  Wed Oct 15 13:50:07 2003
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Wed Oct 15 13:49:23 2003
Subject: [Rd] NA %*% 0 == 0 (PR#4582)
Message-ID: <200310151150.h9FBo70P020421@pubhealth.ku.dk>

non-complex %*% is fundamentally done via a call to dgemm, so the answer is
going to depend on the BLAS library in use.  When Doug Bates introduced
that version of matprod, we did discuss a bit the potential problems of
cases like this.

I've cross-checked, and that _is_ what is going on with my Linux box: try
tracing around the call to dgemm in matprod in array.c.

Brian

On Wed, 15 Oct 2003, Duncan Murdoch wrote:

> On Wed, 15 Oct 2003 09:06:39 +0200 (MET DST), you wrote:
>
>
> >R-1.8.0: Does not happen for me on WindowsNT4.0 either (self compiled
> >binary, gcc-3.3.1).
> >
> >
> >> Does for me (RedHat, R 1.8.0 and 1.7.0).
> >
> >
> >I guess the problem is compiler-dependend, because I get that "0" in a
> >self-compiled R-1.7.1 (has been compiled with gcc-3.2.?).
> >
> >Is your binary self-compiled or from CRAN (Duncan Murdoch compiled the
> >CRAN binary with gcc-3.3.1 as well, AFAIK)?
>
> I get it in Win XP with both 1.8.0 (compiled with 3.3.1) and 1.7.1
> (compiled with 3.2.x).  I'd guess one of two things:
>
>  - it depends on the runtime library.  (Windows versions use MSVCRT,
> but the exact version used depends on the system you're running on.)
> This doesn't seem to explain what happens on Linux, does it?
>
>  - it depends on some uninitialized variable.  do_matprod is
> surprisingly complicated, so I can't tell if this is what's happening.
> For some reason Insight won't debug that function properly.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] NA %*% 0 == 0 (PR#4582)
ripley@stats.ox.ac.uk