glub: Glubbdubdribian numbers: complex numbers with Brobdingnagian...

Description Usage Arguments Details Note Author(s) See Also Examples

Description

Create, coerce to or test for a Glubbdubdribian object

Usage

1
2
3
glub(real = double(), imag = double())
as.glub(x)
is.glub(x)

Arguments

real, imag

Real and imaginary components of complex number: must be Brobdingnagian numbers

x

object to be coerced to or tested for Glubbdubdribian form

Details

Function glub() takes two arguments that are coerced to Brobdingnagian numbers and returns a complex number. This function is not really intended for the end user: it is confusing and includes no argument checking. Use function as.glub() instead.

Function as.glub() is the user's workhorse: use this to coerce numeric or complex vectors to Glubbdubdribian form.

Function is.glub() tests for its arguments being Glubbdubdribian.

Note

Function glub() uses recycling inherited from cbind().

Author(s)

Robin K. S. Hankin

See Also

brob

Examples

1
2
3
4
5
6
7
8
a <- as.glub(1:10 + 5i)
a^2 - a*a

f <- function(x){sin(x) +x^4 - 1/x}
as.complex(f(a)) - f(as.complex(a))   # should be zero (in the first
                                      # term, f() works with glubs and coerces to
                                      # complex; in the second, f()
                                      # works with complex numbers directly)

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