Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Georgy Kirichenko <georgy@tarantool.org>,
	Konstantin Osipov <kostja@tarantool.org>,
	tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] [PATCH v4 0/2] Introduce decimal type to tarantool core.
Date: Tue, 11 Jun 2019 19:02:32 +0300	[thread overview]
Message-ID: <6563D8FC-55AE-4601-88D5-0A00A6AEC21E@tarantool.org> (raw)
In-Reply-To: <6B38CFE8-4F4E-46D0-8380-FD551DAA9EA8@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 3093 bytes --]


> 11 июня 2019 г., в 19:01, Serge Petrenko <sergepetrenko@tarantool.org> написал(а):
> 
> My bad, issue and branch are below.
> https://github.com/tarantool/tarantool/issues/692 <https://github.com/tarantool/tarantool/issues/692>
> https://github.com/tarantool/tarantool/tree/sp/gh-692-mp-encode-decimal <https://github.com/tarantool/tarantool/tree/sp/gh-692-mp-encode-decimal>
Branch: https://github.com/tarantool/tarantool/tree/sp/gh-692-introduce-decimal <https://github.com/tarantool/tarantool/tree/sp/gh-692-introduce-decimal>
Sorry.

> 
> --
> Serge Petrenko
> sergepetrenko@tarantool.org <mailto:sergepetrenko@tarantool.org>
> 
> 
> 
> 
>> 11 июня 2019 г., в 18:56, Serge Petrenko <sergepetrenko@tarantool.org <mailto:sergepetrenko@tarantool.org>> написал(а):
>> 
>> This patchset adds a new type, decimal fixed-point, to tarantool,
>> together with methods to pack/unpack decimals, arithmetic operations
>> ad math functions.
>> 
>> The first patch adds decNumber library as a submodule.
>> 
>> The second patch adds a small wrapper to the library to make it work
>> with fixed-point decimal values, and adds a unit test.
>> To evaluate number precision and scale from exponent and the amount of
>> significant digits the following formulas are applied:
>> If exponent < 0 then precision = MAX(digits, -exponent) and scale = -exponent
>> If exponent > 0 then precision = digits + exponent, and scale = 0
>> 
>> Changes in v4:
>> - review fixes as per review
>>   from @locker.
>> - remove patches 3 and 4,
>>   add decimal_pack/unpack as
>>   a preparation for patches
>>   4 and 4 to patch 2.
>> 
>> Changes in v3:
>> - add patches 3 and 4 to
>>   encode/decode decimals
>>   as msgpack.
>> 
>> Changes in v2:
>> - get rid of explicit precision and scale,
>>   evaluate them from decNumber digits and exponent.
>> - decimal is now an alias for decNumber
>> - ln, log10, exp, sqrt, pow now accept precision to
>>   which the result should be rounded.
>> 
>> Serge Petrenko (2):
>>  third-party: add decNumber library
>>  lib/core: introduce decimal type to tarantool
>> 
>> .gitmodules                 |   3 +
>> CMakeLists.txt              |   7 +
>> cmake/BuildDecNumber.cmake  |  14 ++
>> src/CMakeLists.txt          |   1 +
>> src/lib/core/CMakeLists.txt |   3 +-
>> src/lib/core/decimal.c      | 354 +++++++++++++++++++++++++++++++
>> src/lib/core/decimal.h      | 206 ++++++++++++++++++
>> test/unit/CMakeLists.txt    |   2 +
>> test/unit/decimal.c         | 174 ++++++++++++++++
>> test/unit/decimal.result    | 406 ++++++++++++++++++++++++++++++++++++
>> third_party/decNumber       |   1 +
>> 11 files changed, 1170 insertions(+), 1 deletion(-)
>> create mode 100644 cmake/BuildDecNumber.cmake
>> create mode 100644 src/lib/core/decimal.c
>> create mode 100644 src/lib/core/decimal.h
>> create mode 100644 test/unit/decimal.c
>> create mode 100644 test/unit/decimal.result
>> create mode 160000 third_party/decNumber
>> 
>> -- 
>> 2.20.1 (Apple Git-117)
>> 
>> 
> 


[-- Attachment #2: Type: text/html, Size: 5779 bytes --]

      reply	other threads:[~2019-06-11 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 15:56 Serge Petrenko
2019-06-11 15:56 ` [PATCH v4 1/2] third-party: add decNumber library Serge Petrenko
2019-06-11 15:56 ` [PATCH v4 2/2] lib/core: introduce decimal type to tarantool Serge Petrenko
2019-06-13 16:07   ` Vladimir Davydov
2019-06-11 16:01 ` [tarantool-patches] [PATCH v4 0/2] Introduce decimal type to tarantool core Serge Petrenko
2019-06-11 16:02   ` Serge Petrenko [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=6563D8FC-55AE-4601-88D5-0A00A6AEC21E@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH v4 0/2] Introduce decimal type to tarantool core.' \
    /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