Hosting de Calidad
  • Inicio
  • Precios y servicios
  • F.a.q y ayudas
  • Realizar pedido
  • Webs alojadas
  • Quienes somos
  • Foro HyD
  • Contacto

    Zona Dominios

    Entrar
    registro de dominios


    Zona Hosting

    Entrar
    alojamiento web


    5 Métodos de Pago
    Tarjeta de crédito
    Domiciliación
    Transferencia
    Soporte Epagado
    Soporte Paypal

    Liberalización .es

    Ver mas
    dominios .es


  •  
     
     
    GMP functions

    XXXVI_ GMP functions

    Introducción

    These functions allow you to work with arbitrary_length integers using the GNU MP library_

    These functions have been added in PHP 4_0_4_

    Nota: Most GMP functions accept GMP number arguments, defined as resource below_ However, most of these functions will also accept numeric and string arguments, given that it is possible to convert the latter to a number_ Also, if there is a faster function that can operate on integer arguments, it would be used instead of the slower function when the supplied arguments are integers_ This is done transparently, so the bottom line is that you can use integers in every function that expects GMP number_ See also the gmp_init() function_

    Aviso

    If you want to explicitly specify a large integer, specify it as a string_ If you don't do that, PHP will interpret the integer_literal first, possibly resulting in loss of precision, even before GMP comes into play_

    Nota: Esta extensión no está disponible en plataformas Windows

    Requerimientos

    You can download the GMP library from http://www_swox_com/gmp/_ This site also has the GMP manual available_

    You will need GMP version 2 or better to use these functions_ Some functions may require more recent version of the GMP library_

    Instalación

    In order to have these functions available, you must compile PHP with GMP support by using the __with_gmp option_

    Configuración en tiempo de ejecución

    Esta extensión no tiene directivas de configuración en php_ini_

    Tipos de recursos

    Esta extensión no tiene ningún tipo de recurso definido_

    Constantes predefinidas

    Estas constantes están definidas por esta extensión y estarán disponibles solamente cuando la extensión ha sido o bien compilada dentro de PHP o grabada dinámicamente en tiempo de ejecución_

    GMP_ROUND_ZERO (integer)

    GMP_ROUND_PLUSINF (integer)

    GMP_ROUND_MINUSINF (integer)

    Ejemplos

    Ejemplo 1_ Factorial function using GMP

    <?php
    function fact ($x) {
        if ($x <= 1) 
            return 1;
        else
            return gmp_mul ($x, fact ($x_1));
    }
    
    print gmp_strval (fact (1000)) _ "\n";
    ?>

    This will calculate factorial of 1000 (pretty big number) very fast_

    Ver también

    More mathmatical functions can be found in the sections BCMath Arbitrary Precision Mathematics Functions and Mathematical Functions_

    Tabla de contenidos
    gmp_abs __ Absolute value
    gmp_add __ Add numbers
    gmp_and __ Logical AND
    gmp_clrbit __ Clear bit
    gmp_cmp __ Compare numbers
    gmp_com __ Calculates one's complement of a
    gmp_div_q __ Divide numbers
    gmp_div_qr __ Divide numbers and get quotient and remainder
    gmp_div_r __ Remainder of the division of numbers
    gmp_div __ Divide numbers
    gmp_divexact __ Exact division of numbers
    gmp_fact __ Factorial
    gmp_gcd __ Calculate GCD
    gmp_gcdext __ Calculate GCD and multipliers
    gmp_hamdist __ Hamming distance
    gmp_init __ Create GMP number
    gmp_intval __ Convert GMP number to integer
    gmp_invert __ Inverse by modulo
    gmp_jacobi __ Jacobi symbol
    gmp_legendre __ Legendre symbol
    gmp_mod __ Modulo operation
    gmp_mul __ Multiply numbers
    gmp_neg __ Negate number
    gmp_or __ Logical OR
    gmp_perfect_square __ Perfect square check
    gmp_popcount __ Population count
    gmp_pow __ Raise number into power
    gmp_powm __ Raise number into power with modulo
    gmp_prob_prime __ Check if number is "probably prime"
    gmp_random __ Random number
    gmp_scan0 __ Scan for 0
    gmp_scan1 __ Scan for 1
    gmp_setbit __ Set bit
    gmp_sign __ Sign of number
    gmp_sqrt __ Square root
    gmp_sqrtrm __ Square root with remainder
    gmp_strval __ Convert GMP number to string
    gmp_sub __ Subtract numbers
    gmp_xor __ Logical XOR
     
       



    registro de dominios | alojamiento web | hosting por publicidad

       

     

    Manual de linux Manual de apache Manual de php Manual de mysql Manual de SQL Manual del Plesk Como funciona Paypal Manual de html