Tag Archives: base conversion

Ayeri number word converter in Python

Just a little something I started programming a while ago and elaborated on to make it useable today. It’s a little Python program which turns a base-10 number into its corresponding number word in Ayeri: Ayerinumbers.py on Github

  • The code is probably a bit unnecessarily complicated, because it tries to mimic Ayeri’s grammar rather than being mathematically straightforward. I may rewrite things in the future to make more sense from an engineer’s point of view.

Base converter shortcode WordPress plugin

A plugin to convert numbers in base 10 to other number bases, including their decimal places. You can insert this into pages and posts with a shortcode:


  • no is a real number, decimal places are set off by a dot, so a valid input is e.g. 12.3456.
  • base is the base you want to convert to as an integer, e.g. 12.
  • prec is an integer number that defines how many places you want after the decimal point. If you leave this out, the number returned will have the same number of places after the dot as the input. A valid input would be e.g. 3.
  • show is a boolean value, i.e. either 0 for ‘no’ or 1 for ‘yes’, that enables or disables showing the base of the result as an index after it, like 10A₁₂. If you leave this out, 0 will be assumed.

For example, the following codes gives the following result:

[​base no="1234" base="2" show="1"​]
[base no=”1234″ base=”2″ show=”1″]

[​base no="123.4567" base="16" show="0"​]
[base no=”123.4567″ base=”16″ show=”0″]

The script can also round up or down:

[​base no="0.142857" base="12" prec="20"]
[base no=”0.142857″ base=”12″ prec=”20″]

The same, shortened to 3 places:
[​base no="0.142857" base="12" prec="3"​]
[base no=”0.142857″ base=”12″ prec=”3″]

The same, shortened to 5 places:
[​base no="0.142857" base="12" prec="5"​]
[base no=”0.142857″ base=”12″ prec=”5″]