Roman Numeral Conversion API 0.0.4 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News Roman Numeral Conversion API 0.0.4 (Default branch)
# 1  
Old 02-02-2008
Roman Numeral Conversion API 0.0.4 (Default branch)

ImageRoman Numeral Conversion API performs Romannumeral conversions and formats date data usingRoman numerals and Latin. The romandate command issimilar to the standard Unix date command. Theromannum command provides command line conversionto and from Roman numerals. Libroman contains the functions roman_ctime(), roman_asctime(), and roman_strftime(). These functions provide the same functionality as ctime(), asctime(), and strftime() using Roman numerals to generate the strings.License: GNU General Public License v2Changes:
The long2roman() and roman2long() were re-named to int2roman() and roman2int(), which more closely match the actual data types used by these functions. The old function names will still work. roman2int() is more strict about the Roman numeral syntax. Invalid numerals such as VX, VV, IIIII, IC, and IXI now produce an error. Romannum now auto-detects the type of conversion to perform instead of depending on a command line switch.Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Numeral conversion in awk

I am running into conversion of string to numbers in awk that I can't understand and don't know how to deal with properly My script checks for numeric only field, I use this approach to do that: $1 + 0 == $1 It works most of the time, but in some cases it does not behave how I expect it to... (5 Replies)
Discussion started by: migurus
5 Replies
Login or Register to Ask a Question
NUMCONV(1)							   User Commands							NUMCONV(1)

NAME
numconv - convert numbers from one number system to another SYNOPSIS
Numconv <options> DESCRIPTION
numconv is a filter that converts integers from one number system to another. For example, it can convert from Roman Numerals such as "CCLVI" to ordinary Western numbers such as "256" or from Western numbers to Chinese. The great majority of number systems, both modern and ancient, are supported, including numerous variants. If the input number system is 'all', the number system will be autodetected. numconv is a command line interface to libuninum a library for converting between textual representations of numbers and machine-internal representations. Further information about the conversions performed is available in the documentation for this library. OPTIONS
-i <input file> Read input from the specified file. -o <output file> Write output into the specified file. -I Identify the number system of the input. -c List the available number system cover terms. -l List the available number systems. -f <input number system> Specify the number system of the input. -t <output number system> Specify the number system of the output. -b <input base> Specify the input base for Western numbers. The base must be in the range [1,36]. -B <output base> Specify the output base for Western numbers. The base must be in the range [1,36]. -g <output general group size> Specify the size of digit groups other than the ow-order group. The default is 3. -G <output low group size> Specify the size of the low-order group of digits. The default is 3. -s <output group separator character> Specify character to use as "thousands separator". The default is a comma. -L Set the output grouping parameters, general group size, first group size, and group separator character, according to the current locale. -m When generating Roman numerals, use unit characters with superscript macron for thousands greater than one instead of Ms. -h Print help information. -v Print version information. EXAMPLES
To convert from Roman Numerals to ordinary Western numbers: numconv -f Roman -t Western_Lower To convert from ordinary Western numbers to the variety of number in current use in the People's Republic of China: numconv -f Western -t Mandarin_Regular_Simplified To convert from ordinary Western numbers to Western numbers in base 2: numconv -f Western_Lower -t Western_Lower -B 2 To convert from Urdu numbers to Hindi numbers with the traditional Indian grouping: numconv -f Perso_Arabic -t Devanagari -g 2 SEE ALSO
libuninum (3) AUTHOR
Bill Poser (billposer@alum.mit.edu) LICENSE
GNU General Public License, version 2. (http://www.gnu.org/licenses/gpl.txt) numconv September 2007 NUMCONV(1)