Extracts the primal value, discarding the derivative.

# S4 method for class 'dualr'
as.numeric(x, ...)

Arguments

x

A dual object.

...

Ignored.

Value

Numeric value.

Examples

x <- dual(3.14, 1)
as.numeric(x)  # 3.14
#> [1] 3.14