Re: Regression error on float8

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Regression error on float8
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0F934@algol.sollentuna.se
обсуждение исходный текст
Ответ на Regression error on float8  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Regression error on float8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> > What do you think is best - try to adapt that version, or
> update our
> > regression tests outputs to accept the output from our current code?
>
> Given that our output gets very very close, perhaps we should
> take a hint from the end of the MinGW version, do a single
> Newton iteration to fixup those last few digits.
>
> Adding this before the last line of our version of cbrt():
>
> tmpres -= ( tmpres - (x/(tmpres*tmpres)) )*0.33333333333333333333;
>
> Makes it give the same result as my system version...

That totally didn't work on visual c++ at least. It fixes those two
ones, but it breaks the other lines in the same test:

*** ./expected/float8-exp-three-digits-win32.out        Wed Jun  8
23:15:29 2005
--- ./results/float8.out        Mon Apr 24 21:57:40 2006
***************
*** 321,329 **** SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f;  five |          f1          |
cbrt_f1        ------+----------------------+----------------------- 
!       |                    0 |                     0       |               1004.3 |       10.014312837827
!       |               -34.84 |     -3.26607421344208       | 1.2345678901234e+200 | 4.97933859234765e+066       |
1.2345678901234e-200|  2.3112042409018e-067 (5 rows) 
--- 321,329 ---- SELECT '' AS five, f.f1, ||/f.f1 AS cbrt_f1 FROM FLOAT8_TBL f;  five |          f1          |
cbrt_f1        ------+----------------------+----------------------- 
!       |                    0 |                   NaN       |               1004.3 |       10.014312837827
!       |               -34.84 |     -1.08869140448069       | 1.2345678901234e+200 | 4.97933859234765e+066       |
1.2345678901234e-200|  2.3112042409018e-067 (5 rows) 



//Magnus


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 2x compile warning
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 2x compile warning