Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

RE: Very odd behaviour in Mod/N



Hi
Your problem is evidently occurring when you exceed the numerical precision of the system you are working with (typically 16 digits)...
ut try the following:

pie ationalize[N[Pi,20],0]
Q 0^18
t od[Q,2 pie]
N[t]
N[t,20]

Regards, RF
-----Original Message-----
From:	Adrian Cable [SMTP:megalith@jimc.demon.co.uk] To:
mathgroup@smc.vnet.net
Sent:	Friday, April 24, 1998 12:52 AM To:	mathgroup@smc.vnet.net
Subject:	[mg12048] Very odd behaviour in Mod/N

Hi there,
I've observed some very odd behaviour when using Mod and N. It seems
that, when handling very large numbers, Mathematica (3.0.1, Win32) does
not display machine-precision results correctly. Here's an example
which behaves as it should:

In[12]:
 0^8
Out[12]00000000

In[13]:
 od[Q, 2 Pi]
Out[13]00000000 - 31830988 Pi

In[14]:[t]
Out[14].9427

In[15]:[t, 20]
Out[15].9426951345040144600

Now for a very similar example which obviously behaves wrongly:

In[16]:
 0^18
Out[16]000000000000000000

In[17]:
 od[Q, 2 Pi]
Out[17]000000000000000000 - 318309886183790670 Pi

In[18]:[t]
Out[18]28.

In[19]:[t, 20]
Out[19].831039164951128133

What exactly is going on here?

Thanks, cheers,
Adrian Cable.




  • Prev by Date: Re: Mathematica 3.0.1 / Win95 woes
  • Next by Date: Re: Very odd behaviour in Mod/N
  • Prev by thread: Re: Very odd behaviour in Mod/N
  • Next by thread: Problem with Eigenvalues[A]