long numerus_double_to_parts(double value, short *twelfths)
Splits a double value to a pair of its integer part and a number of twelfths.
const char * numerus_explain_error(int error_code)
Returns a pointer to the human-friendly text description of any NUMERUS_ERROR_* error code...
const double NUMERUS_MIN_VALUE
The minimum value a roman numeral may have.
const char * NUMERUS_ZERO
The roman numeral of value 0 (zero).
short numerus_sign(char *roman, int *errcode)
Returns the sign of the roman numeral.
char * numerus_create_pretty_value_as_double(double double_value)
Allocates a string with a prettier representation of a double value of a roman numeral as integer par...
const long NUMERUS_MAX_LONG_NONFLOAT_VALUE
The maximum value a roman numeral with underscores without decimals may have.
long numerus_roman_to_int(char *roman, int *errcode)
Converts a roman numeral to its value floored and expressed as long integer.
Numerus error codes with their description.
const short NUMERUS_MAX_LENGTH
The maximum length a roman numeral string may have, including '\0'.
char * numerus_create_pretty_value_as_parts(long int_part, short twelfths)
Allocates a string with a prettier representation of a value as an integer and a number of twelfths...
char * numerus_int_to_roman(long int_value, int *errcode)
Converts a long integer value to a roman numeral with its value.
double numerus_roman_to_double(char *roman, int *errcode)
Converts a roman numeral to its value expressed as a double.
void numerus_shorten_and_same_sign_to_parts(long *int_part, short *twelfths)
Shortens the twelfths by adding the remainder to the int part so that they have the same sign...
const double NUMERUS_MAX_NONLONG_FLOAT_VALUE
The maximum value a roman numeral without underscores with decimals may have.
char * numerus_double_to_roman(double double_value, int *errcode)
Converts a double value to a roman numeral with its value.
const long NUMERUS_MIN_LONG_NONFLOAT_VALUE
The minimum value a roman numeral with underscores without decimals may have.
int numerus_error_code
The global error code variable to store any errors during conversions.
const double NUMERUS_MAX_VALUE
The maximum value a roman numeral may have.
char * numerus_int_with_twelfth_to_roman(long int_part, short twelfths, int *errcode)
Converts an integer value and a number of twelfths to a roman numeral with their sum as value...
char * numerus_overline_long_numerals(char *roman, int *errcode)
Allocates a string with a prettier representation of a long roman numeral with actual overlining...
long numerus_roman_to_int_part_and_twelfths(char *roman, short *twelfths, int *errcode)
Converts a roman numeral to its value expressed as pair of its integer part and number of twelfths...
const double NUMERUS_MIN_NONLONG_FLOAT_VALUE
The minimum value a roman numeral without underscores with decimals may have.
int numerus_cli(int argc, char **args)
Starts a command line interface that converts any typed value to a roman numeral or vice-versa...
short numerus_compare_value(char *roman_bigger, char *roman_smaller, int *errcode)
Compares the values of two roman numerals, emulating the operator '>'.
short numerus_count_roman_chars(char *roman, int *errcode)
Returns the number of roman characters in the roman numeral.
short numerus_is_zero(char *roman, int *errcode)
Verifies if the roman numeral is of value 0 (zero).
double numerus_parts_to_double(long int_part, short twelfths)
Converts a value expressed as sum of an integer part and a number of twelfths to a double...
short numerus_is_long_numeral(char *roman, int *errcode)
Verifies if the passed roman numeral is a long roman numeral (if contains a correct number of undersc...
short numerus_is_float_numeral(char *roman, int *errcode)
Verifies if the passed roman numeral is a float roman numeral (if contains decimal characters 'S' and...