Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] tuple: don't truncate float in :update()
Date: Mon, 24 Feb 2020 20:57:31 +0300	[thread overview]
Message-ID: <20200224175731.q2yuapyikxmimwre@tarantool.org> (raw)
In-Reply-To: <2b1afed1b05757c177b2fbb2efbf7643670c43cc.1582466958.git.v.shpilevoy@tarantool.org>

Hello,

On 23 фев 15:11, Vladislav Shpilevoy wrote:
> Before the patch there were the rules:
> * float +/- double = double
> * double +/- double = double
> * float +/- float = float
> 
> The rules were applied regardless of values. That led to a problem
> when float + float exceeding maximal float value could fit into
> double, but was stored as an infinity.
> 
> The patch makes so that if a floating point arithmetic operation
> result fits into float, it is stored as float. Otherwise as
> double. Regardless of initial types.
> 
> This alongside saves some memory for cases when doubles can be
> stored as floats, and therefore takes 4 less bytes. Although
> these cases are rare, because any not integer value stored in a
> double may have a long garbage tail in its fraction.
> 
> Closes #4701
> 
> (cherry picked from commit fef4fdfc3edee39c72f2e93e6f96ab681750617f)
> ---
> Branch: https://github.com/tarantool/tarantool/tree/gerold103/gh-4701-update-float-2.2
> Issue: https://github.com/tarantool/tarantool/issues/4701

I've checked your patch into 1.10 and 2.2. I've also changed MS
of the issue to 1.10.

--
Regards, Kirill Yukhin

  reply	other threads:[~2020-02-24 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 14:11 Vladislav Shpilevoy
2020-02-24 17:57 ` Kirill Yukhin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-26 16:44 Vladislav Shpilevoy
2020-01-26 18:45 ` Nikita Pettik
2020-01-27 21:56   ` Vladislav Shpilevoy

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=20200224175731.q2yuapyikxmimwre@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] tuple: don'\''t truncate float in :update()' \
    /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