Subject | Re: [firebird-support] Double precision field problem |
---|---|
Author | Michael Weissenbacher |
Post date | 2006-10-30T15:43:19Z |
Hi,
public class Float
{
public static void main(String[] args)
{
double field1=78.69;
double field2=78.12;
double sub=field1-field2;
System.out.println(field1+"-"+field2+"="+sub);
}
}
and it's output:
78.69-78.12=0.5699999999999932
qed,
Michael
> the result is 1,56999999999999Consider this small Java program:
> the result must be 1,57
public class Float
{
public static void main(String[] args)
{
double field1=78.69;
double field2=78.12;
double sub=field1-field2;
System.out.println(field1+"-"+field2+"="+sub);
}
}
and it's output:
78.69-78.12=0.5699999999999932
qed,
Michael