The dozenal package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Warnings:

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


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.0
Change logNone available
Dependenciesbase (==4.7.*) [details]
LicenseGPL-3
AuthorSiddhanathan Shanmugam
Maintainersiddhanathan@gmail.com
CategoryMath
Home pagehttps://github.com/siddhanathan/dozenal
UploadedSat Apr 11 17:40:37 UTC 2015 by siddhanathan

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for dozenal-0.1.0.0

dozenal

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

Usage

Create number using: (Dozenal String)

Example: Dozenal "1X"

Permitted digits: [0..9] ++ "X" ++ "E"

Dozenal is an instance of the Num class, so you can do numerical computations with it.

Example:

(Dozenal "10")^2

(Dozenal "10") + (Dozenal "10")

Limitations

Internally, the string is converted to decimal and calculations proceed in decimal. Once calculations are done, the decimal digit is converted back to dozenal. This means that, you may run into an error if the base conversion is not possible. Converting from a higher base to a lower base can sometimes not be possible (usually only when there are floting point numbers or numbers after the dit - decimal point equivalent in dozenal).

Also, the current implementation uses only integers, and does not support floating point numbers.