[tarantool-patches] [PATCH 5/5] decimal: allow to index decimals
Konstantin Osipov
kostja at tarantool.org
Thu Jul 25 02:17:30 MSK 2019
* Serge Petrenko <sergepetrenko at tarantool.org> [19/07/17 18:34]:
> + * Max and min decimal numbers whose integral parts fit
> + * in a hint value.
> + */
> +static const decimal_t HINT_VALUE_DECIMAL_MAX = {
> + 18, /* decimal digits */
> + 0, /* exponent */
> + 0, /* no special bits. */
> + {487, 423, 303, 752, 460, 576} /* 576,460,752,303,423,488 = 2^59 - 1 */
> + /* 59 == HINT_VALUE_BITS - 1 */
> +};
I don't get the comments here, could you please expand?
> +static const decimal_t HINT_VALUE_DECIMAL_MIN = {
> + 18, /* decimal digits */
> + 0, /* exponent */
> + 0x80, /* negative bit */
> + {488, 423, 303, 752, 460, 576} /* 576,460,752,303,423,488 = 2^59 */
Same here, some magic numbers, which don't match each other.
> +};
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list