WOLFRAM

NumeratorDenominator
NumeratorDenominator

gives the list {Numerator[expr],Denominator[expr]} of expr.

Details and Options

  • Numerator picks out terms that do not have superficially negative exponents. Denominator picks out the remaining terms.
  • An exponent is "superficially negative" if it has a negative number as a factor.
  • The standard representation of rational expressions as products of powers means that you cannot simply use Part to extract numerators.
  • NumeratorDenominator can be used on rational numbers.
  • NumeratorDenominator automatically threads over lists.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Extract the numerator and denominator of a rational number:

Out[1]=1

Extract the numerator and denominator of a rational expression:

Out[1]=1

Extract the numerator and denominator of a symbolic expression:

Out[1]=1

Scope  (7)Survey of the scope of standard use cases

Rational numbers:

Out[1]=1

Gaussian rationals:

Out[1]=1

Rational expressions:

Out[1]=1

Select terms with syntactically positive and negative exponents:

Out[1]=1
Out[2]=2

Reconstruct the original expression:

Out[3]=3

NumeratorDenominator automatically threads over lists:

Out[1]=1

Compute the numerator and denominator over the integers modulo 5:

Out[1]=1

Compute the numerator and denominator while incorporating common trigonometric identities:

Out[1]=1

Options  (2)Common values & functionality for each option

Modulus  (1)

Find numerators and denominators over integers modulo :

Out[1]=1

Trig  (1)

Numerators and denominators of trigonometric functions:

Out[1]=1

Applications  (2)Sample problems that can be solved with this function

Compute the numerator and denominator with respect to a specified modulus:

Out[7]=7

Compute the limit at infinity of a rational function:

Out[1]=1

Extract the numerator and denominator:

Out[2]=2

Apply Exponent to find the degree of the numerator and denominator:

Out[3]=3

We can see that the denominator has a larger degree. Thus, the function approaches zero as grows large:

Out[4]=4

This can be confirmed using Limit:

Out[5]=5

Properties & Relations  (1)Properties of the function, and connections to other functions

An expression is a quotient of its numerator and denominator:

Out[2]=2
Out[3]=3

Neat Examples  (1)Surprising or curious use cases

Plot semitransparent blue squares at positions {i, j} for which i/j is an irreducible fraction:

Out[9]=9
Wolfram Research (2019), NumeratorDenominator, Wolfram Language function, https://reference.wolfram.com/language/ref/NumeratorDenominator.html.
Wolfram Research (2019), NumeratorDenominator, Wolfram Language function, https://reference.wolfram.com/language/ref/NumeratorDenominator.html.

Text

Wolfram Research (2019), NumeratorDenominator, Wolfram Language function, https://reference.wolfram.com/language/ref/NumeratorDenominator.html.

Wolfram Research (2019), NumeratorDenominator, Wolfram Language function, https://reference.wolfram.com/language/ref/NumeratorDenominator.html.

CMS

Wolfram Language. 2019. "NumeratorDenominator." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NumeratorDenominator.html.

Wolfram Language. 2019. "NumeratorDenominator." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NumeratorDenominator.html.

APA

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

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

BibTeX

@misc{reference.wolfram_2025_numeratordenominator, author="Wolfram Research", title="{NumeratorDenominator}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/NumeratorDenominator.html}", note=[Accessed: 29-March-2025 ]}

@misc{reference.wolfram_2025_numeratordenominator, author="Wolfram Research", title="{NumeratorDenominator}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/NumeratorDenominator.html}", note=[Accessed: 29-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_numeratordenominator, organization={Wolfram Research}, title={NumeratorDenominator}, year={2019}, url={https://reference.wolfram.com/language/ref/NumeratorDenominator.html}, note=[Accessed: 29-March-2025 ]}

@online{reference.wolfram_2025_numeratordenominator, organization={Wolfram Research}, title={NumeratorDenominator}, year={2019}, url={https://reference.wolfram.com/language/ref/NumeratorDenominator.html}, note=[Accessed: 29-March-2025 ]}