seq defaults to a minimal fixed point format that does not lose
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 1 Jul 2006 00:11:23 +0000 (00:11 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 1 Jul 2006 00:11:23 +0000 (00:11 +0000)
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.

seq now lets you use %a, %A, %E, %F, and %G formats.

seq now uses long double internally rather than double.

ChangeLog
NEWS
doc/ChangeLog
lib/ChangeLog
m4/ChangeLog

index eba7d53..fb4d136 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: seq now uses long double internally rather than double.
+       It now defaults to a minimal fixed point format if possible.
+       It lets you use %a, %A, %E, %F, %G.
+       * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
+       * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
+       (isfinite) [!defined isfinite]: New macro.
+       (separator, terminator): Now points to const.
+       (first, step, last): Remove.
+       (usage): Update to match new behavior.
+       (struct operand, operand): New type.
+       (scan_arg): Renamed from scan_double_arg, since we no longer use double.
+       All uses changed.
+       Compute and return a value of type operand, not double.
+       (long_double_format): Renamed from valid_format, and now returns a
+       new format with an "L" added if needed, if the original format was
+       valid.  Allow %a, %A, %E, %F, and %G formats.
+       (print_numbers): Take numeric values as args rather than from globals.
+       Print long double, not double.
+       (get_width_format): Remove.
+       (get_default_format): New function.
+       (main): Implement new way of calculating default format.
+       Don't worry about locale's representation of the decimal point, since
+       the arguments are always processed in the C locale.
+       * tests/seq/basic (neg-2): Adjust to new default format.
+       (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
+       implementation should do the right thing.
+
 2006-06-30  Jim Meyering  <jim@meyering.net>
 
        * tests/stty/basic-1: Work around an intermittent test failure
diff --git a/NEWS b/NEWS
index d82d786..8be655f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,17 @@ GNU coreutils NEWS                                    -*- outline -*-
 
   rm no longer fails to remove an empty, unreadable directory
 
+  seq changes:
+
+    seq defaults to a minimal fixed point format that does not lose
+    information if seq's operands are all fixed point decimal numbers.
+    You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
+    for example, since the default format now has the same effect.
+
+    seq now lets you use %a, %A, %E, %F, and %G formats.
+
+    seq now uses long double internally rather than double.
+
   sort now reports incompatible options (e.g., -i and -n) rather than
   silently ignoring one of them.
 
index 99a4081..e253cad 100644 (file)
@@ -1,3 +1,12 @@
+2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * coreutils.texi (seq invocation): seq now uses long double
+       internally rather than double.  It now defaults to a minimal fixed
+       point format if possible.  It lets you use %a, %A, %E, %F, %G.
+       Don't assume printf doesn't work for numbers that fit in 64 but
+       not 32 bits; typically they work these days.  Improve discussion
+       of large integers and update the rounding-error numbers.
+
 2006-06-28  Paul Eggert  <eggert@cs.ucla.edu>
 
        * coreutils.texi (sort invocation): 'sort +1 -2' is now supported
index 63bb492..5963bf5 100644 (file)
@@ -1,3 +1,11 @@
+2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
+       both double and long double versions.
+       (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
+       * xstrtold.c: New file.
+       * xstrtod.h (xstrtold): New decl.
+
 2006-06-29  Derek R. Price  <derek@ximbiot.com>
 
        * strftime.c: Assume strftime exists.
index fc4f88c..ac12648 100644 (file)
@@ -1,3 +1,13 @@
+2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
+       Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
+       want to require the building of c-strtod.o.
+       * lib-check.m4 (cu_LIB_CHECK): Remuve SEQ_LIBM, since seq no longer
+       needs -lm directly.
+       * prereq.m4 (gl_PREREQ): Require gl_C_STRTOD and gl_XSTRTOLD.
+       * xstrtod.m4 (gl_XSTRTOLD): New macro.
+
 2006-06-29  Derek R. Price  <derek@ximbiot.com>
 
        * strftime.m4: Don't call AC_FUNC_STRFTIME.