(frob %long-float long-float))
;;; Convert a ratio to a float. We avoid any rounding error by doing an
-;;; integer division. Accuracy is important to preserve read/print
+;;; integer division. Accuracy is important to preserve print-read
;;; consistency, since this is ultimately how the reader reads a float. We
;;; scale the numerator by a power of two until the division results in the
;;; desired number of fraction bits, then do round-to-nearest.
;; be qualified. This can happen if the symbol has been
;; inherited from a package other than its home package.
;;
- ;; To preserve read/print consistency, use the local nickname if
+ ;; To preserve print-read consistency, use the local nickname if
;; one exists.
(unless (and accessible (eq symbol object))
(let ((prefix (or (car (rassoc package (package-%local-nicknames current)))
When printing a package prefix for a symbol with a package local nickname, the
local nickname is used instead of the real name in order to preserve
-read/print consistency.
+print-read consistency.
See also: ADD-PACKAGE-LOCAL-NICKNAME, PACKAGE-LOCALLY-NICKNAMED-BY,
REMOVE-PACKAGE-LOCAL-NICKNAME, and the DEFPACKAGE option :LOCAL-NICKNAMES.
When printing a package prefix for a symbol with a package local nickname,
local nickname is used instead of the real name in order to preserve
-read/print consistency.
+print-read consistency.
See also: PACKAGE-LOCAL-NICKNAMES, PACKAGE-LOCALLY-NICKNAMED-BY,
REMOVE-PACKAGE-LOCAL-NICKNAME, and the DEFPACKAGE option :LOCAL-NICKNAMES.
(assert (raises-error? (merge-pathnames (make-string-output-stream))
type-error)))
\f
-;;; ensure read/print consistency (or print-not-readable-error) on
+;;; ensure print-read consistency (or print-not-readable-error) on
;;; pathnames:
(with-test (:name :print/read-consistency :fails-on :win32)
(let ((pathnames (list
(assert (string= (format nil "~E" 0.01) "1.e-2"))
(assert (string= (format nil "~G" 0.01) "1.00e-2")))
-(with-test (:name (:fp-read/print-consistency single-float))
+(with-test (:name (:fp-print-read-consistency single-float))
(let ((*random-state* (make-random-state t))
(oops))
(loop for f = most-positive-single-float then (/ f 2.0)
(push fr oops)
(return))))
(when oops
- (error "FP read/print inconsistencies:~%~:{ ~S => ~S~%~}"
+ (error "FP print-read inconsistencies:~%~:{ ~S => ~S~%~}"
(mapcar (lambda (f)
(list f (read-from-string (prin1-to-string f))))
oops)))))
-(with-test (:name (:fp-read/print-consistency double-float))
+(with-test (:name (:fp-print-read-consistency double-float))
(let ((*random-state* (make-random-state t))
(oops))
;; FIXME skipping denormalized floats due to bug 793774.
(push fr oops)
(return)))))
(when oops
- (error "FP read/print inconsistencies:~%~:{ ~S => ~S~%~}"
+ (error "FP print-read inconsistencies:~%~:{ ~S => ~S~%~}"
(mapcar (lambda (f)
(list f (read-from-string (prin1-to-string f))))
oops)))))