From: Chris Hanson Date: Tue, 22 Apr 1997 22:18:06 +0000 (+0000) Subject: Add primitive BIGNUM-LENGTH-IN-BITS. X-Git-Tag: 20090517-FFI~5214 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8170e269997f951486d3dc26cc04fbab5f5c3f42;p=mit-scheme.git Add primitive BIGNUM-LENGTH-IN-BITS. --- diff --git a/v7/src/microcode/bigprm.c b/v7/src/microcode/bigprm.c index 2f45459de..d67922df3 100644 --- a/v7/src/microcode/bigprm.c +++ b/v7/src/microcode/bigprm.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bigprm.c,v 1.4 1996/10/02 18:57:03 cph Exp $ +$Id: bigprm.c,v 1.5 1997/04/22 22:18:06 cph Exp $ -Copyright (c) 1989-96 Massachusetts Institute of Technology +Copyright (c) 1989-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -177,3 +177,10 @@ DEFINE_PRIMITIVE ("BIGNUM->FLONUM", Prim_bignum_to_flonum, 1, 1, 0) CHECK_ARG (1, BIGNUM_P); PRIMITIVE_RETURN (bignum_to_flonum (ARG_REF (1))); } + +DEFINE_PRIMITIVE ("BIGNUM-LENGTH-IN-BITS", Prim_bignum_length_in_bits, 1, 1, 0) +{ + PRIMITIVE_HEADER (1); + CHECK_ARG (1, BIGNUM_P); + PRIMITIVE_RETURN (bignum_length_in_bits (ARG_REF (1))); +}