13.11.2016 17:06, Dmitry Yemanov wrote:
> 11.11.2016 18:26, Dimitry Sibiryakov wrote:
>
>>> - Added new datatypes: DECFLOAT(16) and DECFLOAT(34), using 64/128 bits
>>> for numbers representation.
>>
>> What is the point of these new types? Cannot you just expand list of 
>> back-end storage
>> for standard DECIMAL?
>
> This is my concern too. What is the user-visible difference between
> NUMERIC(15) based on blr_int64 and DECFLOAT(15) based on blr_dec64? Are
> both arithmetics compatible and if not then why? I bet we have a demand
> for longer standard NUMERICs rather than for non-standard DECFLOAT.

   New datatypes still allows us to implement *fixed-point* DECIMAL\NUMERIC on 
top of
DECFLOAT. From the other side, DECFLOAT types is not fixed point and looks more 
like
floating point. Floating point numbers is much more convenient for end-users 
than
fixed-point, i believe. Floating point *decimal* numbers offers both absence of 
fixed
point (and needs to take into account scale of datatype) and better ("natural")
precision of calculations (like our int-scaled decimals). DecNumber library 
used by Alex
is based on IEEE standard which already supported by some compilers and even 
some HW.
Probably it will be supported by Intel too.

> Moreover, what are we going to do when people ask as for precisions
> beyond the 34 decimal digits?

   I'm far not sure it have any real demands outside of scient world (where 
Firebird is
almost not ysed). But...

> Introduce blr_dec256/blr_dec512/etc or
> switch to blr_varydec backed by decNumber (and probably stored as packed
> BCD)?

   ...decNumber library also "support arbitrary precision arithmetic (up to 
999,999,999
decimal digits, with exponents up to 9 digits)", so we could just continue to 
use it.
And, yes, we will need new datatype for it (and blr code).

> Are there any reasons why the current implementation doesn't
> follow this way other than hardware accelerated computations for 64/128
> bits?

   Hope some reasons is explained above :)

Regards,
Vlad

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to