HalfPrecisionFloatEncoder encoder = new HalfPrecisionFloatEncoder(
null, outputStream);
encoder.encode(new HalfPrecisionFloat(value));
ByteArrayInputStream inputStream = new ByteArrayInputStream(
outputStream.toByteArray());
HalfPrecisionFloatDecoder decoder = new HalfPrecisionFloatDecoder(
null, inputStream);
HalfPrecisionFloat halfPrecisionFloat = decoder.decode(0);
return value == halfPrecisionFloat.getValue();
} catch (CborException cborException) {
return false;
}
}