MathGroup Archive 2009

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

Search the Archive

Re: (2/3)[[1]]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96414] Re: (2/3)[[1]]
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Fri, 13 Feb 2009 03:42:17 -0500 (EST)
  • References: <gn11e8$7vn$1@smc.vnet.net>

Hi,

> but why can't Part be used with Rational?
> 
> i.e. (2/3)[[1]]

I think because Mathematica was designed/programmed like that. Rationals
are atoms, although their FullForm suggests otherwise. So they don't
have parts:

AtomQ[2/3]

You can access the numerator and denominator with the corresponding
functions, though:

Numerator[2/3]
Denominator[2/3]

hth,

albert


  • Prev by Date: Laplace Transform Exponential Shift
  • Next by Date: Re: (2/3)[[1]]
  • Previous by thread: Re: (2/3)[[1]]
  • Next by thread: Re: (2/3)[[1]]