|
użytkowników online: 13
|
OPINIE UŻYTKOWNIKÓW
|
Przyznam, że jestem pod sporym wrażeniem. Od wielu lat zajmuje się grafiką przeznaczoną do druku ze szczególnym uwzględnieniem opakowań. Z radością stwierdzam, iż twórca serwisu jest moim ulubionym typem potencjalnego współpracownika (choć branża troszeczkę inna) tzn. pada pytanie i błyskawicznie pada konkretna odpowiedź bez względu na stopień skomplikowania pytania. Gorąco polecam współpracę, gdyż macie pewność że nie zostaniecie potraktowani sloganami typu "oczywiście", "nie ma sprawy" tylko otrzymacie konkretną pomoc. Tak trzymać! Na pewno jeszcze nie raz skorzystam
Paweł
Studio Gama
|
|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
gmp_init (PHP 4 >= 4.0.4, PHP 5) gmp_init -- Create GMP number Descriptionresource gmp_init ( mixed number [, int base] )
Creates a GMP number from an integer or string. String
representation can be decimal or hexadecimal. In the latter case,
the string should start with 0x.
Optional parameter base is available since
PHP 4.1.0.
Przykład 1. Creating GMP number |
<?php
$a = gmp_init(123456);
$b = gmp_init("0xFFFFDEBACDFEDF7200");
?>
|
|
Notatka:
It is not necessary to call this function if you want to use
integer or string in place of GMP number in GMP functions, like
gmp_add(). Function arguments are
automatically converted to GMP numbers, if such conversion is
possible and needed, using the same rules as
gmp_init().
User Contributed Notesthomas dot hebinck at digionline dot de
18-Aug-2005 07:23
If you call a gmp_* function directly with an interger as parameter, this integer MUST NOT be 0:
for($i=-1;$i<=1;$i++) { echo gmp_strval(gmp_add(2,gmp_mul(1,$i))) . ' '; }
The result is 1 0 3 (wrong)
In this case you have to use gmp_init():
for($i=-1;$i<=1;$i++) { echo gmp_strval(gmp_add(2,gmp_mul(1,gmp_init($i)))) . ' '; }
The result is 1 2 3 (right)
Happy number crunching! :-)
|