Re: Regression error on float8

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Regression error on float8
Дата
Msg-id 20060424182317.GD2747@svana.org
обсуждение исходный текст
Ответ на Re: Regression error on float8  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Regression error on float8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Apr 24, 2006 at 03:01:51PM +0200, Magnus Hagander wrote:
> If I undefine HAVE_CBRT on Linux, I get the exact same failure! So it
> seems our own version of cbrt() is broken wrt our own regression tests
> :-( Must be that nobody else (at least on i386) uses that code.

<snip>

> 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...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: 2x compile warning
Следующее
От: Gevik Babakhani
Дата:
Сообщение: Re: TODO Item: ACL_CONNECT