Name:

numerator gives the numerator of an expression

Usage:

numerator(expr) : function -> function

Parameters:

Description:

Example 1:

   > numerator(5/3);
   5

Example 2:

   > numerator(exp(x));
   exp(x)

Example 3:

   > a = 5/3;
   > b = numerator(a)/denominator(a);
   > print(a);
   5 / 3
   > print(b);
   5 / 3

Example 4:

   > a = exp(x/3);
   > b = numerator(a)/denominator(a);
   > print(a);
   exp(x / 3)
   > print(b);
   exp(x / 3)
See also: denominator, rationalmode
Go back to the list of commands