Working with large numbers in PHP

前端 未结 8 880
一个人的身影
一个人的身影 2020-11-22 11:22

To use modular exponentiation as you would require when using the Fermat Primality Test with large numbers (100,000+), it calls for some very large calculations.

Whe

8条回答
  •  难免孤独
    2020-11-22 11:54

    use this

     $num1 = "123456789012345678901234567890";
     $num2 = "9876543210";
     $r    = mysql_query("Select @sum:=$num1 + $num2");
     $sumR = mysql_fetch_row($r);
     $sum  = $sumR[0];
    

提交回复
热议问题