## [Maxima-commits] [git] Maxima CAS branch, master, updated. FOOBAR-71-gfff84ea

 [Maxima-commits] [git] Maxima CAS branch, master, updated. FOOBAR-71-gfff84ea From: Raymond Toy - 2013-12-20 08:11:28 ```This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via fff84ea1e7b98940203b3a9d4606483bf2e617a7 (commit) from 0ccd41f22f26400abc7569da4b492e90e234d8b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fff84ea1e7b98940203b3a9d4606483bf2e617a7 Author: Raymond Toy Date: Fri Dec 20 00:11:08 2013 -0800 Fix bug in computing (.75b0+%i*1.5b0)^(%i/4). Bug in bigfloat:expt noted by Barton on Dec 3 This solution is different from the one proposed there, but it handles that case. diff --git a/src/numeric.lisp b/src/numeric.lisp index b18c4f9..8b11ece 100755 --- a/src/numeric.lisp +++ b/src/numeric.lisp @@ -183,10 +183,15 @@ ;; up by the log(x). The "size" of a is, basically, the exponent of ;; a. If a = 2^n*f where |f| < 1, then the size is abs(n) because ;; that's how many extra bits are added to the integer part of -;; a*log(x). +;; a*log(x). If either |x| or |a| < 1, the size is 0, since no +;; additional bits are taken up. (defun expt-extra-bits (x a) - (max 1 (+ (integer-length (max-exponent x)) - (max-exponent a)))) + (max 1 (+ (if (< (abs x) 1) + 0 + (integer-length (max-exponent x))) + (if (< (abs a) 1) + 0 + (max-exponent a))))) ;;; WITH-EXTRA-PRECISION - Internal ;;; ----------------------------------------------------------------------- Summary of changes: src/numeric.lisp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- Maxima CAS ```

 [Maxima-commits] [git] Maxima CAS branch, master, updated. FOOBAR-71-gfff84ea From: Raymond Toy - 2013-12-20 08:11:28 ```This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via fff84ea1e7b98940203b3a9d4606483bf2e617a7 (commit) from 0ccd41f22f26400abc7569da4b492e90e234d8b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fff84ea1e7b98940203b3a9d4606483bf2e617a7 Author: Raymond Toy Date: Fri Dec 20 00:11:08 2013 -0800 Fix bug in computing (.75b0+%i*1.5b0)^(%i/4). Bug in bigfloat:expt noted by Barton on Dec 3 This solution is different from the one proposed there, but it handles that case. diff --git a/src/numeric.lisp b/src/numeric.lisp index b18c4f9..8b11ece 100755 --- a/src/numeric.lisp +++ b/src/numeric.lisp @@ -183,10 +183,15 @@ ;; up by the log(x). The "size" of a is, basically, the exponent of ;; a. If a = 2^n*f where |f| < 1, then the size is abs(n) because ;; that's how many extra bits are added to the integer part of -;; a*log(x). +;; a*log(x). If either |x| or |a| < 1, the size is 0, since no +;; additional bits are taken up. (defun expt-extra-bits (x a) - (max 1 (+ (integer-length (max-exponent x)) - (max-exponent a)))) + (max 1 (+ (if (< (abs x) 1) + 0 + (integer-length (max-exponent x))) + (if (< (abs a) 1) + 0 + (max-exponent a))))) ;;; WITH-EXTRA-PRECISION - Internal ;;; ----------------------------------------------------------------------- Summary of changes: src/numeric.lisp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- Maxima CAS ```