Displaying 10 results from an estimated 10 matches for "bigz".
Did you mean:
big
2012 Mar 28
1
rep with bigz in gmp
Hi
With package:gmp, is this an expected behavior?
> rep(1:3, rep(3, 3))
[1] 1 1 1 2 2 2 3 3 3
> rep(as.bigz(1:3), rep(3, 3))
Big Integer ('bigz') object of length 9:
[1] 1 2 3 1 2 3 1 2 3
This code is used inside `outer`, so more worse
> outer(1:3, 1:3, `*`)
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 2 4 6
[3,] 3 6 9
> outer(as.bigz(1:3), as.bigz(1:3), `*`)
Big Intege...
2011 Dec 21
0
gmp: Error in solve.bigz(B) : System is singular
With a matrix such as C I do not have any problem:
>library(gmp)
> C
V1 V2 V3 V4 V5 V6 V7
[1,] 1 0 0 0 1 0 0
[2,] 0 1 0 0 0 1 0
[3,] 0 0 1 0 0 0 1
[4,] 0 0 0 1 0 0 0
[5,] 0 0 0 0 1 0 0
[6,] 0 0 0 0 0 1 0
[7,] 0 0 0 0 0 0 1
> solve.bigz(C)
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] "1" "0" "0" "0" "-1" "0" "0"
[2,] "0" "1" "0" "0" "0" "-1" "0"
[3,] "0" "0" &q...
2009 Nov 27
2
Modular inverses
I want to find the inverse of an integer k mod p (prime.) Is there a
function that can do this for me? I know i could simply write (k^(p-2)) %%
p, but i need to do this for large primes (above 100) and this gives the
warning message:
Warning message:
probable complete loss of accuracy in modulus
so this method does not work. Any ideas?
Thanks,
Samuel
--
2008 Apr 04
4
Arbitrary Precision Numbers
Hi
(If you're wondering, this is a Project Euler question :))
If I wanted to calculate the sum of the digits in the decimal representation
of 2^1000, what would be a good way to go about that? I've tried the
following methods:
# Calculate the sum of digits in the decimal representation of 2^n
# Only works for smaller values of n
bsum <- function(n) {
s <- 0
e <-
2013 Dec 02
1
pesky \usage-warnings with R CMD check
...39;s evaluated through \code{eval}), \code{numeric} (including \code{INF} and \code{NaN}), \code{complex} (including \code{INF}), \code{matrix}, \code{array}, \code{list}, \code{pairlist}, \code{table}, \code{data.frame}, \code{lm}, \code{randomForest}, \code{randomForest.formula}, \code{ts}, \code{bigz} and \code{bigq} from package \code{gmp}, \code{int64} and \code{uint64} from package \code{int64}, and \code{integer64} from package \code{bit64}. Other classes are processed with \code{as.character( value )}.
Table-like structures defines three commands for each structure:
\code{nameColumns,} t...
2020 Oct 10
0
R 4.0.3 is released
...dmargins(*, ..) now also works when fn() is a local function,
thanks to bug report and patch PR#17124 from Alex Bertram.
* rank(x) and hence sort(x) now work when x is an object (as per
is.object(x)) of type "raw" _and_ provides a valid `[` method,
e.g., for gmp::as.bigz(.) numbers.
* chisq.test(*, simulate.p.value=TRUE) and r2dtable() now work
correctly for large table entries (in the millions). Reported by
Sebastian Meyer and investigated by more helpers in PR#16184.
* Low-level socket read/write operations have been fixed to
correctl...
2020 Oct 10
0
R 4.0.3 is released
...dmargins(*, ..) now also works when fn() is a local function,
thanks to bug report and patch PR#17124 from Alex Bertram.
* rank(x) and hence sort(x) now work when x is an object (as per
is.object(x)) of type "raw" _and_ provides a valid `[` method,
e.g., for gmp::as.bigz(.) numbers.
* chisq.test(*, simulate.p.value=TRUE) and r2dtable() now work
correctly for large table entries (in the millions). Reported by
Sebastian Meyer and investigated by more helpers in PR#16184.
* Low-level socket read/write operations have been fixed to
correctl...
2020 Oct 10
0
R 4.0.3 is released
...dmargins(*, ..) now also works when fn() is a local function,
thanks to bug report and patch PR#17124 from Alex Bertram.
* rank(x) and hence sort(x) now work when x is an object (as per
is.object(x)) of type "raw" _and_ provides a valid `[` method,
e.g., for gmp::as.bigz(.) numbers.
* chisq.test(*, simulate.p.value=TRUE) and r2dtable() now work
correctly for large table entries (in the millions). Reported by
Sebastian Meyer and investigated by more helpers in PR#16184.
* Low-level socket read/write operations have been fixed to
correctl...
2012 Jan 20
4
extract fixed width fields from a string
Hi,
I have a data frame with one column containing string of the form "ABC...|XYZ..."
where ABC etc are fields of 6 alphanumeric characters each
and XYZ etc are fields of 8 alphanumeric characters each;
"|" is a mandatory separator;
I do not know in advance how many fields of each kind will each row contain.
I need to extract these fields from the string.
=== How do I do that?
2023 May 19
1
range() for Date and POSIXct could respect `finite = TRUE`
...for these.
> >> >>
> >> >> OTOH, there are quite a few other 'number-like' thingies for
> >> >> which I would then like to have range(*, finite=TRUE) work,
> >> >> e.g., "mpfr" (package {Rmpfr}) or "bigz" {gmp} numbers, numeric
> >> >> sparse matrices, ...
> >> >>
> >> >> To keep such methods all internally consistent with
> >> >> range.default(), I could envision something like this
> >> >>
>...