You can subscribe to this list here.
2001 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}
(20) 
_{Dec}
(17) 

2002 
_{Jan}
(39) 
_{Feb}
(21) 
_{Mar}
(33) 
_{Apr}
(135) 
_{May}
(53) 
_{Jun}
(88) 
_{Jul}
(47) 
_{Aug}
(59) 
_{Sep}
(207) 
_{Oct}
(40) 
_{Nov}
(7) 
_{Dec}
(26) 
2003 
_{Jan}
(49) 
_{Feb}
(39) 
_{Mar}
(117) 
_{Apr}
(50) 
_{May}
(62) 
_{Jun}
(6) 
_{Jul}
(19) 
_{Aug}
(24) 
_{Sep}
(11) 
_{Oct}
(11) 
_{Nov}
(49) 
_{Dec}
(9) 
2004 
_{Jan}
(29) 
_{Feb}
(123) 
_{Mar}
(32) 
_{Apr}
(53) 
_{May}
(52) 
_{Jun}
(19) 
_{Jul}
(33) 
_{Aug}
(10) 
_{Sep}
(76) 
_{Oct}
(86) 
_{Nov}
(171) 
_{Dec}
(163) 
2005 
_{Jan}
(147) 
_{Feb}
(121) 
_{Mar}
(120) 
_{Apr}
(126) 
_{May}
(120) 
_{Jun}
(213) 
_{Jul}
(76) 
_{Aug}
(79) 
_{Sep}
(140) 
_{Oct}
(83) 
_{Nov}
(156) 
_{Dec}
(202) 
2006 
_{Jan}
(181) 
_{Feb}
(171) 
_{Mar}
(157) 
_{Apr}
(98) 
_{May}
(96) 
_{Jun}
(97) 
_{Jul}
(193) 
_{Aug}
(76) 
_{Sep}
(130) 
_{Oct}
(63) 
_{Nov}
(196) 
_{Dec}
(253) 
2007 
_{Jan}
(256) 
_{Feb}
(293) 
_{Mar}
(276) 
_{Apr}
(258) 
_{May}
(181) 
_{Jun}
(91) 
_{Jul}
(108) 
_{Aug}
(69) 
_{Sep}
(107) 
_{Oct}
(179) 
_{Nov}
(137) 
_{Dec}
(121) 
2008 
_{Jan}
(124) 
_{Feb}
(129) 
_{Mar}
(192) 
_{Apr}
(201) 
_{May}
(90) 
_{Jun}
(86) 
_{Jul}
(115) 
_{Aug}
(142) 
_{Sep}
(49) 
_{Oct}
(91) 
_{Nov}
(95) 
_{Dec}
(218) 
2009 
_{Jan}
(230) 
_{Feb}
(149) 
_{Mar}
(118) 
_{Apr}
(72) 
_{May}
(77) 
_{Jun}
(68) 
_{Jul}
(102) 
_{Aug}
(72) 
_{Sep}
(89) 
_{Oct}
(76) 
_{Nov}
(125) 
_{Dec}
(86) 
2010 
_{Jan}
(75) 
_{Feb}
(90) 
_{Mar}
(89) 
_{Apr}
(121) 
_{May}
(111) 
_{Jun}
(66) 
_{Jul}
(75) 
_{Aug}
(66) 
_{Sep}
(66) 
_{Oct}
(166) 
_{Nov}
(121) 
_{Dec}
(73) 
2011 
_{Jan}
(74) 
_{Feb}

_{Mar}

