MathGroup Archive 2009

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

Search the Archive

Re: Re: An arithmetic puzzle, equality of numbers.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103235] Re: [mg103175] Re: An arithmetic puzzle, equality of numbers.
  • From: Richard Fateman <fateman at cs.berkeley.edu>
  • Date: Fri, 11 Sep 2009 05:26:35 -0400 (EDT)
  • References: <h829m8$3ue$1@smc.vnet.net> <4AA4BA87.3020500@gmail.com> <200909080955.FAA26400@smc.vnet.net> <h87p8i$5cj$1@smc.vnet.net> <200909101117.HAA17683@smc.vnet.net> <op.uz2bg6k1tgfoz2@bobbys-imac-2.local>

DrMajorBob wrote:
> Is there a mechanism in Mathematica (as it exists today) to Check a 
> computation for 0-precision results?
>
> It might be better to have computations throw a Message (which we can 
> turn off), for this, just as it does for division by zero.
>
> Bobby
>
 I don't know of such is a mechanism.

I suggested to DanL changing "==", and your note prodded me to write "a 
prototype" this way:

Unprotect[Equal]
Equal[a_,b_]:= unknown /; Precision[a]<3 || Precision[b]<3

This "kicks the can down the road"...   you have to figure out what to 
do with the "unknown".

But following your suggestion you might have something like
Equal[a_,b_]:=  .... throw some message...conditionally on something or 
other ....

Changing the semantics of ==  may mess up other things like Compiling, 
Plotting, who know what..

That kicks the can down a different road.
RJF




  • Prev by Date: Produce PDFs of Documentation notebooks?
  • Next by Date: Re: Re: how to get the longest ordered sub sequence of a
  • Previous by thread: Re: An arithmetic puzzle, equality of numbers.
  • Next by thread: Re: An arithmetic puzzle, equality of numbers.