国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

首頁 PHP 函式庫 其它類別庫 處理特大數(shù)字的PHP庫
處理特大數(shù)字的PHP庫
<?php
namespace Moontoast\Math;
class BigNumberTest extends \PHPUnit_Framework_TestCase
{
    protected function setUp()
    {
        ini_set('bcmath.scale', 0);
    }
    /**
     * @covers Moontoast\Math\BigNumber::__construct
     * @covers Moontoast\Math\BigNumber::getValue
     * @covers Moontoast\Math\BigNumber::getScale
     * @covers Moontoast\Math\BigNumber::setValue
     * @covers Moontoast\Math\BigNumber::filterNumber
     * @covers Moontoast\Math\BigNumber::setDefaultScale
     */
    public function testConstruct()
    {
        $bn1 = new BigNumber('9,223,372,036,854,775,808');
        $this->assertSame('9223372036854775808', $bn1->getValue());
        $this->assertEquals(0, $bn1->getScale());
        $bn2 = new BigNumber(2147483647);
        $this->assertSame('2147483647', $bn2->getValue());
        $this->assertEquals(0, $bn2->getScale());

這是一份處理特大數(shù)字的PHP函式庫,需要的朋友可以下載使用。

免責(zé)聲明

本站所有資源皆由網(wǎng)友貢獻(xiàn)或各大下載網(wǎng)站轉(zhuǎn)載。請自行檢查軟體的完整性!本站所有資源僅供學(xué)習(xí)參考。請不要將它們用於商業(yè)目的。否則,一切後果都由您負(fù)責(zé)!如有侵權(quán),請聯(lián)絡(luò)我們刪除。聯(lián)絡(luò)方式:admin@php.cn

相關(guān)文章

如何使用 PHP 中的 BigInteger 類別處理大整數(shù)? 如何使用 PHP 中的 BigInteger 類別處理大整數(shù)?

21 Oct 2024

在 PHP 中使用 BigInteger 類別 PHP 提供了多種處理大整數(shù)值的方法。 BigInteger 類別就是這樣的選項(xiàng)之一。但是,您可以使用外部程式庫

如何處理 PHP 和 MySQL 中的特殊字元? 如何處理 PHP 和 MySQL 中的特殊字元?

20 Nov 2024

PHP 和 MySQL 中的特殊字元編碼資料庫特殊字元的儲存和檢索,特別是在諸如...之類的語言中使用的字符

Python 如何處理極大的數(shù)字? Python 如何處理極大的數(shù)字?

12 Nov 2024

在 Python 中處理大量數(shù)值One 可能會(huì)遇到 Python 中傳統(tǒng)數(shù)值資料型別不足以處理的情況...

PHP如何處理數(shù)據(jù)庫連接,特別是PDO? PHP如何處理數(shù)據(jù)庫連接,特別是PDO?

13 Jul 2025

phphandlesdatabaseconnections securelyandflexsife fusepodothroughSeveralKeysteps.1.AconNectionSestabledsabledseStabledsbabledsnnsn,用戶名和passpasswordwardwrappedInatry-catchblocktohandleexpections.2.pdo.pdo.pdo'serrorhandling’serrorhandlingingissonfiguredusingusingusingusingusingsetttributibute()

C 如何處理任意大的數(shù)字? C 如何處理任意大的數(shù)字?

01 Dec 2024

C 中的大數(shù)字庫大型數(shù)值計(jì)算通常需要處理超出本機(jī)整數(shù)資料類型容量的數(shù)字...

BigInt 或外部函式庫:JavaScript 應(yīng)如何處理大數(shù)字? BigInt 或外部函式庫:JavaScript 應(yīng)如何處理大數(shù)字?

25 Nov 2024

在 JavaScript 中處理大數(shù):本機(jī) BigInt 與外部函式庫JavaScript 缺乏處理大數(shù)的內(nèi)建解決方案,因此...

See all articles