I need to calculate a module with a large number, for example:
<?php $largenum = 95635000009453274121700; echo $largenum % 97; ?>
It does not work ... because $ largenum is too big for an int in PHP.
Any idea how to do this?
Use from BCMath 's mathematical precision accuracy : bcmod()
bcmod()
$largenum = '95635000009453274121700'; echo bcmod($largenum, '97');
Note that it $largenumis passed as a string not converted to int.
$largenum
Source: https://habr.com/ru/post/1706581/More articles:How to get google appengine objects using their numeric identifier? - pythonJava Lombardi API - javaВ чем разница между представлением диспетчера и сервисом для работы с шаблоном проектирования? - java-eehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1706579/php-serverremoteaddr-sometimes-resolves-to-empty-string&usg=ALkJrhgpydepxlgJ7EO3lUR1J8pdDRDsZgRunning more than one instance of Evince - linuxUsing java, how do you get the amount of free space on the Solaris zfs file system? - javaCheck if content has been submitted in PHP - phpWhen should all thread synchronization objects be used? - multithreadingUnable to edit tags in CListCtrl - c ++How to encrypt data after using ajax and jquery? - jqueryAll Articles