MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

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.


  • Prev by Date: Re: volume of point cloud
  • Next by Date: Re: Quick "Random[]" question
  • Previous by thread: Problem using Quotient and Mod functions with rational parameters
  • Next by thread: Re: Problem using Quotient and Mod functions with rational parameters