Limnoria/plugins/Math
Valentin Lorentz 63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
..
local Math: sync convertcore unit data with ConvertAll 0.7.2 2017-09-29 16:02:36 -07:00
locales Fix msgfmt warnings. 2020-03-26 22:10:28 +01:00
__init__.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
config.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
messages.pot Squashed commit of the following: 2014-12-20 14:37:27 +01:00
plugin.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
README.rst all plugins: regenerate READMEs 2021-04-22 00:29:15 +02:00
test.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00

Documentation for the Math plugin for Supybot

Purpose

This plugin provides a calculator, converter, a list of units and other useful math functions.

Usage

Provides commands to work with math, such as a calculator and a unit converter.

Commands

base <fromBase> [<toBase>] <number>

Converts <number> from base <fromBase> to base <toBase>. If <toBase> is left out, it converts to decimal.

calc <math expression>

Returns the value of the evaluated <math expression>. The syntax is Python syntax; the type of arithmetic is floating point. Floating point arithmetic is used in order to prevent a user from being able to crash to the bot with something like '10*101010'. One consequence is that large values such as '10*24' might not be exact.

convert [<number>] <unit> to <other unit>

Converts from <unit> to <other unit>. If number isn't given, it defaults to 1. For unit information, see 'units' command.

icalc <math expression>

This is the same as the calc command except that it allows integer math, and can thus cause the bot to suck up CPU. Hence it requires the 'trusted' capability to use.

rpn <rpn math expression>

Returns the value of an RPN expression.

units [<type>]

With no arguments, returns a list of measurement types, which can be passed as arguments. When called with a type as an argument, returns the units of that type.

Configuration

supybot.plugins.Math.public

This config variable defaults to "True", is not network-specific, and is not channel-specific.

Determines whether this plugin is publicly visible.