From: Raymond T. <rt...@us...> - 2014-07-17 05:10:27
|
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 467964e61ac0a952235ae25424410f1ebdb71c0f (commit) from d4b5b6a1dd633eec522448a27ee4e6d99147500d (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 467964e61ac0a952235ae25424410f1ebdb71c0f Author: Raymond Toy <toy...@gm...> Date: Wed Jul 16 22:09:05 2014 -0700 Fix issue with ~E when a scale factor is given. Too few digits were sometimes printed. (format t "~6,4,,2/bigfloat::format-e/" (bigfloat:* (expt 10 10) (bigfloat:%pi (bigfloat:bigfloat 1)))) should produce "31.415b+9", not "31.41b+9" diff --git a/src/float.lisp b/src/float.lisp index e62ac4e..f8f743d 100644 --- a/src/float.lisp +++ b/src/float.lisp @@ -226,14 +226,14 @@ One extra decimal digit in actual representation for rounding purposes.") ;; the result. (read-from-string (format nil "~{~A~}" (nthcdr (1+ marker) f))))) - (bfloat-to-string (x fdigits) + (bfloat-to-string (x fdigits scale) ;; Print the bfloat X with FDIGITS after the decimal ;; point. This means, roughtly, FDIGITS+1 significant ;; digits. (let* (($fpprintprec (if fdigits (if (zerop fdigits) 1 - (1+ fdigits)) + (+ fdigits scale)) 0)) (f (fpformat (bcons (fpabs (cdr x))))) (marker (position '|b| f)) @@ -308,8 +308,13 @@ One extra decimal digit in actual representation for rounding purposes.") (if (or atp (minusp (second arg))) 1 0)) nil))) + #+(or) + (progn + (format t "d, k = ~D ~D~%" d k) + (format t "fdig = ~D, spaceleft = ~D~%" fdig spaceleft)) + (multiple-value-bind (fstr flen lpoint tpoint) - (bfloat-to-string arg fdig) + (bfloat-to-string arg fdig (or k 1)) #+(or) (format t "fstr flen lpoint tpoint = ~S ~S ~S ~S~%" fstr flen lpoint tpoint) ----------------------------------------------------------------------- Summary of changes: src/float.lisp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) hooks/post-receive -- Maxima CAS |