MathGroup Archive 2003

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

Search the Archive

Re: Newbie question


Rationalize[N[Pi,3], 0]

245850922/78256779

%//N

3.141592653589793

However, I suspect that N[Pi, 3] is not doing what you expect.  You probably
want  something like

Rationalize[Pi, 10^-3]

201/64

% // N

3.140625

or

Rationalize[(x=10^-3)*Round[Pi/x]]

1571/500

%//N

3.142


Bob Hanlon

In article <b5efg5$63h$1 at smc.vnet.net>, "Daniel Lidström"
<daniel.lidstrom at _DELETE_home.se> wrote:

<< 
Subject:	Re: Newbie question
From:		"Daniel Lidström" <daniel.lidstrom at _DELETE_home.se>
To: mathgroup at smc.vnet.net
Date:		Fri, 21 Mar 2003 07:37:41 +0000 (UTC)

Daniel Lidström wrote:
> Hello,
>
> I couldn't find the FAQ. I'm simply trying to convert .2 into 1/5.
> [Full]Simplify, Factor, won't do it. What is the command?
> Thanks!

When I do Rationalize[N[Pi,3]] I get 3.14159. How can that be? I'm expecting
a quotient.
Thanks!

/Daniel


  • Prev by Date: Re: Re: Newbie question
  • Next by Date: The difference between Needs[ ] & Get[ ]
  • Previous by thread: Re: Newbie question
  • Next by thread: help wanted