fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. double x = 2.37/10.0;
  8. double y = 0.237;
  9. byte[] x_byte= BitConverter.GetBytes(x);
  10. byte[] y_byte= BitConverter.GetBytes(y);
  11.  
  12. Console.WriteLine("operating: {0}",string.Join(" ",x_byte));
  13. Console.WriteLine("numbering: {0}",string.Join(" ",y_byte));
  14. Console.WriteLine("Are they equal? {0}", x_byte.SequenceEqual(y_byte));
  15. // your code goes here
  16. }
  17. }
  18.  
Success #stdin #stdout 0.04s 29840KB
stdin
Standard input is empty
stdout
operating: 189 116 147 24 4 86 206 63
numbering: 188 116 147 24 4 86 206 63
Are they equal? False