Commit 18c1533c authored by Liam M. Healy's avatar Liam M. Healy

Introduce *default-specific-exponent-marker*

Introduce *default-specific-exponent-marker* to allow using the generic
exponent marker rather than a specific one.
parent e4711a69
;; Floating point numbers.
;; Liam Healy Wed May 8 2002 - 10:47
;; Time-stamp: <2015-04-25 12:11:26EDT float.lisp>
;; Time-stamp: <2016-01-17 23:09:55EST float.lisp>
;; Copyright 2011, 2012 Liam M. Healy
;; Copyright 2011, 2012, 2016 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;; This program is free software: you can redistribute it and/or modify
......@@ -20,7 +20,7 @@
(in-package :antik)
(export '(*format-float-significant-figures*))
(export '(*format-float-significant-figures* *default-specific-exponent-marker*))
(defparameter *print-sign* nil
"Always print the sign, even if +.")
......@@ -95,11 +95,12 @@
"The default number of significant figures in
floating point number output.")
(defparameter *default-specific-exponent-marker* t)
(defun format-float-switch
(float &optional
(significant-figures *format-float-significant-figures*)
(print-sign *print-sign*)
(specific-exponent-marker t))
(specific-exponent-marker *default-specific-exponent-marker*))
"Format a floating point number for printing in a readable way. If specific-exponent-marker is T use the 'd', 'f' etc. to mark the exponent, instead of 'e'."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment