summaryrefslogtreecommitdiff
path: root/from_Torbjorn
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-09 18:03:33 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-09 18:03:33 +0000
commit0cf5fc5ea4b5ed46b454d3bf3adc620d9fff2d32 (patch)
tree62d12a119f5dfc15abe2f6d298617e174a0a06af /from_Torbjorn
parent8d21dd7188076894a6f65e510797c8c6928e474f (diff)
downloadmpfr-0cf5fc5ea4b5ed46b454d3bf3adc620d9fff2d32.tar.gz
Initial revision
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'from_Torbjorn')
-rw-r--r--from_Torbjorn28
1 files changed, 28 insertions, 0 deletions
diff --git a/from_Torbjorn b/from_Torbjorn
new file mode 100644
index 000000000..147c7b03f
--- /dev/null
+++ b/from_Torbjorn
@@ -0,0 +1,28 @@
+Return-Path: <tege@matematik.su.se>
+X-Address: Department of Mathematics, Stockholm University
+ S-106 91 Stockholm
+ SWEDEN
+X-Phone: int+46 8 162000
+X-Fax: int+46 8 6126717
+X-Url: http://www.matematik.su.se
+To: Paul.Zimmermann@loria.fr (Paul Zimmermann)
+Subject: Re: Paul Zimmermann: changing rounding mode on Alpha with gcc
+In-reply-to: Your message of "Wed, 17 Feb 1999 17:44:33 +0100."
+ <199902171644.RAA03746@leopold.loria.fr>
+Date: Wed, 17 Feb 1999 19:21:05 +0100
+From: Torbjorn Granlund <tege@matematik.su.se>
+
+ I once thought I had found a bug, but it was only the peculiar rounding
+ to nearest rule when we are just in the middle of two machine number,
+ where we round to the even lsb instead of rounding to infinity as we do
+ in math.
+
+Been there... ;-) Note that it is simple to get this right with a single
+logical expression. Perhaps this code,
+
+ roundup = (((m >> (EXP_BITS - 1)) & 1)
+ & (((m & STICKY_MASK) != 0) | ((m >> EXP_BITS) & 1)));
+
+from my P754 library shows the idea.
+
+Tobjörn