as.numeric: Coerces to numeric or complex form

Description Arguments Details Note Author(s) Examples

Description

Coerces an object of class brob to numeric, or an object of class glub to complex

Arguments

x

Object of class brob or glub

...

Further arguments (currently ignored)

Details

Function as.numeric() coerces a brob to numeric; if given a glub, the imaginary component is ignored (and a warning given).

Function as.complex() coerces to complex.

Note

If |x| is greater than .Machine$double.xmax, then as.numeric(x) returns Inf or -Inf but no warning is given.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
4
5
6
a <- as.brob(1:10)
a <- cbrob(a, as.brob(10)^1e26)
a
as.numeric(a)

as.complex(10i + a)

Brobdingnag documentation built on May 2, 2019, 8:46 a.m.