Re: [HACKERS] regression bigtest needs very long time

Поиск
Список
Период
Сортировка
От wieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] regression bigtest needs very long time
Дата
Msg-id m10z0Jw-0003ktC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] regression bigtest needs very long time  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] regression bigtest needs very long time
Список pgsql-hackers
Tom Lane wrote:

> One thing worth thinking about is whether the storage format shouldn't
> be made the same as the calculation format, so as to eliminate the
> conversion costs.  At four decimal digits per int2, it wouldn't cost
> us anything to do so.

    That's  an  extra  bonus  point  from  the described internal
    format.

>
>              regards, tom lane
>
> PS: BTW, Jan, if you do not have a copy of Knuth's volume 2, I'd
> definitely recommend laying your hands on it for this project.
> His description of multiprecision arithmetic is the best I've seen
> anywhere.

    I don't have so far - thanks for the hint.

> If we thought that the math functions (sqrt, exp, etc) for numerics
> were really getting used for anything, it might also be fun to try
> to put in some better algorithms for them.  I've got a copy of Cody
> and Waite, which has been the bible for such things for twenty years.
> But my guess is that it wouldn't be worth the trouble, except to the
> extent that it speeds up the regression tests ;-)

    They are based on the  standard  Taylor/McLaurin  definitions
    for those functions.

    Most  times I need trigonometric functions or the like one of
    my sliderules still has enough precision because  I'm  unable
    to  draw 0.1mm or more precise with a pencil on a paper. YES,
    I love to USE sliderules (I have a dozen  now,  some  regular
    ones,  some circular ones, some pocket sized and one circular
    pocket sized one that looks more  like  a  stopwatch  than  a
    sliderule).

    Thus,  usually  the  precision  of float8 should be more than
    enough for those calculations. Making NUMERIC able to  handle
    these functions in it's extreme precision shouldn't really be
    that time critical.

    Remember: The lack of mathematical knowledge never  shows  up
    better   than   in   unappropriate   precision  of  numerical
    calculations.
                                                      C. F. Gauss
                                 (Sorry for the poor translation)

    What Gauss (born 1777 and the first who knew how to take  the
    square  root out of negative numbers) meant by that is, it is
    stupid to calculate with a precision of 10 or no digits after
    the decimal point if you're able to measure with 4 digits.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Re: Mess
Следующее
От: Fred Wilson Horch
Дата:
Сообщение: User requests now that 6.5 is out