Date: Tue, 15 Dec 1998 13:17:00 +0100 From: Joakim Henriksson <murduth@ludd.luth.se> To: freebsd-bugs@FreeBSD.ORG Subject: ports/9061 change-request Message-ID: <199812151217.NAA09581@rmstar.campus.luth.se>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Could someone either close ports/9061 (about jikes) and mail me, so that i can
submit a pr with a better patch, or put the following patch in the pr instead.
Since after rewieving the old patch i realized it was very wrong indeed.
[-- Attachment #2 --]
*** 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 "ient)
{
! 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 "ient)
{
! 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)
[-- Attachment #3 --]
regards/ Joakim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812151217.NAA09581>