_{Apr}
(14) 
_{May}
(22) 
_{Jun}
(31) 
_{Jul}
(53) 
_{Aug}
(37) 
_{Sep}
(23) 
_{Oct}
(25) 
_{Nov}
(31) 
_{Dec}
(28) 
2012 
_{Jan}
(18) 
_{Feb}
(11) 
_{Mar}
(32) 
_{Apr}
(17) 
_{May}
(48) 
_{Jun}
(37) 
_{Jul}
(23) 
_{Aug}
(54) 
_{Sep}
(15) 
_{Oct}
(11) 
_{Nov}
(19) 
_{Dec}
(22) 
2013 
_{Jan}
(11) 
_{Feb}
(32) 
_{Mar}
(24) 
_{Apr}
(37) 
_{May}
(31) 
_{Jun}
(14) 
_{Jul}
(26) 
_{Aug}
(33) 
_{Sep}
(40) 
_{Oct}
(21) 
_{Nov}
(36) 
_{Dec}
(84) 
2014 
_{Jan}
(23) 
_{Feb}
(20) 
_{Mar}
(27) 
_{Apr}
(24) 
_{May}
(31) 
_{Jun}
(27) 
_{Jul}
(34) 
_{Aug}
(26) 
_{Sep}
(21) 
_{Oct}
(45) 
_{Nov}
(23) 
_{Dec}
(73) 
2015 
_{Jan}
(33) 
_{Feb}
(8) 
_{Mar}
(24) 
_{Apr}
(45) 
_{May}
(27) 
_{Jun}
(19) 
_{Jul}
(21) 
_{Aug}
(51) 
_{Sep}
(43) 
_{Oct}
(29) 
_{Nov}
(61) 
_{Dec}
(86) 
2016 
_{Jan}
(99) 
_{Feb}
(52) 
_{Mar}
(80) 
_{Apr}
(61) 
_{May}
(24) 
_{Jun}
(23) 
_{Jul}
(33) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 



1
(1) 
2
(1) 
3

4

5

6
(1) 
7

8

9

10
(1) 
11
(1) 
12
(1) 
13
(3) 
14

15

16
(1) 
17
(6) 
18

19

20
(2) 
21

22
(2) 
23
(2) 
24

25

26
(1) 
27
(3) 
28
(3) 
29
(4) 
30
(1) 
31



From: Raymond Toy <rtoy@us...>  20140716 04:16:30

