Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

PHP calculates two very large integers

Shulou Source: shulou.com Published: 2022-06-03 06:08:38 11月24日 Update

Function getIntAdd ($a _ r _ r _ b) {

$c =''

$bCount = strlen ($b)

$aCount = strlen ($a)

$count = max ($bCount,$aCount)

$aDiff = $count-$aCount

$bDiff = $count-$bCount

For ($I = $count-1 * * > = 0 * -) {

$aVal = $count-$I = $count-$I) {

C = ($v + intval ($c [0])) .strlen ($c)-1). Substr

} else {

$c = $v.roomc.'

}

}

Return $c

}

A = '23490234328490289048902384908392849238'

$b = '234320498324982390489328498230984982399290384902384'

$c = getIntAdd ($a. M. B)

Print_r ($c)

Tags: Two integers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB NVidia Linux Xiaomi Redmi