using System;
using System.Numerics;
public class Program
{
public static void Main()
byte[] bytes = new byte[] { 0xd1, 0x35 }; // Your byte array containing the float16 bytes
// Ensure correct endianness
if (BitConverter.IsLittleEndian)
Array.Reverse(bytes);
}
// Convert the bytes to UInt16 (half-precision floating-point format)
ushort value = BitConverter.ToUInt16(bytes, 0);
// Convert the UInt16 value to a Half (float16)
Half float16Value = new Half(value);
// Display the float16 value
Console.WriteLine("Float16 value: " + float16Value);