pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: parihaaraka@gmail.com
Subject: BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits
Date: Tue, 16 Oct 2018 09:35:28 +0000
Message-ID: <15434-ced1c3ccf8209dc5@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15434
Logged by:          Andrey L
Email address:      parihaaraka@gmail.com
PostgreSQL version: 10.5
Operating system:   Ubuntu 16.04
Description:        

# select 
 1800000000000000001::numeric / (10^18)::numeric truncated, -- truncates to
16 digits after decimal point
 1800000000000000001::numeric(48,18) / (10^18)::numeric correct,
 1800000000000000001::numeric / (10^18)::numeric * (10^18)::numeric
to_be_sure;
     truncated      |       correct        |              to_be_sure        
     
--------------------+----------------------+--------------------------------------
 1.8000000000000000 | 1.800000000000000001 |
1800000000000000000.0000000000000000
(1 row)



view thread (3+ messages)  latest in thread

Message-ID: <15434-ced1c3ccf8209dc5@postgresql.org>
Permalink:  ../15434-ced1c3ccf8209dc5@postgresql.org/
Also on:    postgresql.org/message-id/15434-ced1c3ccf8209dc5@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, parihaaraka@gmail.com
  Subject: Re: BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits
  In-Reply-To: <15434-ced1c3ccf8209dc5@postgresql.org>
  References: <15434-ced1c3ccf8209dc5@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox