File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.15 1997/05/14 04:35:10 thomas Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.16 1997/06/03 13:58:06 thomas Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -974,9 +974,15 @@ float64 dpow(float64 arg1, float64 arg2)
974
974
975
975
tmp1 = * arg1 ;
976
976
tmp2 = * arg2 ;
977
+ #ifndef finite
977
978
errno = 0 ;
979
+ #endif
978
980
* result = (float64data ) pow (tmp1 , tmp2 );
981
+ #ifndef finite
979
982
if (errno == ERANGE )
983
+ #else
984
+ if (!finite (* result ))
985
+ #endif
980
986
elog (WARN , "pow() returned a floating point out of the range\n" );
981
987
982
988
CheckFloat8Val (* result );
@@ -998,9 +1004,15 @@ float64 dexp(float64 arg1)
998
1004
result = (float64 ) palloc (sizeof (float64data ));
999
1005
1000
1006
tmp = * arg1 ;
1007
+ #ifndef finite
1001
1008
errno = 0 ;
1009
+ #endif
1002
1010
* result = (float64data ) exp (tmp );
1011
+ #ifndef finite
1003
1012
if (errno == ERANGE )
1013
+ #else
1014
+ if (!finite (* result ))
1015
+ #endif
1004
1016
elog (WARN , "exp() returned a floating point out of range\n" );
1005
1017
1006
1018
CheckFloat8Val (* result );
You can’t perform that action at this time.
0 commit comments