From 7c08c67815cf4563e3e6fb2e31cc275a2319690a Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 2 Jan 2010 12:19:00 +0900 Subject: [PATCH] also forgot to propagate the sign in bignum_to_double --- opt/bignum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/bignum.c b/opt/bignum.c index 8cbd012a..9af36997 100644 --- a/opt/bignum.c +++ b/opt/bignum.c @@ -143,7 +143,7 @@ double sexp_bignum_to_double (sexp a) { sexp_uint_t *data=sexp_bignum_data(a); for (i=sexp_bignum_hi(a)-1; i>=0; i--) res = res * ((double)SEXP_UINT_T_MAX+1) + data[i]; - return res; + return res * sexp_bignum_sign(a); } sexp sexp_bignum_fxadd (sexp ctx, sexp a, sexp_uint_t b) {