import java.io.*;
import java.math.BigInteger;

public class FileTest {
    public static void main(String[] args) throws Exception {
        InputStream in = new FileInputStream(args[0]);
        InputStreamReader isr = new InputStreamReader(in);
        BufferedReader br = new BufferedReader(isr);
        String str = null;
        while ((str = br.readLine()) != null) {
            // System.out.format("str: %s%n", str);
            BigInteger big = new BigInteger(str);
            double expected = Double.parseDouble(big.toString());
            double actual = big.doubleValue();

            // should be bitwise identical
            if (Double.doubleToRawLongBits(expected) != Double
                    .doubleToRawLongBits(actual)) {
                System.out.format("FAILURE: %s%n", big);
                break;
            }
        }
    }
}
