Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Precision of output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48222] Re: Precision of output
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 18 May 2004 04:17:00 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/17/04 at 3:22 AM, spam at husumtoften.invalid (Per R¯nne) wrote:

>If I write:
>
>N[4209/0.14,100] I get: 30064.3

>But if I write N[420900/14,100] I get:
>30064.
>285714285714285714285714285714285714285714285714285714285714285714
>285714\ 28571428571428571428571

>Why the difference? I thought N determined the number of digitals
>shown - but I seem to have some problems with this function. And it
>is not in this example only.

The difference is caused by using an exact number in one case and an inexact number in the other case. In particular the documentation states:

Unless numbers in expr are exact, or of sufficiently high precision, N[expr, n] may not be able to give results with n digit precision. 

When you write 0.14 you are expressing a number with much less precision than 100 digits. Consequently, there is no valid way to get 100 digit precision from 4209/.014
--
To reply via email subtract one hundred and four


  • Prev by Date: RE: Maclaurin Series
  • Next by Date: Re: Precision of output
  • Previous by thread: Re: Precision of output
  • Next by thread: Re: Precision of output