MathGroup Archive 2003

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

Search the Archive

Re: Real -> Integer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44930] Re: Real -> Integer
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Wed, 10 Dec 2003 04:01:36 -0500 (EST)
  • References: <br41e4$ita$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Vladislav Beskrovnyy <beskrovn at phlam.univ-lille1.fr> wrote:
> Is there a function in Mathematica, which converts Real numbers into
> Integers? I.e. The fucntion which changes
> 2. into 2
> 2.3 into 23/10
> etc.

Looking at your second example, it's clear that you want a ratio of
integers (i.e., a rational number) rather than just an integer. Use
Rationalize.

 Rationalize[2.3]

 23/10

David


  • Prev by Date: Re: Real -> Integer
  • Next by Date: RE: Real -> Integer
  • Previous by thread: Re: Real -> Integer
  • Next by thread: RE: Real -> Integer