pgsql/src/backend/utils/adt float.c

Поиск
Список
Период
Сортировка
Искать

pgsql/src/backend/utils/adt float.c

От:
Tom Lane <tgl@hub.org>
Дата:
CVSROOT:	/home/projects/pgsql/cvsroot
Module name:	pgsql
Changes by:	tgl@hub.org	01/06/02 16:18:30

Modified files:
	src/backend/utils/adt: float.c 

Log message:
	Accept and output '-Infinity' as well as 'Infinity', per long-ago
	suggestion from Ross Reedstrom.  Still needs work to make those symbols
	convert to actual IEEE infinities (on machines where such things exist).

Re: pgsql/src/backend/utils/adt float.c

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Tom Lane writes:

> 	Accept and output '-Infinity' as well as 'Infinity', per long-ago
> 	suggestion from Ross Reedstrom.  Still needs work to make those symbols
> 	convert to actual IEEE infinities (on machines where such things exist).

#ifdef INFINITY
    val = INFINITY;
#else
    elog?
#endif

Those who don't have INFINITY can define it in their port.h, like NAN.
1.0/0.0 should suffice.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

Re: pgsql/src/backend/utils/adt float.c

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> Tom Lane writes:
>> Accept and output '-Infinity' as well as 'Infinity', per long-ago
>> suggestion from Ross Reedstrom.  Still needs work to make those symbols
>> convert to actual IEEE infinities (on machines where such things exist).

> #ifdef INFINITY
>     val = INFINITY;
> #else
>     elog?
> #endif

Else use HUGE_VAL, as the code does now, I would think.  But I just
sent a message to Ross Reedstrom and pghackers to reopen that
discussion; let's pick it up there.

			regards, tom lane
FAQ