This extension for Mediawiki adds arbitrary-precision arithmetic to Lua modules provided by the Scribunto extension. The modules call bcmath library for PHP through a minimal interface layer.
Help is available at BCmath documentation, with an introduction, references, and examples.
BCmath depends on modules from the Scribunto extension.
-
Download from Github zip and unpack the file(s) in a directory called BCmath in your extensions/ folder.
-
Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'BCmath' );
-
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
BCmath uses Mediawiki-Vagrant, and a complete setup can be made quite easily.
-
Make sure you have Vagrant, etc, prepare a development directory, and move to that directory.
-
Clone Mediawiki
git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant .
-
Run setup.
./setup.sh
-
Enable the role for Scribunto. This pulls in the role for Scribunto, which then pulls in additional roles.
vagrant roles enable scribunto
-
Start the instance.
vagrant up
-
Download from Github (zip) and place the file(s) in a directory called BCmath in your extensions/ folder.
-
Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'BCmath' );
-
Done.