MathGroup Archive 2011

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

Search the Archive

Re: Rational[a,b] vs Rational[1,2]

  • To: mathgroup at
  • Subject: [mg116630] Re: Rational[a,b] vs Rational[1,2]
  • From: Richard Fateman <fateman at>
  • Date: Tue, 22 Feb 2011 04:43:04 -0500 (EST)

On 2/21/2011 6:26 PM, DrMajorBob wrote:
> I think Mathematica expects us to create rationals in the usual way... 
> by dividing integers. When we do, Mathematica removes common factors 
> and can end up with an Integer, a Rational, Indeterminate, or 
> ComplexInfinity.
> If you try another method... good luck!
A simple solution is to define Rational[a_,b_] := a/b /;  

wouldn't you agree?


  • Prev by Date: Re: FinancialData Function Not Working for Property "Members"
  • Next by Date: Re: Delete elements from list..
  • Previous by thread: Rational[a,b] vs Rational[1,2]
  • Next by thread: Re: Rational[a,b] vs Rational[1,2]