diff --git a/src/acconfig.h b/src/acconfig.h
index bca587a107d866a9ceab57b73c2973145ad3c65f..44b55d2b879106c67806161ca7def88acf3cbcde 100644
--- a/src/acconfig.h
+++ b/src/acconfig.h
@@ -313,9 +313,6 @@
 /* Define if you have rint.  */
 #undef HAVE_RINT
 
-/* Define if you have frexp.  */
-#undef HAVE_FREXP
-
 /* Define if your signals are one-shot */
 #undef SIGNAL_ONESHOT
 
diff --git a/src/configure.in b/src/configure.in
index 24a12286f0ed095d6a372c27615b738a48230df5..4664c56ccc45d9a105784538c8201725cf15faaf 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -5732,27 +5732,6 @@ MY_CHECK_FUNCTION(rint,
   exit(0);
 ])
 
-########################################################################
-
-MY_CHECK_FUNCTION(frexp,
-[
-#include <math.h>
-], [
-  double x,y;
-  int p,e;
-
-  x=frexp(1.0, &e);
-  if(x * pow(2.0,(double)e) != 1.0) exit(3);
-
-  p=-7;
-  for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++)
-  {
-    if(frexp(x, &e)!=3.0/4.0) exit(1);
-    if(e!=p) exit(2);
-  }
-  exit(0);
-])
-
 #############################################################################
 MY_CHECK_FUNCTION(GetSystemTimeAsFileTime,
 [
diff --git a/src/encode.c b/src/encode.c
index 3db5ba196662b6774183aae1b5df6a4fb4ec9bdf..4644ea96bd2894af1a01a5ee65f8bd5ca4b0b2ed 100644
--- a/src/encode.c
+++ b/src/encode.c
@@ -717,7 +717,7 @@ static void encode_value2(struct svalue *val, struct encode_data *data, int forc
 	int y;
 	double tmp;
 
-	tmp = FREXP(d, &y);
+	tmp = frexp(d, &y);
 	x = DO_NOT_WARN((INT64)((((INT64)1)<<(sizeof(INT64)*8 - 2))*tmp));
 	y -= sizeof(INT64)*8 - 2;
 
diff --git a/src/modules/Gmp/mpq.cmod b/src/modules/Gmp/mpq.cmod
index 98abc9ba8190cb5d0a071ba300178c9266d69284..f334ef91f2ff486babcc79577c85b2744a890145 100644
--- a/src/modules/Gmp/mpq.cmod
+++ b/src/modules/Gmp/mpq.cmod
@@ -187,7 +187,7 @@ PIKECLASS mpq
 	{
 	  double t;
 	  int y;
-	  t=FREXP((double) s->u.float_number, &y);
+	  t=frexp((double) s->u.float_number, &y);
 
 	  t*=pow(2.0,48.0);
 	  y-=48;
diff --git a/src/port.c b/src/port.c
index 02cd4129ba48b96f9f06dcb8766e5da549a09506..20ef64351ac4e88bffbcddfb7304c3a49afb6eae 100644
--- a/src/port.c
+++ b/src/port.c
@@ -604,16 +604,6 @@ double LDEXP(double x, int exp)
 }
 #endif
 
-#ifndef HAVE_FREXP
-double FREXP(double x, int *exp)
-{
-  double ret;
-  *exp = DO_NOT_WARN((int)ceil(log(fabs(x))/log(2.0)));
-  ret = (x*pow(2.0,(double)-*exp));
-  return ret;
-}
-#endif
-
 #ifdef __MINGW32__
 struct errmapping {
         const int winerr;
diff --git a/src/port.h b/src/port.h
index 1029e03e4ac9fde5fab5e6c34bd740a7dafdb816..1f25bf32b27b65514d00f4c4f9296daf9fc58e3e 100644
--- a/src/port.h
+++ b/src/port.h
@@ -363,11 +363,8 @@ long long gethrtime(void);
 #endif /* DOUBLE_IS_IEEE_LITTLE */
 #endif /* DOUBLE_IS_IEEE_BIG */
 
-#ifdef HAVE_FREXP
+#define HAVE_FREXP 1
 #define FREXP frexp
-#else
-double FREXP(double x, int *exp);
-#endif
 
 #ifdef HAVE_LDEXP
 #define LDEXP ldexp
diff --git a/src/sprintf.c b/src/sprintf.c
index 9a3b3e96649994642c20d3cf3972e59e9435f509..16e2b949565ae1c8cb04147df5df0b4cb9a4c5da 100644
--- a/src/sprintf.c
+++ b/src/sprintf.c
@@ -493,7 +493,7 @@ static void low_write_IEEE_float(char *b, double d, int sz)
 #endif
 
   if(e<0) {
-    d = FREXP(d, &e);
+    d = frexp(d, &e);
     if(d == 1.0) {
       d=0.5;
       e++;