MathGroup Archive 2002

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

Search the Archive

Re: Re: A question about Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34636] Re: [mg34613] Re: [mg34559] A question about Mathematica
  • From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
  • Date: Thu, 30 May 2002 02:55:24 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Chen's problem as he wrote concerns not an equality but an inequality! 
Also in my example:

In[64]:=
A=(1.`1)^10;B=2;

In[65]:=
A == B

Out[65]=
True

In[66]:=
A >= B

Out[66]=
False

This is not a bug but a consequence of using significance arithmetic. 
Probably in his case he should use fixed precision arithmetic, which 
Mathematica can do (and this seems to be his friend's suggestion). But 
he must first explain what his problem is before one can tell him how 
(and if) he should this.

Andrzej

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/


On Thursday, May 30, 2002, at 12:44  AM, DrBob wrote:

> Chen's problem is what SEEMS to be a simulation, but with no randomness
> other than loss of precision.  If it were a proper simulation he
> wouldn't care what happens when equality occurs, since it would be
> incredibly rare.
>
> Bobby
>
> -----Original Message-----
> From: Andrzej Kozlowski [mailto:andrzej at platon.c.u-tokyo.ac.jp]
To: mathgroup at smc.vnet.net
> Sent: Wednesday, May 29, 2002 1:47 AM
> Subject: [mg34636] [mg34613] Re: [mg34559] A question about Mathematica
>
> What you have written does not make much sense. You should really post
> your real problem. However, one can speculate that wthe problem you are
> having is caused by too low precision in your computations. For example,
>
> here is an example which looks similar to yours:
>
> In[43]:=
> A=(1.`1)^10;B=2;
>
> In[45]:=
> A/Aâ?¥B/B
>
> Out[45]=
> False
>
> Depending on the nature of your problem changing to fixed precision
> arithmetic may be the answer (this seems to be your friends suggestion).
>
> But this can't be known until you post your problem.
>
>
>
> On Monday, May 27, 2002, at 02:17  PM, Chen-Ying Huang wrote:
>
>> Hi,
>>
>>    I have a question about Mathematica and yet I couldn't find an
> answer
>> to. Could you please consider giving me a help on this? This is not a
>> long question and I hope it won't bother you too much.
>>
>>    I was doing some computations. A computation gives me something
> like
>> A/A, another computation gives me something like B/B. I then do a
>> true-false statement, that is, If [A/A>=B/B, 1, 0]. Since both
>> computations (A/A and B/B) equal to one, the statement is true and
> hence
>> the If statement should lend a 1 as specified.
>>
>>    However, I found out that the If statement lends a zero because
>> somehow, in the computations, A/A is less than B/B by the order of 10
> to
>> the power of -16.
>>
>>    Some friends told me that it must be because the bytes used by the
>> computations A/A and B/B are different, so to correct this problem, I
>> should assign the maximum byte to each object.
>>
>>    Since I am not very familiar with Mathematica, after an afternoon's
>> search, I still have no clue about how to do that.
>>
>>    Could anyone give me a help on this? I really appreciate it.
>>
>> ChenYing Huang
>>
>>
>>
>>
>
>
>
>



  • Prev by Date: RE: Re: A question about Mathematica
  • Next by Date: QUESTION
  • Previous by thread: RE: Re: A question about Mathematica
  • Next by thread: ParallelComputingToolkit ...