octave-maintainers
[Top][All Lists]
Advanced

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

RE: integer artithmetic


From: Hall, Benjamin
Subject: RE: integer artithmetic
Date: Wed, 1 Sep 2004 14:42:37 -0400

Here's R14 results:

>> a = int16(0)/int16(0)
Warning: Divide by zero.

a =

      0

>> b = Inf*int16(0)

b =

      0

>> whos
  Name      Size                    Bytes  Class

  a         1x1                         2  int16 array
  ans       1x1                         2  int16 array
  b         1x1                         2  int16 array

Grand total is 3 elements using 6 bytes

-----Original Message-----
From: John W. Eaton [mailto:address@hidden
Sent: Wednesday, September 01, 2004 2:32 PM
To: octave maintainers mailing list
Subject: integer artithmetic


What should we do for things like

  int16(0) / int16(0)

or

  Inf * int16(0)

?

If both arguments are double, these operations genrate NaNs.  What
should Octave do, given the constraint that the result should be an
int16 object (at least I believe that's the rule that we have to
follow for compatibility)?

Should the result be int16(0)?

Can someone who has Matlab R14 say what it does?

Thanks,

jwe



reply via email to

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