This function will evaluate a SymEngine object to its "numerical" form with given precision. User may further use as.double() to convert to R value.

evalf(expr, bits = 53L, complex = FALSE)

Arguments

expr

A SymEngine object.

bits

The precision.

complex

Whether or not to be evaluated as a complex number.

Value

Same type as expr argument.

Examples

expr <- Constant("pi")
evalf(expr)
#> (RealDouble)	3.14159265358979
as.double(evalf(expr)) == pi
#> [1] TRUE