platform: | Linux. |
---|---|
synopsis: | Conversion and calculating functions set for bases 2, 8, 10 and 16, written in C. |
Module author: Eddie Bruggemann <mrcyberfighter@gmail.com>
Take an binar integer string as argument and return the converted value as an integer string.
The binar string must be in form: [-][0b][01] (the “0b” identifier is optional).
- Maximal represented value: 9223372036854775807.
- Minimal represented value: -9223372036854775808.
Corresponding to the C type: long long int
Raises OverflowError: | |
---|---|
If the binar string represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar string is not in the format: [-][0b][01]. |
Take an octal integer string as argument and return the converted value as an integer string.
The octal string must be in form: [-][0][0-7] (the “0” identifier is optional).
- Maximal represented value: 9223372036854775807.
- Minimal represented value: -9223372036854775808.
Corresponding to the C type: long long int
Raises OverflowError: | |
---|---|
If the octal string represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal string is not in the format: [-][0][0-7]. |
Take an hexadecimal integer string as argument and return the converted value as an integer string.
The hexadecimal string must be in form: [-][0x][0-9A-Fa-f] (the “0x” identifier is optional).
- Maximal represented value: 9223372036854775807.
- Minimal represented value: -9223372036854775808.
Corresponding to the C type: long long int
Raises OverflowError: | |
---|---|
If the hexadecimal string represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal string is not in the format: [-][0x][0-9A-Fa-f]. |
Take a binar float string as argument and return the converted value as an float string.
The binar string must be in form: [-][0b][01][.][01] (the “0b” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar string integer part represent an value greater as 9223372036854775807 or littler as -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar string is not in the format: [-][0b][01].[01]. |
Take a octal float string as argument and return the converted value as an float string.
The octal string must be in form: [-][0][0-7][.][0-7] (the “0” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal string integer part represent an value greater as 9223372036854775807 or littler as -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal string is not in the format: [-][0][0-7][.][0-7]. |
Take a hexadecimal float string as argument and return the converted value as an float string.
The hexadecimal string must be in form: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f] (the “0x” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal string integer part represent an value greater as 9223372036854775807 or littler as -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal string is not in the format: [-][0x][0-9A-Fa-f].[0-9A-Fa-f]. |
Take 2 binar integer string as input return the summe as an integer string.
The binar strings must be in form: [-][0b][01] (the “0b” identifier is optional).
- Addition maximal result value: 9223372036854775807.
- Addition minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the binar strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the binar strings addition result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01]. |
Take 2 binar integer string as input return the substract as an integer string.
The binar strings must be in form: [-][0b][01] (the “0b” identifier is optional).
- Substraction maximal result value: 9223372036854775807.
- Substraction minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the binar strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the binar strings substraction result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01]. |
Take 2 binar integer string as input return the product as an integer string.
The binar strings must be in form: [-][0b][01] (the “0b” identifier is optional).
- Product maximal result value: 9223372036854775807.
- Product minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the binar strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the binar strings product result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01]. |
Take 2 binar integer string as input return the quotient as an float string.
The binar strings must be in form: [-][0b][01] (the “0b” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the binar strings quotient result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01]. |
Take 2 octal integer string as input return the summe as an integer string.
The octal strings must be in form: [-][0][0-7] (the “0” identifier is optional).
- Addition maximal result value: 9223372036854775807.
- Addition minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the octal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the octal strings addition result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7]. |
Take 2 octal integer string as input return the substract as an integer string.
The octal strings must be in form: [-][0][0-7] (the “0” identifier is optional).
- Substraction maximal result value: 9223372036854775807.
- Substraction minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the octal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the octal strings substraction result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7]. |
Take 2 octal integer string as input return the product as an integer string.
The octal strings must be in form: [-][0][0-7] (the “0” identifier is optional).
- Product maximal result value: 9223372036854775807.
- Product minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the octal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the octal strings product result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7]. |
Take 2 octal integer string as input return the quotient as an float string.
The octal strings must be in form: [-][0][0-7] (the “0” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the octal strings quotient result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7]. |
Take 2 hexadecimal integer string as input return the summe as an integer string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f] (the “0x” identifier is optional).
- Addition maximal result value: 9223372036854775807.
- Addition minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the hexadecimal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the hexadecimal strings addition result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f]. |
Take 2 hexadecimal integer string as input return the substract as an integer string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f] (the “0x” identifier is optional).
- Substraction maximal result value: 9223372036854775807.
- Substraction minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the hexadecimal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the hexadecimal strings substraction result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f]. |
Take 2 hexadecimal integer string as input return the product as an integer string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f] (the “0x” identifier is optional).
- Product maximal result value: 9223372036854775807.
- Product minimal result value: -9223372036854775808.
Raises OverflowError: | |
---|---|
If the hexadecimal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the hexadecimal strings product result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f]. |
Take 2 hexadecimal integer string as input return the quotient as an float string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f] (the “0x” identifier is optional).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal strings represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises OverflowError: | |
---|---|
If the hexadecimal strings quotient result is greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f]. |
Take 2 binar float string as input return the summe as an float string.
The binar strings must be in form: [-][0b][01].[01] (the “0b” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire binar string can contains 128 binary digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01].[01]. |
Take 2 binar float string as input return the substract as an float string.
The binar strings must be in form: [-][0b][01].[01] (the “0b” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire binar string can contains 128 binary digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01].[01]. |
Take 2 binar float string as input return the product as an float string.
The binar strings must be in form: [-][0b][01].[01] (the “0b” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire binar string can contains 128 binary digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01].[01]. |
Take 2 binar float string as input return the quotient as an float string.
The binar strings must be in form: [-][0b][01].[01] (the “0b” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire binar string can contains 128 binary digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the binar strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the binar strings are not in the format: [-][0b][01].[01]. |
Take 2 octal float string as input return the summe as an float string.
The octal strings must be in form: [-][0][0-7].[0-7] (the “0” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire octal string can contains 48 octal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7].[0-7]. |
Take 2 octal float string as input return the substract as an float string.
The octal strings must be in form: [-][0][0-7].[0-7] (the “0” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire octal string can contains 48 octal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7].[0-7]. |
Take 2 octal float string as input return the product as an float string.
The octal strings must be in form: [-][0][0-7].[0-7] (the “0” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire octal string can contains 48 octal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7].[0-7]. |
Take 2 octal float string as input return the quotient as an float string.
The octal strings must be in form: [-][0][0-7].[0-7] (the “0” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire octal string can contains 48 octal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the octal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the octal strings are not in the format: [-][0][0-7].[0-7]. |
Take 2 hexadecimal float string as input return the summe as an float string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f] (the “0x” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire hexadecimal string can contains 16 hexadecimal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f]. |
Take 2 hexadecimal float string as input return the substract as an float string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f] (the “0x” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire hexadecimal string can contains 16 hexadecimal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f]. |
Take 2 hexadecimal float string as input return the product as an float string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f] (the “0x” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire hexadecimal string can contains 16 hexadecimal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f]. |
Take 2 hexadecimal float string as input return the quotient as an float string.
The hexadecimal strings must be in form: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f] (the “0x” identifier is optional).
The function can threads 8 bytes values for the integer part from the float, in the C type long long int value range:
- Maximal integer part value: 9223372036854775807.
- Minimal integer part value: -9223372036854775808.
The entire hexadecimal string can contains 16 hexadecimal digits (without identifier, sign and comma.).
The returned result is limited to the C type double: 15 digits precision. But the module compute internally with the C type long double.
Raises OverflowError: | |
---|---|
If the hexadecimal strings integer part represent an value greater than 9223372036854775807 or littler than -9223372036854775808. |
Corresponding to the range of the C type: long long int
Raises ValueError: | |
---|---|
If the hexadecimal strings are not in the format: [-][0x][0-9A-Fa-f][.][0-9A-Fa-f]. |