RE: Working with fixed-point calculations in C

2021-12-08 Thread Oskar Stenberg
thing else? Best Regards Oskar Originalmeddelande Från: Tom Lane Datum: 2021-12-08 04:41 (GMT+01:00) Till: Oskar Stenberg Kopia: pgsql-general@lists.postgresql.org Ämne: Re: Working with fixed-point calculations in C Oskar Stenberg writes: > I need to make some fixed-point

Re: Working with fixed-point calculations in C

2021-12-08 Thread Peter J. Holzer
On 2021-12-07 22:41:38 -0500, Tom Lane wrote: > I think what you are looking for is NUMERIC. (The type name NUMBER > is an Oracle-ism, I believe. I'm not sure how closely that corresponds > to our NUMERIC.) Not very. Oracle NUMBER is a decimal floating point number with a 38 digit mantissa store

Re: Working with fixed-point calculations in C

2021-12-07 Thread Tom Lane
Oskar Stenberg writes: > I need to make some fixed-point calculations inside the C code that I'm > developing as an extension to PostgreSQL. I was reading a bit, and if I > understood the datatype NUMBER correctly, it seems to be just what I'm > looking for, a fixed-point datatype. (I couldn't act