Re: Mod bug
- To: mathgroup at smc.vnet.net
- Subject: [mg42832] Re: Mod bug
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 30 Jul 2003 19:30:20 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <bg7vh3$hhp$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, in the binary system the floating point number 0.1 is an infinite fraction, avoid floating point number when ever possible and you will see that Mod[0.5,1/10] work as expected. Regards Jens frauendorfer wrote: > > A program written in version 3 using Mod fails completely in version 4.2 > and 5. > Checking Mod I found a quite erratic behavior.For example Mod[.5,.1] gives > the result 0.1. > A list increasing from 0.1 to 10 in 100 steps of 0.1, run through Mod[*,.1] > gives 47 wrong answers. > > E. Frauendorfer