as.numeric

0th

Percentile

Coerces to numeric or complex form

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

Keywords
math
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 \(\left|x\right|\) is greater than .Machine$double.xmax, then as.numeric(x) returns Inf or -Inf but no warning is given.

Aliases
  • as.numeric
  • as.complex
  • as.numeric,brob-method
  • as.complex,brob-method
  • as.numeric,glub-method
  • as.complex,glub-method
  • coerce,brob,numeric-method
  • coerce,brob,complex-method
  • coerce,glub,numeric-method
  • coerce,glub,complex-method
Examples
# NOT RUN {
a <- as.brob(1:10)
a <- cbrob(a, as.brob(10)^1e26)
a
as.numeric(a)

as.complex(10i + a)

# }
Documentation reproduced from package Brobdingnag, version 1.2-6, License: GPL

Community examples

Looks like there are no examples yet.