[PATCH v2 2/8] decimal: fix encoding numbers with positive exponent.

Konstantin Osipov kostja at tarantool.org
Tue Aug 13 00:18:38 MSK 2019


* Serge Petrenko <sergepetrenko at tarantool.org> [19/08/08 14:56]:
> When a number having a positive exponent is encoded, the internal
> decPackedFromNumber function returns a negative scale, which differs
> from the scale, returned by decimal_scale(). This leads to errors in
> decoding. Account for negative scale in decimal_pack() and
> decimal_unpack().

I don't understand this commit.

Why do you use mp_store_u8 + a cast to unsigned, not
mp_store_i8/mp_load_i8 without a cast?


-- 
Konstantin Osipov, Moscow, Russia



More information about the Tarantool-patches mailing list