Subversion Repositories oidplus

Rev

Rev 846 | Rev 1042 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 846 Rev 874
Line 3... Line 3...
3
/**
3
/**
4
 * Pure-PHP 64-bit BigInteger Engine
4
 * Pure-PHP 64-bit BigInteger Engine
5
 *
5
 *
6
 * PHP version 5 and 7
6
 * PHP version 5 and 7
7
 *
7
 *
-
 
8
 * @category  Math
-
 
9
 * @package   BigInteger
8
 * @author    Jim Wigginton <terrafrost@php.net>
10
 * @author    Jim Wigginton <terrafrost@php.net>
9
 * @copyright 2017 Jim Wigginton
11
 * @copyright 2017 Jim Wigginton
10
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
12
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
11
 * @link      http://pear.php.net/package/Math_BigInteger
13
 * @link      http://pear.php.net/package/Math_BigInteger
12
 */
14
 */
Line 16... Line 18...
16
/**
18
/**
17
 * Pure-PHP 64-bit Engine.
19
 * Pure-PHP 64-bit Engine.
18
 *
20
 *
19
 * Uses 64-bit integers if int size is 8 bits
21
 * Uses 64-bit integers if int size is 8 bits
20
 *
22
 *
-
 
23
 * @package PHP
21
 * @author  Jim Wigginton <terrafrost@php.net>
24
 * @author  Jim Wigginton <terrafrost@php.net>
-
 
25
 * @access  public
22
 */
26
 */
23
class PHP64 extends PHP
27
class PHP64 extends PHP
24
{
28
{
25
    // Constants used by PHP.php
29
    // Constants used by PHP.php
26
    const BASE = 31;
30
    const BASE = 31;
Line 245... Line 249...
245
     *
249
     *
246
     * {@internal Could return $this->subtract($x), but that's not as fast as what we do do.}
250
     * {@internal Could return $this->subtract($x), but that's not as fast as what we do do.}
247
     *
251
     *
248
     * @param PHP64 $y
252
     * @param PHP64 $y
249
     * @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
253
     * @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
-
 
254
     * @access public
250
     * @see self::equals()
255
     * @see self::equals()
251
     */
256
     */
252
    public function compare(PHP64 $y)
257
    public function compare(PHP64 $y)
253
    {
258
    {
254
        return parent::compareHelper($this->value, $this->is_negative, $y->value, $y->is_negative);
259
        return parent::compareHelper($this->value, $this->is_negative, $y->value, $y->is_negative);