List'
Betreff: RE: Java and double
Ya, I've seen that one before. use the java.math package.
-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: Java and double
Hi,
Excuse me
Hi,
Excuse me... this mail shouldnot be on this mailing list but
it is an hurry.
public class TestDouble
{
static public void main(String args[]) {
double val = 0.5055 * 1000 ;
System.out.println( val );
}
}
This program gives me the following results :
505.44
of the
number you will get round off errors. This is the very nature of floating
point numbers.
-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 8:39 AM
To: [EMAIL PROTECTED]
Subject: Java and double
Hi,
Excuse me... this mail shouldnot
Ya, I've seen that one before. use the java.math package.
-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: Java and double
Hi,
Excuse me... this mail shouldnot be on this mailing list
/ACM/goldberg.pdf
If you want more accuracy you can use
java.math.BigDecimal.
-Ursprüngliche Nachricht-
Von: Laurent Michenaud [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 14. November 2001 16:39
An: [EMAIL PROTECTED]
Betreff: Java and double
Hi,
Excuse me... this mail
]
Subject: Java and double
Hi,
Excuse me... this mail shouldnot be on this mailing list but
it is an hurry.
public class TestDouble
{
static public void main(String args[]) {
double val = 0.5055 * 1000 ;
System.out.println( val );
}
}
This program gives me
, 2001 8:44 AM
Subject: RE: Java and double
Ya, I've seen that one before. use the java.math package.
-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: Java and double
Hi,
Excuse me... this mail
try putting a 1000d (I think you have to tell the vm that this is a
double value or it may try an compute a float!
- Original Message -
From: Micael Padraig Og mac Grene [EMAIL PROTECTED]
Date: Wednesday, November 14, 2001 9:41 am
Subject: Re: Java and double
Not sure what your point
. November 2001 20:36
An: Tomcat Users List
Betreff: Re: Java and double
try putting a 1000d (I think you have to tell the vm that this is a
double value or it may try an compute a float!
- Original Message -
From: Micael Padraig Og mac Grene [EMAIL PROTECTED]
Date: Wednesday, November