From: Alexey on
Hello,
Consider the following:

In[1]:= N[1.000000000000000000000001 - 1, 60]

Out[1]= 0.*10^-24

I can not understand why this happens. Can anyone explain the reason?
What is about "arbitrary precision arithmetics"?

From: David Park on
Specify the precision with a number mark "`". You don't have to use N here.

1.000000000000000000000001`60 - 1
Precision[%]

1.00000000000000000000000000000000000*10^-24
36

With less precision:

1.000000000000000000000001`30 - 1
Precision[%]

1.00000*10^-24
6


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/


From: Alexey [mailto:lehin.p(a)gmail.com]

Hello,
Consider the following:

In[1]:= N[1.000000000000000000000001 - 1, 60]

Out[1]= 0.*10^-24

I can not understand why this happens. Can anyone explain the reason?
What is about "arbitrary precision arithmetics"?



From: Leonid Shifrin on
Hi Alexei,

My understanding is that once you enter a number in decimal notation, it
gets as many digits of precision as
is the number of digits you enter (if it is more than machine precision).
Therefore, requesting more precision in surrounding N[.., 60] will not help.

In[1] =
N[1.000000000000000000000001 - 1, 60]

Out[1]= 0.*10^-24

What this means is that Mathematica can give you the exponent in this case,
but zero significant figures.

In[2]:= Precision[1.000000000000000000000001]

Out[2]= 24.

Enter extra zero, and it helps, since the precision is now higher.

In[3]:= N[1.0000000000000000000000010 - 1, 60]


Out[3]= 1.*10^-24

In[4]:= Precision[1.0000000000000000000000010]

Out[4]= 25.

Or use exact arithmetic:

In[5]:=
a = 1 + 10^-24;
N[a - 1, 60]

Out[6]= 1.\
00000000000000000000000000000000000000000000000000000000000*10^-24


Regards,
Leonid



On Thu, May 27, 2010 at 2:46 PM, Alexey <lehin.p(a)gmail.com> wrote:

> Hello,
> Consider the following:
>
> In[1]:= N[1.000000000000000000000001 - 1, 60]
>
> Out[1]= 0.*10^-24
>
> I can not understand why this happens. Can anyone explain the reason?
> What is about "arbitrary precision arithmetics"?
>
>


From: becko on
1.000000000000000001 is not an arbitrary precision number. It is a machine
precision number. You can try:

N[1.000000000000000000000001`60 - 1, 60]

This should give the expected result, since now
1.000000000000000000000001`60 is an arbitrary precision number. The number
following the tick mark indicates the precision.

--------------------------------------------------
From: "Alexey" <lehin.p(a)gmail.com>
Sent: Thursday, May 27, 2010 5:46 AM
To: <mathgroup(a)smc.vnet.net>
Subject: Why?

> Hello,
> Consider the following:
>
> In[1]:= N[1.000000000000000000000001 - 1, 60]
>
> Out[1]= 0.*10^-24
>
> I can not understand why this happens. Can anyone explain the reason?
> What is about "arbitrary precision arithmetics"?
>
>

From: Bob Hanlon on

Precision[1.000000000000000000000001]

24.

If you want precision to 60 digits then all numbers used must be at least that precise.

N[1000000000000000000000001*^-24 - 1, 60]

1.00000000000000000000000000000000000000000000000000000000000*10^-24

Precision[%]

60.

1.000000000000000000000001`60 - 1

1.00000000000000000000000000000000000*10^-24

Precision[%]

36.


Bob Hanlon

---- Alexey <lehin.p(a)gmail.com> wrote:

=============
Hello,
Consider the following:

In[1]:= N[1.000000000000000000000001 - 1, 60]

Out[1]= 0.*10^-24

I can not understand why this happens. Can anyone explain the reason?
What is about "arbitrary precision arithmetics"?