MathGroup Archive 2007

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

Search the Archive

Re: [TS 48]--Re:why isn't Rational[1,2] (apparently) atomic until it is evaluated?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72540] Re: [TS 48]--Re:why isn't Rational[1,2] (apparently) atomic until it is evaluated?
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Fri, 5 Jan 2007 02:34:17 -0500 (EST)
  • References: <200701041530.l04FU7BT023687@localhost.localdomain>

You are right that unevaluated Rational expressions are not Atomic.
However, I was wondering why... ?

On Thu, 4 Jan 2007 15:30:07 UT, mathgroup <mathgroup at smc.vnet.net> wrote:
>  -- Wolfram Research Technical Support --
>
> This is a response to your email.
> The reply to your question can be found at the bottom of this message.
> Our classification number for this message is: [TS 48]
> Please give this number in any future correspondence
> related to this question. If you leave this number in
> the Subject: header in the form [TS 48], it will
> automatically be reassigned to the original technician.
>
> From: "Chris Chiasson" <chris at chiasson.name>
> Date: Tue, 2 Jan 2007 02:04:41 -0600
> Subject: why isn't Rational[1,2] (apparently) atomic until it is evaluated?
> To: mathgroup <mathgroup at smc.vnet.net>,"support at wolfram.com" <support at wolfram.com>
>
> {Map[Hold,Rational[1,2],{0}],
>     Hold[Rational[1,2]]}/.x_?NumberQ/;((Print[FullForm@x," ",#];#)&)@
>         AtomQ@Unevaluated@x\[RuleDelayed]SetPrecision[x,MachinePrecision]
>
> gives:
>
> From In[39]:=
> Rational[1,2] True
>
> From In[39]:=
> Rational[1,2] False
>
> From In[39]:=
> 1 True
>
> From In[39]:=
> 2 True
>
> Out[39]=
> {Hold[SetPrecision[1/2, MachinePrecision]],
> Hold[Rational[SetPrecision[1, MachinePrecision],
>     SetPrecision[2, MachinePrecision]]]}
>
> --
> http://chris.chiasson.name/
>
>
>
>
> ___________________________________________________________________________
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Chris,
>
> I suspect that I may be missing something here.
>
> Given that:
>
> AtomQ[expr] yields True if expr is an expression which cannot be divided into \
> subexpressions, and yields False otherwise
>
> It seems that unevaluated Rational expressions would not be atomic.
>
> Let me know is there is another way to look at it.
>
> Tom Zeller
> Wolfram Research Technical Support - Student Versions
>
> ___________________________________________________________________________
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
> ----------------------------------------------------------------------------
>
> If this issue is resolved, please consider taking a few minutes
> to give us some feedback on your experience. Please visit
> http://support.wolfram.com/survey/?trackingnumber=48
> and give your honest answers to these three short questions.
> Thanks for taking the time to help us improve.
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Re: Re: Re: programming problem about elements
  • Next by Date: Re: Finding paths in graphs
  • Previous by thread: Re: how to plot a 2-parametric output from Solve with
  • Next by thread: do any of you publish any Mathematica news?