You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for roman numerals with integer values outside of [-3999, 3999]
emulating the overlined notation of characters with values multiplied
by 1000. Numerus uses underscores to indicate overlined parts of a numeral,
which in this case is called long roman numeral.
Support for roman numerals with twelfths as an approximation of fractional
parts of the value using characters S for 1/2 and dot . for 1/12.
The numerals in this case are called float roman numerals.
More constants indicating the extremes of the value range for different
types of roman numerals.
Numeral analysis functions:
check if a numeral has value zero;
check if a numeral is a long numeral;
check if a numeral is a float numeral;
count the number of roman character - and find any illegal ones.
Twelfth management functions:
convert a double from and to an integer value plus a number of twelfths;
shorten an integer value and a number of twelfths.
Human readability functions:
prettify a long roman numerals with actual overlining;
prettify an integer value and a number of twelfths with shortening;
error code explanation generation.
Command Line Interface (CLI) to quickly convert any value; also parses
any command line arguments (main arguments) as a CLI command, allowing easy
pipelining of the executable in the system shell.
Changed
Roman numerals' syntax check is performed without regex-es, making it ~75%
faster, while making the conversion function support the new roman numeral
formats as well.
Because of the previous point, it's possible to catch a more precise error
when the syntax is wrong.
Error codes are used much much more, they have different (clearer) names
and better values overall. They are returned as a passed parameter pretty
much everywhere, making the user able to understand the exact problem.
Function names have changed to a more understandable version.
All code is completely rewritten, carefully optimized and (trying to be)
foolproof.
Fixed
All roman numerals are now case insensitive.
Roman numerals are initially checked if NULL or empty. Any leading
whitespace is ignored.
malloc() failures are controlled and returned in the error code.