dozenal-0.1.0.0: A Haskell library for using Dozenal (Duodecimal - Base 12) numbers.

Copyright(C) 2014 Siddhanathan Shanmugam
LicenseLGPL (see LICENSE)
Maintainersiddhanathan@gmail.com
Portabilityvery
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Dozenal

Description

Dozenal (Duodecimal) number system, promoting the use of base 12.

The dozenal number system is superior to the decimal number system which is widely in use today.

For information on why you should bother, see http://io9.com/5977095/why-we-should-switch-to-a-base-12-counting-system

Example usage:

  module Main where
  import Math.Dozenal
  main = print $ (Dozenal "4")^2

Synopsis

Documentation

decimalToDozenal :: Int -> Dozenal Source

Convert a decimal int to a dozenal string

dozenalToDecimal :: String -> Maybe Int Source

Convert a dozenal string to a decimal integer if base conversions allow it

newtype Dozenal Source

Dozenal numbers need to be represented as strings since they contain more than 9 digits

Constructors

Dozenal 

Fields

number :: String