From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Serge Petrenko <sergepetrenko@tarantool.org>
Subject: Re: [tarantool-patches] [PATCH 5/5] decimal: allow to index decimals
Date: Thu, 25 Jul 2019 02:17:30 +0300 [thread overview]
Message-ID: <20190724231730.GE15185@atlas> (raw)
In-Reply-To: <bf9fd4370d85cb24e7dae30a45bea9453569cf05.1563376957.git.sergepetrenko@tarantool.org>
* Serge Petrenko <sergepetrenko@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
prev parent reply other threads:[~2019-07-24 23:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 15:33 [PATCH 0/5] Decimal indices Serge Petrenko
2019-07-17 15:33 ` [PATCH 1/5] decimal: fix decimal.round() when scale == 0 Serge Petrenko
2019-07-24 12:10 ` Vladimir Davydov
2019-07-24 23:02 ` [tarantool-patches] " Konstantin Osipov
2019-07-17 15:33 ` [PATCH 2/5] decimal: allow to encode/decode decimals as MsgPack Serge Petrenko
2019-07-24 16:19 ` Vladimir Davydov
2019-07-24 23:08 ` [tarantool-patches] " Konstantin Osipov
2019-07-17 15:33 ` [PATCH 3/5] lua: allow to encode and decode decimals as msgpack Serge Petrenko
2019-07-24 14:11 ` Vladimir Davydov
2019-07-24 23:10 ` [tarantool-patches] " Konstantin Osipov
2019-07-17 15:33 ` [PATCH 4/5] decimal: add conversions to (u)int64_t Serge Petrenko
2019-07-24 16:17 ` Vladimir Davydov
2019-07-17 15:33 ` [PATCH 5/5] decimal: allow to index decimals Serge Petrenko
2019-07-24 16:56 ` Vladimir Davydov
2019-07-24 23:13 ` [tarantool-patches] " Konstantin Osipov
2019-07-24 23:17 ` Konstantin Osipov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190724231730.GE15185@atlas \
--to=kostja@tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] [PATCH 5/5] decimal: allow to index decimals' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox