projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3cd24ab
)
Bug fix: prevent negative zero.
author
mdw
<mdw>
Tue, 15 Oct 2002 22:57:43 +0000
(22:57 +0000)
committer
mdw
<mdw>
Tue, 15 Oct 2002 22:57:43 +0000
(22:57 +0000)
mptext.c
patch
|
blob
|
blame
|
history
tests/mptext
patch
|
blob
|
blame
|
history
diff --git
a/mptext.c
b/mptext.c
index
40e1764
..
fcdac51
100644
(file)
--- a/
mptext.c
+++ b/
mptext.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mptext.c,v 1.1
5 2002/10/15 19:18:15
mdw Exp $
+ * $Id: mptext.c,v 1.1
6 2002/10/15 22:57:43
mdw Exp $
*
* Textual representation of multiprecision numbers
*
*
* Textual representation of multiprecision numbers
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mptext.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mptext.c,v $
+ * Revision 1.16 2002/10/15 22:57:43 mdw
+ * Bug fix: prevent negative zero.
+ *
* Revision 1.15 2002/10/15 19:18:15 mdw
* Fix fencepost bugs in binary radix writing.
*
* Revision 1.15 2002/10/15 19:18:15 mdw
* Fix fencepost bugs in binary radix writing.
*
@@
-501,6
+504,7
@@
done:
if (f & f_neg)
m->f |= MP_NEG;
if (f & f_neg)
m->f |= MP_NEG;
+ MP_SHRINK(m);
return (m);
#undef f_start
return (m);
#undef f_start
diff --git
a/tests/mptext
b/tests/mptext
index
db6ed83
..
71acb86
100644
(file)
--- a/
tests/mptext
+++ b/
tests/mptext
@@
-1,6
+1,6
@@
# Test vectors for MP textual I/O
#
# Test vectors for MP textual I/O
#
-# $Id: mptext,v 1.1
0 2002/10/15 19:18:15
mdw Exp $
+# $Id: mptext,v 1.1
1 2002/10/15 22:57:43
mdw Exp $
mptext-ascii {
# --- Perfectly valid things ---
mptext-ascii {
# --- Perfectly valid things ---
@@
-60,6
+60,10
@@
mptext-ascii {
10 -4009356060 16 -eef9eb1c;
10 -4009356060 16 -eef9eb1c;
+ # --- Cussidness ---
+
+ 0 -0 10 0;
+
# --- Bugs ---
16 84d192cd06ae59691897fa409da6198d5269325d
# --- Bugs ---
16 84d192cd06ae59691897fa409da6198d5269325d