I'm running into problems regarding the usage of the Brobdingnag package - after setting
a2 <- as.brob(0.1)^1000,
a2 = exp(-2302.6)
a1 <- as.brob(0.1)^800,
a1 = exp(-1842.1)
I get different results for using sum(a1,a2) and sum(a2,a1) - Each time the result equals the first argument given to the sum function. It seems that maybe sum is not overrided by the Brobdingang package even though its supposed to? Or maybe i'm doing something wrong?
I asked this question also as a reply to another question I wrote, see here
[EDIT: Answer from author of the package]
Hi Dan
This is definitely a bug in the package; thank you for the report! Unfortunately, correcting it will take me some considerable time.
In the meantime, please find below the usual R idiom for calculating the sum of two brobs:
> a1 <- as.brob(0.1)^800
> a2 <- as.brob(0.1)^1000
> a1+a2
> a1 <- as.brob(0.1)^800
> a2 <- as.brob(0.1)^1000
> a1+a2
[1] +exp(-1842.1)
> a2+a1
[1] +exp(-1842.1)
> sum(cbrob(a1,a2))
[1] +exp(-1842.1)
> sum(cbrob(a2,a1))
[1] +exp(-1842.1)
>