This is an automated email from the git hooks/postreceive 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 34932c523c2b498da665a19f717055f701857e8f (commit) from 1a9bc940ef2d42115fd1f73c0d79b41c9104e252 (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 34932c523c2b498da665a19f717055f701857e8f Author: Raymond Toy <toy.raymond@...> Date: Tue Jul 15 21:15:49 2014 0700 Initial cut at ~E and ~F formatters for bigfloat objects. The intent is to be able to print bigfloat objects in f2cl'd code by replace ~E with ~/bigfloat:formate/ and ~F with ~/bigfloat:formatf/. All parameters allowed by ~E and ~F are intended to be supported as specified in the CLHS for floats. More testing needed, but the basic functionality is supported for bigfloat objects. src/float.lisp: o Implements the heart of ~E and ~F for maxima bfloat objects src/numeric.lisp: o Implement ~E and ~F via bigfloat::formate and bigfloat::formatf, respectively, for bigfloat objects. diff git a/src/float.lisp b/src/float.lisp index 4cbe956..4600fe7 100644  a/src/float.lisp +++ b/src/float.lisp @@ 158,6 +158,9 @@ One extra decimal digit in actual representation for rounding purposes.") (let (($lispdisp nil)) (dimensionatom (maknam (fpformat form)) result))) +;; Converts the bigfloat L to list of digits including . and the +;; exponent marker b. The number of significant digits is controlled +;; by $fpprintprec. (defun fpformat (l) (if (not (member 'simp (cdar l) :test #'eq)) (setq l (cons (cons (caar l) (cons 'simp (cdar l))) (cdr l)))) @@ 207,6 +210,281 @@ One extra decimal digit in actual representation for rounding purposes.") (ncons 'b) (explodec (1 (cadr l)))))))) + +;; Format bfloats using ~E format. This is suitable as a ~// format. +;; +;; NOTE: This is a modified version of FORMATEXPAUX from CMUCL to +;; support printing of bfloats. +(defun bfloatformate (stream arg colonp atp + &optional w d e (k 1) + overflowchar (padchar #\space) exponentchar) + (declare (ignore colonp)) + (flet ((exponentvalue (x) + ;; Compute the (decimal exponent) of the bfloat number X. + (let* (($fpprintprec 1) + (f (fpformat x)) + (marker (position 'b f))) + ;; FIXME: do something better than printing and reading + ;; the result. + (readfromstring + (format nil "~{~A~}" (nthcdr (1+ marker) f))))) + (bfloattostring (x fdigits) + ;; 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)) + 0)) + (f (fpformat x)) + (marker (position 'b f)) + (digits (remove '. (subseq f 0 marker)))) + ;; Depending on the value of k, move the decimal + ;; point. DIGITS was printed assuming the decimal point + ;; is after the first digit. But if fdigits = 0, fpformat + ;; actually printed out one too many digits, so we need + ;; to remove that. + (when (and fdigits (zerop fdigits)) + (setf digits (butlast digits))) + (cond ((zerop k) + (push '. digits)) + ((minusp k) + ;; Put the leading decimal and then some zeroes + (dotimes (i (abs k)) + (push #\0 digits)) + (push '. digits)) + (t + ;; The number is scaled by 10^k. Do this by + ;; putting the decimal point in the right place, + ;; appending zeroes if needed. + (setf digits + (cond ((> k (length digits)) + (concatenate 'list + digits + (makelist ( k (length digits)) + :initialelement #\0) + (list '.))) + (t + (concatenate 'list + (subseq digits 0 k) + (list '.) + (subseq digits k))))))) + (let* ((str (format nil "~{~A~}" digits)) + (len (length str))) + (when (and fdigits (>= fdigits len)) + ;; Append some zeroes to get the desired number of digits + (setf str (concatenate 'string str + (makestring (+ 1 k ( fdigits len)) + :initialelement #\0))) + (setf len (length str))) + (values str + len + (char= (aref str 0) #\.) + (char= (aref str (1 (length str))) #\.) + 1 + 0))))) + (let* ((numexpt (exponentvalue arg)) + (expt (if (zerop (second arg)) + 0 + (1+ ( numexpt k)))) + (estr (format nil "~D" expt)) + (elen (if e (max (length estr) e) (length estr))) + (addzerop nil)) + (cond ((and w overflowchar e (> elen e)) + ;; Exponent overflow + (dotimes (i w) + (writechar overflowchar stream))) + (t + ;; The hairy case + (let* ((fdig (if d + (if (plusp k) + (1+ ( d k)) + d) + nil)) + (fmin (if (minusp k) + 1 + fdig)) + (spaceleft (if w + ( w 2 elen + (if (or atp (minusp (second arg))) + 1 0)) + nil))) + (multiplevaluebind (fstr flen lpoint tpoint) + (bfloattostring arg fdig) + #+(or) + (format t "fstr flen lpoint tpoint = ~S ~S ~S ~S~%" + fstr flen lpoint tpoint) + (when (and d (zerop d)) (setq tpoint nil)) + (when w + (decf spaceleft flen) + ;; See CLHS 22.3.3.2. "If the parameter d is + ;; omitted, ... [and] if the fraction to be + ;; printed is zero then a single zero digit should + ;; appear after the decimal point." So we need to + ;; subtract one from here because we're going to + ;; add an extra 0 digit later. + (when (and (null d) (char= (aref fstr (1 flen)) #\.)) + (setf addzerop t) + (decf spaceleft)) + (when lpoint + (if (or (> spaceleft 0) tpoint) + (decf spaceleft) + (setq lpoint nil))) + (when (and tpoint (<= spaceleft 0)) + (setq tpoint nil))) + #+(or) + (format t "w, spaceleft overflowchar = ~S ~S ~S~%" + w spaceleft overflowchar) + (cond ((and w (< spaceleft 0) overflowchar) + ;; Significand overflow; output the overflow char + (dotimes (i w) + (writechar overflowchar stream))) + (t + (when w + (dotimes (i spaceleft) + (writechar padchar stream))) + (if (minusp (second arg)) + (writechar #\ stream) + (when atp (writechar #\+ stream))) + (when lpoint + (writechar #\0 stream)) + + (writestring fstr stream) + ;; Add a zero if we need it. Which means + ;; we figured out we need one above, or + ;; another condition. Basically, append a + ;; zero if there are no width constraints + ;; and if the last char to print was a + ;; decimal (so the trailing fraction is + ;; zero.) + (when (or addzerop + (and (null w) + (char= (aref fstr (1 flen)) #\.))) + (writechar #\0 stream)) + (writechar (if exponentchar + exponentchar + #\b) + stream) + (writechar (if (minusp expt) #\ #\+) stream) + (when e + (dotimes (i ( e (length estr))) + (writechar #\0 stream))) + (writestring estr stream))))))))) + (values)) + +(defun bfloatformatf (stream number colonp atsign &optional w d (k 0) ovf (pad #\space)) + (labels + ((exponentvalue (x) + ;; Compute the (decimal exponent) of the bfloat number X. + (let* (($fpprintprec 1) + (f (fpformat x)) + (marker (position 'b f))) + ;; FIXME: do something better than printing and reading + ;; the result. + (readfromstring + (format nil "~{~A~}" (nthcdr (1+ marker) f))))) + (bfloattostring (x fdigits scale spaceleft) + ;; Print the bfloat X with FDIGITS after the decimal + ;; point. To do this we need to know the exponent because + ;; fpformat always produces exponential output. If the + ;; exponent is E, and we want FDIGITS after the decimal + ;; point, we need FDIGITS + E digits printed. + (flet ((computeprec (exp spaceleft) + #+nil + (format t "computeprec ~D ~D~%" exp spaceleft) + (cond (fdigits + (+ fdigits exp 1)) + (spaceleft + (max (1 spaceleft) (1+ exp))) + (t + (max (1+ exp) 0))))) + (let* ((exp (+ k (exponentvalue x))) + ($fpprintprec (computeprec exp spaceleft)) + (f (let ((maxima::$bftrunc nil)) + #+nil + (format t "printprec = ~D~%" $fpprintprec) + (fpformat (bcons (fpabs (cdr x)))))) + (marker (position 'b f)) + (digits (remove '. (subseq f 0 marker)))) + ;; Depending on the value of scale, move the decimal + ;; point. DIGITS was printed assuming the decimal point + ;; is after the first digit. But if fdigits = 0, fpformat + ;; actually printed out one too many digits, so we need + ;; to remove that. + #+nil + (format t "exp, fdigits = ~D ~D, digits = ~S~%" exp fdigits digits) + #+nil + (when (and fdigits (zerop fdigits)) + (setf digits (butlast digits))) + ;; Figure out where the decimal point should go. An + ;; exponent of 0 means the decimal is after the first + ;; digit. + (cond ((minusp exp) + (dotimes (k (1 (abs exp))) + (push '0 digits)) + (push '. digits)) + ((< exp (length digits)) + (let ((len (length digits))) + #+nil + (format t "exp, len = ~D ~D~%" exp len) + (setf digits (concatenate 'list + (subseq digits 0 (1+ exp)) + (list '.) + (subseq digits (1+ exp)))))) + (t + (setf digits (append digits (list '.))))) + (let* ((str (format nil "~{~A~}" digits)) + (len (length str))) + #+nil + (format t "str = ~S~%" str) + (when (and fdigits (>= fdigits len)) + ;; Append some zeroes to get the desired number of digits + (setf str (concatenate 'string str + (makestring (+ 1 scale ( fdigits len)) + :initialelement #\0))) + (setf len (length str))) + (values str + len + (char= (aref str 0) #\.) + (char= (aref str (1 (length str))) #\.) + 1 + 0)))))) + (let ((spaceleft w)) + (when (and w (or atsign (minusp (second number)))) + (decf spaceleft)) + (multiplevaluebind (str len lpoint tpoint) + (bfloattostring number d k spaceleft) + ;;if caller specifically requested no fraction digits, suppress the + ;;optional trailing zero + (when (and d (zerop d)) (setq tpoint nil)) + (when w + (decf spaceleft len) + ;;optional leading zero + (when lpoint + (if (or (> spaceleft 0) tpoint) ;force at least one digit + (decf spaceleft) + (setq lpoint nil))) + ;;optional trailing zero + (when tpoint + (if (> spaceleft 0) + (decf spaceleft) + (setq tpoint nil)))) + (cond ((and w (< spaceleft 0) ovf) + ;;field width overflow + (dotimes (i w) (writechar ovf stream)) + t) + (t + (when w (dotimes (i spaceleft) (writechar pad stream))) + (if (minusp (second number)) + (writechar #\ stream) + (if atsign (writechar #\+ stream))) + (when lpoint (writechar #\0 stream)) + (writestring str stream) + (when tpoint (writechar #\0 stream)) + nil)))))) + + ;; Tells you if you have a bigfloat object. BUT, if it is a bigfloat, ;; it will normalize it by making the precision of the bigfloat match ;; the current precision setting in fpprec. And it will also convert diff git a/src/numeric.lisp b/src/numeric.lisp index bd07944..5c4fb38 100755  a/src/numeric.lisp +++ b/src/numeric.lisp @@ 2205,3 +2205,78 @@ sum) #+nil (format t "~4d: ~S ~S ~S~%" k sum term (funcall f k))))) + +;; Format bfloats using ~E format. This is suitable as a ~// format. +;; +;; NOTE: This is a modified version of FORMATEXPAUX from CMUCL to +;; support printing of bfloats. + +(defun formate (stream number colonp atp + &optional w d e k + overflowchar padchar exponentchar) + (typecase number + (bigfloat + (maxima::bfloatformate stream (realvalue number) colonp atp + w d e (or k 1) + overflowchar + (or padchar #\space) + (or exponentchar #\b))) + (complexbigfloat + ;; FIXME: Do something better than this since this doesn't honor + ;; any of the parameters. + (princ number stream)) + (otherwise + ;; We were given some other kind of object. Just use CL's normal + ;; ~E printer to print it. + (let ((f + (withoutputtostring (s) + ;; Construct a suitable ~E format string from the given + ;; parameters. First, handle w,d,e,k. + (writestring "~V,V,V,V," s) + (if overflowchar + (format s "'~C," overflowchar) + (writestring "," s)) + (if (char= padchar #\space) + (writestring "," s) + (format s "'~C," padchar)) + (when exponentchar + (format s "'~C" exponentchar)) + (when colonp + (writechar #\: s)) + (when atp + (writechar #\@ s)) + (writechar #\E s)))) + (format stream f w d e k number))))) + +(defun formatf (stream number colonp atp + &optional w d k overflowchar padchar) + (typecase number + (bigfloat + (maxima::bfloatformatf stream (realvalue number) colonp atp + w d (or k 0) + overflowchar + (or padchar #\space))) + (complexbigfloat + ;; FIXME: Do something better than this since this doesn't honor + ;; any of the parameters. + (princ number stream)) + (otherwise + ;; We were given some other kind of object. Just use CL's normal + ;; ~F printer to print it. + (let ((f + (withoutputtostring (s) + ;; Construct a suitable ~F format string from the given + ;; parameters. First handle w,d,k. + (writestring "~V,V,V," s) + (if overflowchar + (format s "'~C," overflowchar) + (writestring "," s)) + (if (char= padchar #\space) + (writestring "," s) + (format s "'~C," padchar)) + (when colonp + (writechar #\: s)) + (when atp + (writechar #\@ s)) + (writechar #\F s)))) + (format stream f w d k number)))))  Summary of changes: src/float.lisp  278 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/numeric.lisp  75 +++++++++++++++ 2 files changed, 353 insertions(+), 0 deletions() hooks/postreceive  Maxima CAS 