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

Commit19ce06b

Browse files
committed
Improve dpow() check for ERANGE overflow for HPPA.
1 parentb2965b9 commit19ce06b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 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.143 2007/01/0602:28:38 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.144 2007/01/0604:14:55 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1459,10 +1459,9 @@ dpow(PG_FUNCTION_ARGS)
14591459
else
14601460
result=1;
14611461
}
1462-
elseif (errno==ERANGE)
1463-
{
1464-
result= (arg1 >=0) ?get_float8_infinity() :-get_float8_infinity();
1465-
}
1462+
/* Some platoforms, e.g. HPPA, return ERANGE, but HUGE_VAL, not Inf */
1463+
elseif (errno==ERANGE&& !isinf(result))
1464+
result=get_float8_infinity();
14661465

14671466
CHECKFLOATVAL(result,isinf(arg1)||isinf(arg2),arg1==0);
14681467
PG_RETURN_FLOAT8(result);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp