Rational Number

Author

Eric W. Weisstein
February 23, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Numbers/RationalNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RationalNumber.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Notation

TraditionalForm[Rationals]

Examples

{-7,0,1,1/2,22/7,12345/67}∈Rationals

Honsberger

Simplify[Sqrt[Factor[(1/(((a-b))^2))+(1/(((b-c))^2))+(1/(((c-a))^2))]],(a|b|c)∈Rationals]

FullSimplify[(1/(((a-b))^2))+(1/(((b-c))^2))+(1/(((c-a))^2))∈Rationals,(a|b|c)∈Rationals]

Radom Rational

With[{n=10^6,N=10^5},Count[Denominator[Table[Random[Integer,{-N,N}]/Random[Integer,{1,N}],{n}]],_?EvenQ]/n
]//N[#,10]&//Timing