Re: Problem using Quotient and Mod functions with rational parameters
- To: mathgroup at smc.vnet.net
- Subject: [mg41886] Re: Problem using Quotient and Mod functions with rational parameters
- From: Bill Rowe <listuser at earthlink.net>
- Date: Sun, 8 Jun 2003 06:45:48 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 6/7/03 at 12:08 AM, eduault at yahoo.com (eduault) wrote: >I was expecting that Quotient[m*n, n], with m positive integer and a >positive would return m. This is nearly almost the case, for example: >Quotient[0.12, 0.01] returns 12 >However, for some parameters, this is not the case: >Quotient[0.29, 0.01] returns 28 This is a result of working with machine precision numbers. Either .29 or .01 or both cannot be exactly represented as a machine precision number. Assume for the moment the nearest machine number to .29 is slightly below .29, then .01 divides the actual machine number only 28 times and Quotient would behave as you see.