;Requirements :
No Requirements is needed.
This extension makes use of the BIG_INT. BIG_INT is a library which provides a set of functions (API) to handle arbitrary length integers created by Alexander Valyalkin (valyala@gmail.com).
Function name | bi_base_convert |
Purpose | converts string representation of number big_int_str with base base_from
into string representation with base base_to.base_from and base_to can be from 2 to 36 inclusive.
Returns: converted string or NULL on error. |
Aggregate function | No |
Input parameter(s) | 3 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_base_convert('111110001111111001111111111110111111111111111111', 2, 10); |
Registration | CREATE FUNCTION bi_base_convert RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_base_convert; |
Function name | bi_add |
Purpose | calculates a + b. Returns: a + b or NULL on error. |
Aggregate function | No |
Input parameter(s) | 2 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_add('5778546498156149849843613211694798798465158056164', '1002465511477211'); |
Registration | CREATE FUNCTION bi_add RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_add; |
Function name | bi_sub |
Purpose | calculates a - b. Returns: a - b or NULL on error. |
Aggregate function | No |
Input parameter(s) | 2 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_sub('5778546498156149849843613211694798798465158056164', '1002465511477211'); |
Registration | CREATE FUNCTION bi_sub RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_sub; |
Function name | bi_mul |
Purpose | calculates a * b. Returns: a * b or NULL on error. |
Aggregate function | No |
Input parameter(s) | 2 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_mul('5778546498156149849843613211694798798465158056164', '1002465511477211'); |
Registration | CREATE FUNCTION bi_mul RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_mul; |
Function name | bi_div |
Purpose | calculates a / b. Returns: a / b or NULL on error. |
Aggregate function | No |
Input parameter(s) | 2 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_div('5778546498156149849843613211694798798465158056164', '1002465511477211'); |
Registration | CREATE FUNCTION bi_div RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_div; |
Function name | bi_mod |
Purpose | calculates a % b. Returns: a % b or NULL on error. |
Aggregate function | No |
Input parameter(s) | 2 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_mod('5778546498156149849843613211694798798465158056164', '1002465511477211'); |
Registration | CREATE FUNCTION bi_mod RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_mod; |
Function name | bi_sqr |
Purpose | calculates num. Returns: num or NULL on error. |
Aggregate function | No |
Input parameter(s) | 1 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_sqr('5778546498156149849843613211694798798465158056164''); |
Registration | CREATE FUNCTION bi_sqr RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_sqr; |
Function name | bi_abs |
Purpose |
string bi_abs(string num)
calculates abs(num).Returns: abs(num) or NULL on error. |
Aggregate function | No |
Input parameter(s) | 1 |
Conditions | - |
Output value(s) | 1 (STRING) |
Examples | SELECT bi_abs('5778546498156149849843613211694798798465158056164''); |
Registration | CREATE FUNCTION bi_abs RETURNS STRING SONAME "libbigint.so"; |
UNINSTALL | DROP FUNCTION IF EXISTS bi_abs; |