fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static final double epsilon = 0.00000001;
  11.  
  12. public static final double a [] = {
  13. -180.0,
  14. -180.0 + epsilon * 2,
  15. -epsilon * 2
  16. };
  17. public static void main (String[] args) throws java.lang.Exception
  18. {
  19. int index;
  20. for (index = 0; index < a.length; ++index) {
  21. System.out.println(index + ": " + a[index]);
  22. }
  23. }
  24. }
Success #stdin #stdout 0.09s 320320KB
stdin
Standard input is empty
stdout
0: -180.0
1: -179.99999998
2: -2.0E-8