Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita252994

Browse files
committed
Simplify assignment of Inf for pow Nan (don't worry about the sign).
1 parenteeb2189 commita252994

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.139 2007/01/03 22:05:00 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.140 2007/01/0405:18:39 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1453,7 +1453,8 @@ dpow(PG_FUNCTION_ARGS)
14531453
if (errno==EDOM&&isnan(result))
14541454
{
14551455
if ((fabs(arg1)>1&&arg2 >=0)|| (fabs(arg1)<1&&arg2<0))
1456-
result= (arg1 >=0) ?get_float8_infinity() :-get_float8_infinity();
1456+
/* The sign if Inf is not significant in this case. */
1457+
result=get_float8_infinity();
14571458
elseif (fabs(arg1)!=1)
14581459
result=0;
14591460
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp