Numerical evaluation
N(x, digits = 15)
caracas object
Number of digits
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))
}
#> [1] "4.4428829381583662470158809900606936986146216893757"