Incorrect value for mod(uint32(5), 2)
David Bateman
David.Bateman at motorola.com
Tue Jul 8 03:06:58 CDT 2008
Gregery T Buzzard wrote:
> Due to the fact that uint32(5)/2 gives 3 for compatibility for matlab
> and the use of division in the mod.m file, mod(uint32(5),2) gives 0
> when it should give 1.
>
> A simple patch is to replace
>
> x - y .* floor (x ./ y);
>
> with
>
> x - y .* floor (double(x) ./ y);
>
> at lines 57 and 70 in mod.m (version 3.0.1).
>
> Greg Buzzard
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>
>
This is fixed by the changeset
http://velveeta.che.wisc.edu/cgi-bin/hgwebdir.cgi/octave/rev/f7e9860893cb
That was apply to the 3.1.x tree 4 months ago but unfortunately was
missed for 3.0.1.. It will be in the 3.0.2 release
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
More information about the Bug-octave
mailing list