summaryrefslogtreecommitdiff
path: root/src/floatfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 6d7fc1452d3..9a5f0a3ad2f 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -328,7 +328,7 @@ This is the same as the exponent of a float. */)
(Lisp_Object arg)
{
EMACS_INT value;
- CHECK_FIXNUM_OR_FLOAT (arg);
+ CHECK_NUMBER (arg);
if (FLOATP (arg))
{
@@ -345,8 +345,11 @@ This is the same as the exponent of a float. */)
else
value = MOST_POSITIVE_FIXNUM;
}
+ else if (BIGNUMP (arg))
+ value = mpz_sizeinbase (XBIGNUM (arg)->value, 2) - 1;
else
{
+ eassert (FIXNUMP (arg));
EMACS_INT i = eabs (XINT (arg));
value = (i == 0
? MOST_NEGATIVE_FIXNUM