From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | er(at)xs4all(dot)nl |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: funcs.sgml - wrong example |
Date: | 2022-05-18 02:11:02 |
Message-ID: | 20220518.111102.1072816463768771626.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Wed, 18 May 2022 03:08:32 +0200, Erik Rijkers <er(at)xs4all(dot)nl> wrote in
> funcs.sgml has
>
> 42 <@ '{[1,7)}'::int4multirange
>
> and calls it true. The attached fixes that.
>
> Included are two more changes where actual output differs a bit from
> what the doc examples show.
A bit off-topic and just out of curiocity, is there a reason other
than speed (and history?) for that we won't truncate trailing zeros in
the output of log(b,n)?
Since we have get_min_scale since 13, for example, with the following
tweak, we get 6.0 for log(2.0, 64.0), which looks nicer.
@@ -10300,6 +10300,8 @@ log_var(const NumericVar *base, const NumericVar *num, NumericVar *result)
/* Divide and round to the required scale */
div_var_fast(&ln_num, &ln_base, result, rscale, true);
+ result->dscale = Max(get_min_scale(result), base->dscale);
+ result->dscale = Max(result->dscale, num->dscale);
free_var(&ln_num);
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2022-05-18 02:19:31 | Re: funcs.sgml - wrong example |
Previous Message | Erik Rijkers | 2022-05-18 01:08:32 | funcs.sgml - wrong example |