Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for intBitsToFloat (0.19 sec)

  1. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] data = {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
        ByteArrayDataInput in = ByteStreams.newDataInput(data);
        assertEquals(Float.intBitsToFloat(0x12345678), in.readFloat(), 0.0);
        assertEquals(Float.intBitsToFloat(0x76543210), in.readFloat(), 0.0);
      }
    
      public void testNewDataInput_readDouble() {
        byte[] data = {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        TestHasher hasher = new TestHasher();
        hasher.putDouble(Double.longBitsToDouble(0x0807060504030201L));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/util/Encdec.java

        /* Decode floating point numbers
         */
    
        public static float dec_floatle( byte[] src, int si )
        {
            return Float.intBitsToFloat( dec_uint32le( src, si ));
        }
        public static float dec_floatbe( byte[] src, int si )
        {
            return Float.intBitsToFloat( dec_uint32be( src, si ));
        }
    
        /* Encode and decode doubles
         */
    
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 10.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
    
        byte[] data = baos.toByteArray();
    
        /* Setup input streams */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
      }
    
      public void testReadFully() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
      }
    
      public void testReadFully() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] data = {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
        ByteArrayDataInput in = ByteStreams.newDataInput(data);
        assertEquals(Float.intBitsToFloat(0x12345678), in.readFloat(), 0.0);
        assertEquals(Float.intBitsToFloat(0x76543210), in.readFloat(), 0.0);
      }
    
      public void testNewDataInput_readDouble() {
        byte[] data = {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (1)
  8. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(), new Sink(4).putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        Sink sink = new Sink(4);
        sink.putFloat(Float.intBitsToFloat(0x04030201));
        HashCode unused = sink.hash();
        sink.assertInvariants(4);
        sink.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        Sink sink = new Sink(8);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

       *     little-endian byte order
       * @throws IOException if an I/O error occurs
       */
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      public float readFloat() throws IOException {
        return Float.intBitsToFloat(readInt());
      }
    
      /**
       * Reads a {@code double} as specified by {@link DataInputStream#readDouble()}, except using
       * little-endian byte order.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testDouble() {
        TestHasher hasher = new TestHasher();
        hasher.putDouble(Double.longBitsToDouble(0x0807060504030201L));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
Back to top