Rationals

Rationals

represents the domain of rational numbers, as in xRationals.

Details

  • xRationals evaluates immediately if x is a numeric quantity.
  • Simplify[exprRationals,assum] can be used to try to determine whether an expression corresponds to a rational number under the given assumptions.
  • (x1|x2|)Rationals and {x1,x2,}Rationals test whether all xi are rational numbers.
  • The domain of integers is taken to be a subset of the domain of rationals.
  • Rationals is output in StandardForm or TraditionalForm as TemplateBox[{}, Rationals]. This typeset form can be input using rats.

Examples

open all close all

Basic Examples  (3)

2/3 is a rational number:

In[1]:=
Click for copyable input
Out[1]=

A sum of rational numbers is a rational number:

In[1]:=
Click for copyable input
Out[1]=

Find rational solutions of an equation:

In[1]:=
Click for copyable input
Out[1]=

Scope  (5)

Properties & Relations  (2)

Introduced in 1999
(4.0)
|
Updated in 2017
(11.2)