Downloads
Documentation
Get Involved
Help
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
User Submitted Data
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
gmp_abs »
« 示例
PHP 手册
函数参考
数学扩展
GMP
Change language:
English
Chinese (Simplified)
Other
GMP 函数
参见
More mathematical functions can be found in the
数学扩展
section
目录
gmp_abs
— Absolute value
gmp_add
— Add numbers
gmp_and
— Bitwise AND
gmp_binomial
— Calculates binomial coefficient
gmp_clrbit
— Clear bit
gmp_cmp
— Compare numbers
gmp_com
— Calculates one's complement
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
— 别名 gmp_div_q
gmp_divexact
— Exact division of numbers
gmp_export
— Export to a binary string
gmp_fact
— Factorial
gmp_gcd
— Calculate GCD
gmp_gcdext
— Calculate GCD and multipliers
gmp_hamdist
— Hamming distance
gmp_import
— Import from a binary string
gmp_init
— Create GMP number
gmp_intval
— Convert GMP number to integer
gmp_invert
— Inverse by modulo
gmp_jacobi
— Jacobi symbol
gmp_kronecker
— Kronecker symbol
gmp_lcm
— Calculate LCM
gmp_legendre
— Legendre symbol
gmp_mod
— Modulo operation
gmp_mul
— Multiply numbers
gmp_neg
— Negate number
gmp_nextprime
— Find next prime number
gmp_or
— Bitwise OR
gmp_perfect_power
— Perfect power check
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_bits
— Random number
gmp_random_range
— Get a uniformly selected integer
gmp_random_seed
— Sets the RNG seed
gmp_random
— Random number
gmp_root
— Take the integer part of nth root
gmp_rootrem
— Take the integer part and remainder of nth root
gmp_scan0
— Scan for 0
gmp_scan1
— Scan for 1
gmp_setbit
— Set bit
gmp_sign
— Sign of number
gmp_sqrt
— Calculate square root
gmp_sqrtrem
— Square root with remainder
gmp_strval
— Convert GMP number to string
gmp_sub
— Subtract numbers
gmp_testbit
— Tests if a bit is set
gmp_xor
— Bitwise XOR
Improve This Page
Learn How To Improve This Page
•
Submit a Pull Request
•
Report a Bug
+
add a note
User Contributed Notes
There are no user contributed notes for this page.