MathGroup Archive 1999

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

Search the Archive

Rationalize[] in Mathematica3 vs. Mathematica4


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