cancel: Put rational function into standard form

View source: R/simplify.R

cancelR Documentation

Put rational function into standard form

Description

cancel() will take any rational function and put it into the standard canonical form

Usage

cancel(x)

Arguments

x

A caracas_symbol

Examples

if (has_sympy()){
  def_sym(x, y, z)
  expr = cancel((x**2 + 2*x + 1)/(x**2 + x))
  cancel(expr)
  expr = (x*y**2 - 2*x*y*z + x*z**2 + y**2 - 2*y*z + z**2)/(x**2 - 1)
  cancel(expr)
  factor_(expr)
}

caracas documentation built on June 22, 2024, 10:59 a.m.