Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (38 sloc) 2.13 KB

BCmath

stability-experimental GitHub issues

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.

Usage

BCmath depends on modules from the Scribunto extension.

  1. Download from Github zip and place the file(s) in a directory called BCmath in your extensions/ folder.

  2. Add the following code at the bottom of your LocalSettings.php:

    wfLoadExtension( 'BCmath' );
  3. Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Development

Expect uses Mediawiki-Vagrant, and a complete setup can be made quite easily.

  1. Make sure you have Vagrant, etc, prepare a development directory, and move to that directory.

  2. Clone Mediawiki

    git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant .
  3. Run setup.

    ./setup.sh
  4. Enable the role for Scribunto. This pulls in the role for Scribunto, which then pulls in additional roles.

    vagrant roles enable scribunto
  5. Start the instance.

    vagrant up
  6. Download from Github (zip) and place the file(s) in a directory called BCmath in your extensions/ folder.

  7. Add the following code at the bottom of your LocalSettings.php:

    wfLoadExtension( 'BCmath' );
  8. Done.

You can’t perform that action at this time.