Query: gmp_sign
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GMP_SIGN(3) 1 GMP_SIGN(3) gmp_sign - Sign of numberSYNOPSISint gmp_sign (GMP $a)DESCRIPTIONChecks the sign of a number.PARAMETERSo $a -Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.RETURN VALUESReturns 1 if $a is positive, -1 if $a is negative, and 0 if $a is zero.EXAMPLESExample #1 gmp_sign(3) example <?php // positive echo gmp_sign("500") . " "; // negative echo gmp_sign("-500") . " "; // zero echo gmp_sign("0") . " "; ?> The above example will output: 1 -1 0SEE ALSOgmp_abs(3), abs(3). PHP Documentation Group GMP_SIGN(3)
Related Man Pages |
---|
gmp_div_qr(3) - php |
gmp_gcdext(3) - php |
gmp_hamdist(3) - php |
gmp_random(3) - php |
dateinterval.format(3) - php |
Similar Topics in the Unix Linux Community |
---|
Simple rules of the UNIX.COM forums: |
Coming Soon: Upgrade Forum Software (Dec 31 - Jan 1) |
Status of UNIX.COM Forum Transformation |
Please Welcome Nicki Paul to the Moderator Team! |