Fix (+ bignum float) bug
* src/data.c (bignum_arith_driver): Fix typo: missing ‘return’. * test/src/data-tests.el (data-tests-bignum): Test for the typo.
This commit is contained in:
parent
0bec064454
commit
3727bc7d59
2 changed files with 12 additions and 2 deletions
|
@ -2920,8 +2920,8 @@ bignum_arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args,
|
|||
val = args[argnum];
|
||||
CHECK_NUMBER_COERCE_MARKER (val);
|
||||
if (FLOATP (val))
|
||||
float_arith_driver (code, nargs, args, argnum,
|
||||
mpz_get_d (*accum), val);
|
||||
return float_arith_driver (code, nargs, args, argnum,
|
||||
mpz_get_d (*accum), val);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -547,6 +547,16 @@ comparing the subr with a much slower lisp implementation."
|
|||
(should (<= b-1 b0))
|
||||
(should (<= b-1 b-1))
|
||||
|
||||
(should (= (+ f0 b0) (+ b0 f0)))
|
||||
(should (= (+ f0 b-1) (+ b-1 f0)))
|
||||
(should (= (+ f-1 b0) (+ b0 f-1)))
|
||||
(should (= (+ f-1 b-1) (+ b-1 f-1)))
|
||||
|
||||
(should (= (* f0 b0) (* b0 f0)))
|
||||
(should (= (* f0 b-1) (* b-1 f0)))
|
||||
(should (= (* f-1 b0) (* b0 f-1)))
|
||||
(should (= (* f-1 b-1) (* b-1 f-1)))
|
||||
|
||||
(should (= b0 f0))
|
||||
(should (= b0 b0))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue