bigq                   package:gmp                   R Documentation

_L_a_r_g_e _s_i_z_e_d _r_a_t_i_o_n_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Type class supporting arithmetic operations on very large
     rationals.

_U_s_a_g_e:

     as.bigq(n, d = 1)
     as.character.bigq(x,b=10,...)
     as.double.bigq(x,...)
     as.bigz.bigq(a,mod=NA)
     is.na.bigq(x)
     print.bigq(x,...)
     denominator(x)
     numerator(x)

_A_r_g_u_m_e_n_t_s:

     n,d: Either integer, numeric or string value (String value: ither
          starting with '0x' for hexadecimal, '0b' for binary or
          without prefix for decimal values. Any format error results
          in '0'). n stands for numerator, d for denominator

       a: An element of class bigq

     mod: Optional modulus to convert into biginteger

       x: Numeric value

       b: Base: from 2 to 32

     ...: Additional parameters

_D_e_t_a_i_l_s:

     as.bigz.bigq returns the smallest integers not less than the
     corresponding rationals bigq.

_V_a_l_u_e:

     A bigq class representing the parameter value.

_A_u_t_h_o_r(_s):

     Antoine Lucas

_R_e_f_e_r_e_n_c_e_s:

     http://mulcyber.toulouse.inra.fr/projects/gmp/

_E_x_a_m_p_l_e_s:

     x <- as.bigq(21,6)
     x
     # 7 / 2
     # Wow ! result is simplified.

     y <- as.bigq(5,3)

     # addition work !
     x + y

     # You can even try multiplication, division...
     x * y / 13 

     # convert to string, double
     as.character(x)
     as.double(x)

