PHP gmp_jacobi() FunctionThe gmp_jacobi() function is a built-in function that takes two GMP numbers, $numbers1 and $numbers2, as input and generates the Jacobi symbol. $numbers2 should be an odd and positive value. SyntaxThe following syntax shows the PHP GMP Jacobi symbol function. Parameters
Return ValuesThis function shows a GMP number or a GMP object (PHP 5.6 and above) that is the Jacobi of the numbers. ExamplesThe following example shows the Jacobi symbol of the different numbers and GMP parameters. Example1: the given code shows the Jacobi symbol of the essential and positive values. Output: The image shows the Jacobi symbol of the given two values. Example2: the given code shows the Jacobi symbol of the required and negative values. We can see the difference between output values with negative parameters. Output: The image shows the Jacobi symbol of the given two values. Example3: the following example shows the gmp_jacobi() function with variable parameter and its value Output: The image shows the Jacobi symbol of the given value. Example4: the following example shows the gmp_jacobi() function with GMP parameter and its value Output: The image shows the Jacobi symbol of the given value. ConclusionThe gmp_jacobi() function displays the Jacobi symbol of the given value. The parameter value must be odd to use the function to work the GMP Jacobi operation. Next TopicPHP gmp_legendre() Function |