Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 1998 09:00:01 -0800 (PST)
From:      Joakim Henriksson <murduth@ludd.luth.se>
To:        freebsd-ports@FreeBSD.ORG
Subject:   Re: ports/9061
Message-ID:  <199812151700.JAA13117@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/9061; it has been noted by GNATS.

From: Joakim Henriksson <murduth@ludd.luth.se>
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: ports/9061
Date: Tue, 15 Dec 1998 17:51:04 +0100 (CET)

 A corrected patch, don't use the other one...
 
 
 *** jikesos/jikes/src/double.cpp.orig	Tue Dec 15 12:25:00 1998
 --- jikesos/jikes/src/double.cpp	Tue Dec 15 13:00:54 1998
 ***************
 *** 125,136 ****
   
   IEEEdouble IEEEdouble::operator/ (IEEEdouble op)
   {
 !     return IEEEdouble(DoubleValue() / op.DoubleValue());
   }
   
   IEEEdouble& IEEEdouble::operator/= (IEEEdouble op)
   {
 !     *this = *this / op;
       return *this;
   }
   
 --- 125,156 ----
   
   IEEEdouble IEEEdouble::operator/ (IEEEdouble op)
   {
 !     if (op.DoubleValue() == 0.0)
 !     {
 !         if (DoubleValue() < 0.0)
 !             return NEGATIVE_INFINITY();
 ! 	else if (DoubleValue() == 0.0)
 !             return NaN();
 ! 	else
 !             return POSITIVE_INFINITY();
 !     }
 !     else
 !         return IEEEdouble(DoubleValue() / op.DoubleValue());
   }
   
   IEEEdouble& IEEEdouble::operator/= (IEEEdouble op)
   {
 !     if (op.DoubleValue() == 0.0)
 !     {
 !         if (*this < 0.0)
 !             *this = NEGATIVE_INFINITY();
 ! 	else if (*this == 0.0)
 !             *this = NaN();
 ! 	else
 !             *this = POSITIVE_INFINITY();
 !     }
 !     else
 !         *this = *this / op;
       return *this;
   }
   
 ***************
 *** 240,251 ****
   
   void IEEEdouble::Fmodulus(IEEEdouble a, IEEEdouble b, IEEEdouble& result)
   {
 !      result.DoubleValue() = fmod(a.DoubleValue(), b.DoubleValue());
   }
   
   void IEEEdouble::Divide(IEEEdouble dividend, IEEEdouble divisor, IEEEdouble &quotient)
   {
 !     quotient = dividend.DoubleValue() / divisor.DoubleValue();
       return;
   }
   
 --- 260,284 ----
   
   void IEEEdouble::Fmodulus(IEEEdouble a, IEEEdouble b, IEEEdouble& result)
   {
 !      if (b.DoubleValue() == 0)
 !          result.DoubleValue() = NaN().DoubleValue();
 !      else
 !          result.DoubleValue() = fmod(a.DoubleValue(), b.DoubleValue());
   }
   
   void IEEEdouble::Divide(IEEEdouble dividend, IEEEdouble divisor, IEEEdouble &quotient)
   {
 !     if (divisor.DoubleValue() == 0)
 !     {
 !         if (dividend.DoubleValue() < 0.0)
 ! 	    quotient = NEGATIVE_INFINITY();
 ! 	else if (dividend.DoubleValue() == 0.0)
 ! 	    quotient = NaN();
 ! 	else
 ! 	    quotient = POSITIVE_INFINITY();
 !     }
 !     else
 !         quotient = dividend.DoubleValue() / divisor.DoubleValue();
       return;
   }
   
 ***************
 *** 261,267 ****
   
   void IEEEfloat::Fmodulus(IEEEfloat a, IEEEfloat b, IEEEfloat& result)
   {
 !     result.FloatValue() = (float) fmod((double) a.FloatValue(), (double) b.FloatValue());
   }
   
   void IEEEfloat::String(char * str)
 --- 294,306 ----
   
   void IEEEfloat::Fmodulus(IEEEfloat a, IEEEfloat b, IEEEfloat& result)
   {
 !     if (b.FloatValue() == 0.0)
 !     {
 !         IEEEdouble d;
 !         result.FloatValue() = (float) d.NaN().DoubleValue();
 !     }
 !     else
 !         result.FloatValue() = (float) fmod((double) a.FloatValue(), (double) b.FloatValue());
   }
   
   void IEEEfloat::String(char * str)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812151700.JAA13117>