Re: [PATCH] Add function to_oct

2022-12-22 Thread Eric Radman
On Thu, Dec 22, 2022 at 10:08:17AM +, Dag Lem wrote: > > The calculation of quotient and remainder can be replaced by less costly > masking and shifting. > > Defining > > #define OCT_DIGIT_BITS 3 > #define OCT_DIGIT_BITMASK 0x7 > > the content of the loop can be replaced by > >

Re: [PATCH] Add function to_oct

2022-12-20 Thread Eric Radman
On Wed, Dec 21, 2022 at 08:36:40AM +0900, Ian Lawrence Barwick wrote: > 2022年12月21日(水) 7:08 Eric Radman :> > > Hello! > > > > This patch is a new function based on the implementation of to_hex(int). > > > > Since support for octal integer literals was added,

[PATCH] Add function to_oct

2022-12-20 Thread Eric Radman
permissions. -- Eric Radman diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 1f63dc6dba..b539e0dc0b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -3699,6 +3699,23 @@ repeat('Pg', 4) PgPgPgPg + + + + to_oct