[MDEV-6366] Data type for long numbers with floating point Created: 2014-06-19 Updated: 2015-11-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Petr | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | datatype, numbers | ||
| Description |
|
Add a datatype for floating point numbers with user selected mantissa length. |
| Comments |
| Comment by Sergei Golubchik [ 2014-06-20 ] |
|
Could you show an example of that, please? |
| Comment by Petr [ 2014-06-20 ] |
|
An example of what? Of using such types? |
| Comment by Sergei Golubchik [ 2014-07-21 ] |
|
ah, ok. This is our DECIMAL() data type, it already exists. See https://mariadb.com/kb/en/decimal |
| Comment by Petr [ 2014-07-22 ] |
|
If I am not mistaken, it is a fixed-point type and the maximum number of digits is 65. So this type cannot represent such numbers as 10^300. |
| Comment by Sergei Golubchik [ 2014-07-22 ] |
|
NUMERIC type in PostgreSQL is a fixed-point type too, as far as I can see. Our best match is DECIMAL type. But it doesn't support 300 digits of precision, indeed. So I suppose you want longer DECIMAL numbers, right? |
| Comment by Petr [ 2014-07-22 ] |
|
No, I want a type like "REAL" but with a user selected precision (mantissa length). An exponenta length can be user selected or unlimited. For example, Boost (http://www.boost.org/doc/libs/1_55_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html) and GNU MPFR deals with such numbers. |