MathGroup Archive 2004

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

Search the Archive

Re: When/why is Denominator[p/q] != q?


q is not equal to Denominator[p/q].  In Denominator[p/q] the argument p/q is
evaluated before the Denominator is extracted.  For example,

q=6; Table[{p, p/q, Denominator[p/q]},{p,q-1}]

{{1, 1/6, 6}, {2, 1/3, 3}, {3, 1/2, 2}, {4, 2/3, 3}, {5, 5/6, 6}}


Bob Hanlon

In article <bvla64$83$1 at smc.vnet.net>, relishguy at pluggedin.org (Relishguy)
wrote:

<< I ran this code (from the "Tour of Mathematica" in the Book ):

(* -------------------------------- *)
g6 = Flatten[Table[Point[{p / q, Denominator[p/q]}], {q, 100}, {p, q -
1}]];
(* same code with q instead of Denominator[p/q] *)
g5 = Flatten[Table[Point[{p / q, q  }], {q, 100}, {p, q - 1}]];

Show[Graphics[g5, Frame -> True]]

Show[Graphics[g6, Frame -> True]]
(* -------------------------------- *)


For some reason the graphs are not identical. Can anyone point me to
the reason for this?


  • Prev by Date: Re: When/why is Denominator[p/q] != q?
  • Next by Date: Re: Simple Differentiation?
  • Previous by thread: Re: When/why is Denominator[p/q] != q?
  • Next by thread: Simple Differentiation?