Description Usage Arguments Value See Also Examples
This page documents utilities from package mpc.
1 2 3 | getPrec(z)
urandom.mpc(precision)
mpcVersion()
|
z |
An MPC object representing a complex number in arbitary precision floating point. |
precision |
The number of bits of precision that should be used to represent the returned complex number z. |
getPrec(z)
returns a integer
vector of length 2
where the first element contains the number of bits of precision
of the real part of z
and the second element contains the
number of bits of precision of the imaginary part of z
.
urandom.mpc(precision)
returns a uniformly distributed random
complex mpc
object in the unit square [0,1]*[0,1].
mpcVersion
returns the MPC library version as a string.
mpc
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(mpc)
z1 <- mpc(3, 100)
getPrec(z1) # 100 bits.
z2 <- mpc(3, 200)
getPrec(z2) # 200 bits.
z3 <- z1 + z2
getPrec(z3) # 200 bits
urandom.mpc(53)
urandom.mpc(53)
mpcVersion()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.