Re: Arithmetic Precision Errors

1998-09-21 Thread Ondrej Popp
I am not able to reproduce this, can you be more specific on the source? Ondrej import java.io.*; public class arithmetic { public static void main(String Args[]) { double d1 = 172.5 / 1000; double d2 = 817.0 / 1000; double d3 = 4975.0 / 1000; Double D1 = new Doub

Arithmetic Precision Errors

1998-09-21 Thread Maarten van Leunen
Howdie, I have this panel containing fields that I have to arithmetically change. However, with some fields, with the following calculation I get the following results: 172.5 / 1000 = 0.172501 817.0 / 1000 = 0.81701 4975.0 / 1000 = 4.975005 Why is that and how do I stop it? It loo