Rational
Usage
• Rational 表示有理数的头.
Notes
• 可以以 n/m的形式输入一个有理数. • 可以使用模式对象_Rational来表示一个有理数. 它不能用来表示一个单一的整数. •必须使用 Numerator 和 Denominator 来取出Rational数的各部分.
Further Examples
Fractions are represented internally without either a fraction bar or the slash character.
In[1]:=
|
Out[1]=
|
Therefore the first pattern won't work to identify a fraction.
In[2]:=
|
Out[2]=
|
|