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 allclose all

Basic Examples  (3)

2/3 is a rational number:

A sum of rational numbers is a rational number:

Find rational solutions of an equation:

Scope  (5)

Test domain membership of a numeric expression:

Make domain membership assumptions:

Specify the default domain over which Reduce should work:

Test whether several numbers are rational:

If any number is explicitly irrational, the result is False:

TraditionalForm formatting:

Properties & Relations  (2)

Rationals contains Integers and Primes:

Rationals is contained in Complexes, Reals, and Algebraics:

Wolfram Research (1999), Rationals, Wolfram Language function, https://reference.wolfram.com/language/ref/Rationals.html (updated 2017).

Text

Wolfram Research (1999), Rationals, Wolfram Language function, https://reference.wolfram.com/language/ref/Rationals.html (updated 2017).

CMS

Wolfram Language. 1999. "Rationals." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/Rationals.html.

APA

Wolfram Language. (1999). Rationals. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Rationals.html

BibTeX

@misc{reference.wolfram_2023_rationals, author="Wolfram Research", title="{Rationals}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/Rationals.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_rationals, organization={Wolfram Research}, title={Rationals}, year={2017}, url={https://reference.wolfram.com/language/ref/Rationals.html}, note=[Accessed: 18-March-2024 ]}