File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.137 2007/01/03 14:35:24 momjian Exp $
11
+ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.138 2007/01/03 19:34:23 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -1445,7 +1445,7 @@ dpow(PG_FUNCTION_ARGS)
1445
1445
*/
1446
1446
errno = 0 ;
1447
1447
result = pow (arg1 , arg2 );
1448
- if (errno == ERANGE && isnan (result ))
1448
+ if (errno == ERANGE || isnan (result ))
1449
1449
{
1450
1450
if ((fabs (arg1 ) > 1 && arg2 >= 0 ) || (fabs (arg1 ) < 1 && arg2 < 0 ))
1451
1451
result = (arg1 >= 0 ) ? get_float8_infinity () : - get_float8_infinity ();
@@ -1474,14 +1474,13 @@ dexp(PG_FUNCTION_ARGS)
1474
1474
*/
1475
1475
errno = 0 ;
1476
1476
result = exp (arg1 );
1477
- if (errno == ERANGE && isnan (result ))
1477
+ if (errno == ERANGE || isnan (result ))
1478
1478
{
1479
1479
if (arg1 >= 0 )
1480
1480
result = get_float8_infinity ();
1481
1481
else
1482
1482
result = 0 ;
1483
1483
}
1484
-
1485
1484
1486
1485
CHECKFLOATVAL (result , isinf (arg1 ), false);
1487
1486
PG_RETURN_FLOAT8 (result );
You can’t perform that action at this time.
0 commit comments