Re: [ADMIN] [HACKERS] IEEE 754

2004-01-12 Thread Jan Wieck
Michael Glaesemann wrote: On Jan 4, 2004, at 6:51 PM, Bruce Momjian wrote: Michael Glaesemann wrote: On Dec 29, 2003, at 11:28 AM, Sai Hertz And Control Systems wrote: I would like to share my concerns about the IEEE 754 specification and floating point handling by PostgreSQL . What specifically

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-12 Thread Sai Hertz And Control Systems
Dear Jan Wieck , Floating point math itself is not precise, but rather an approximation, usually of 8 or 14 digits. You can't approximate money. This isn't a PostgreSQL issue but rather a general programming issue. Thanks, Bruce. I assume the arbitrary precision arithmetic Jan mentioned

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-12 Thread Jan Wieck
Sai Hertz And Control Systems wrote: Dear Jan Wieck , Floating point math itself is not precise, but rather an approximation, usually of 8 or 14 digits. You can't approximate money. This isn't a PostgreSQL issue but rather a general programming issue. Thanks, Bruce. I assume the arbitrary

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-12 Thread Sai Hertz And Control Systems
Dear Jan Wieck , Yes I agree with you Jan , most of the time we round the amount and this is done by truncating greater than 3 decimal digits and rounding the 3 digit to 2 in other words : select trunc(1000.236897,3); then selecr round(1000.236,2); This takes care of the rounding factor in

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-12 Thread Jan Wieck
Sai Hertz And Control Systems wrote: Dear Jan Wieck , Yes I agree with you Jan , most of the time we round the amount and this is done by truncating greater than 3 decimal digits and rounding the 3 digit to 2 in other words : select trunc(1000.236897,3); then selecr round(1000.236,2); This

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-04 Thread Bruce Momjian
Michael Glaesemann wrote: On Dec 29, 2003, at 11:28 AM, Sai Hertz And Control Systems wrote: I would like to share my concerns about the IEEE 754 specification and floating point handling by PostgreSQL . What specifically are your concerns regarding floating point handling and

Re: [ADMIN] [HACKERS] IEEE 754

2004-01-04 Thread Michael Glaesemann
On Jan 4, 2004, at 6:51 PM, Bruce Momjian wrote: Michael Glaesemann wrote: On Dec 29, 2003, at 11:28 AM, Sai Hertz And Control Systems wrote: I would like to share my concerns about the IEEE 754 specification and floating point handling by PostgreSQL . What specifically are your concerns