Learn R Programming

symengine (version 0.2.6)

evalf: Evaluating a SymEngine Object

Description

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.

Usage

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

Value

Same type as expr argument.

Arguments

expr

A SymEngine object.

bits

The precision.

complex

Whether or not to be evaluated as a complex number.

Examples

Run this code
expr <- Constant("pi")
evalf(expr)
as.double(evalf(expr)) == pi

Run the code above in your browser using DataLab