N: Numerical evaluation

View source: R/numeric_eval.R

NR Documentation

Numerical evaluation

Description

Numerical evaluation

Usage

N(x, digits = 15)

Arguments

x

caracas object

digits

Number of digits

Examples

if (has_sympy()) {
  n_2 <- as_sym("2")
  n_pi <- as_sym("pi", declare_symbols = FALSE)
  x <- sqrt(n_2) * n_pi
  x
  N(x)
  N(x, 5)
  N(x, 50)
  as.character(N(x, 50))
}


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