octave-maintainers
[Top][All Lists]
Advanced

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

Re: goals for 3.1


From: John W. Eaton
Subject: Re: goals for 3.1
Date: Tue, 19 Feb 2008 03:49:30 -0500

On 18-Feb-2008, David Bateman wrote:

| John W. Eaton wrote:
| >    9. Mapper functions like real, imag, and mod should preserve type
| >       (are there others?)
| >   
| Most of the mapper functions take a single argument, except mod, rem and
| atan2. So these were addressed by my recent mapper patch. As for these
| three functions, mod/rem must be made to accept integer arguments and
| atan2 should fail for integer arguments. Checking matlabR2007b it seems
| that the compatiable behavior is a bit odd, as mod(uint8(5),4),
| mod(uint8(1:5),4) and mod(5, uint8(4)) are acceptable, but mod(1:5,
| uint8(4)) isn't. I tried to duplicate this behavior though it doesn't
| seem too logical.

I don't see why

  mod (1:5, uint8(4))

should fail if it works for a double scalar and uint8 scalar.  Does
anyone know whether this behavior is documented somwhere?

| Equally rem and mod for 64-bit integer arguments do not seem to be
| defined, as some of the arithmetic operators are not defined for the 64
| bit types... This is easy to duplicate as the same behavior exists in
| Octave.
| 
| Please find attached a patch that address these three two argument
| mapper functions.

I merged these changes.

Thanks,

jwe


reply via email to

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