[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#442568: glibc: floor() is giving incorrect results on alpha architecture

The following message is a courtesy copy of an article
that has been posted to gmane.linux.debian.ports.alpha as well.


0:14 pts/10 sacha@vinci:/tmp 5> cat dblc.c 
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdio.h>

int main() {
  double x;

  printf("%s%d\n", "DBL_MANT_DIG = ", DBL_MANT_DIG);
  x = ldexp (1.0, DBL_MANT_DIG) - 1.0;
  printf("%lf %lf\n", x, floor(x));
  assert(x == floor(x));    /* does not seem to work in alpha */
  return 0;
10:14 pts/10 sacha@vinci:/tmp 6> gcc -Wall -lm -o dblc dblc.c 
10:14 pts/10 sacha@vinci:/tmp 7> ./dblc 
9007199254740991.000000 9007199254740991.000000
10:14 pts/10 sacha@vinci:/tmp 8> uname -a
Linux vinci 2.6.23-rc8-rt2x00-gc31d1777-dirty #1 Wed Oct 3 11:44:23 MSD 2007 alpha GNU/Linux

>>>>> On Fri, 05 Oct 2007 20:31:45 -0400
>>>>> "KSK" == Kamaraju S Kusumanchi <kamaraju@bluebottle.com> wrote:
KSK> I have filed this as
KSK> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442568 . But there is no
KSK> response from the maintainer even after 20 days. I don't have access to an
KSK> alpha machine to look more into the problem. This bug makes guile-1.8 FTBFS
KSK> on alpha. So it would be great if someone can take a stab at it.
KSK> thanks
KSK> raju
KSK> -- 
KSK> Kamaraju S Kusumanchi
KSK> http://www.people.cornell.edu/pages/kk288/
KSK> http://malayamaarutham.blogspot.com/
Alexander Kotelnikov
Saint-Petersburg, Russia

Reply to: