Skip to content

Instantly share code, notes, and snippets.

View segv's full-sized avatar

marco baringer segv

  • berlin, germany
View GitHub Profile

Keybase proof

I hereby claim:

  • I am segv on github.
  • I am mbaringer (https://keybase.io/mbaringer) on keybase.
  • I have a public key whose fingerprint is 5FF9 C1BA 7182 91DE 2A98 62F2 DB3A F548 B79E E35D

To claim this, I am signing this object:

template1=# select s,
template1-# round(cast(s as numeric)) as "round(numeric)",
template1-# round(cast(s as double precision)) as "round(dp)"
template1-# from (select i || '.5' as s from generate_series(-11,11) as i) as s ;
s | round(numeric) | round(dp)
-------+----------------+-----------
-11.5 | -12 | -12
-10.5 | -11 | -10
-9.5 | -10 | -10
-8.5 | -9 | -8