MathGroup Archive 1999

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

Search the Archive

Rationalize[] in Mathematica3 vs. Mathematica4

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20173] Rationalize[] in Mathematica3 vs. Mathematica4
  • From: "Gianluca Gorni" <gorni at dimi.uniud.it>
  • Date: Sun, 3 Oct 1999 21:07:40 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hello!

I have run Mathematica 4 on a program that I had tested with
Mathematica 3, and I noticed funny outputs. I traced the
problem to the function Rationalize[], which seems
to be different in the two version.

With the following input

 In:    Rationalize[0.6000000000000001`]

Mathematica 3 gives

 Out:   3/5

while Mathematica 4 gives

 Out:   1351079888093186/2251799813488643

Is this change in behaviour intentional?

To get the same result as before from my program
I had to write Rationalize[x, .001] instead of
Rationalize[x].

              Gianluca Gorni
--


 +---------------------------------+
 | Gianluca Gorni                  |
 | Universita` di Udine            |
 | Dipartimento di Matematica      |
 |   e Informatica                 |
 | via delle Scienze 208           |
 | I-33100 Udine UD                |
 | Italy                           |
 +---------------------------------+
 | Ph.: (39) 0432-558422           |
 | Fax: (39) 0432-558499           |
 | mailto:gorni at dimi.uniud.it      |
 | http://www.dimi.uniud.it/~gorni |
 +---------------------------------+











  • Prev by Date: Re: Re: List-Selection
  • Next by Date: text formatting headache
  • Previous by thread: Re: NonlinearRegress and numerical functions...
  • Next by thread: Re: Rationalize[] in Mathematica3 vs. Mathematica4