gpt4 book ai didi

java - 如何将 IEEE-11073 16 位 SFLOAT 转换为 Java 中的简单 float ?

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:46:02 25 4
gpt4 key购买 nike

标题不言而喻:如何将 IEEE-11073 16 位 SFLOAT 转换为 Java 中的简单 float ?

最佳答案

IEEE-11073 不在公共(public)领域,但您可以在蓝牙个人健康资料中找到足够的信息。谷歌搜索完整规范# 11073-2060。以下是蓝牙个人健康转码论文的复制粘贴:

The following information is defined in ISO/IEEE Std. 11073-2060™1-2008 [1].

The SFLOAT-Type data type is defined to represent numeric values that are not integer in type. The SFLOAT-Type is defined as a 16-bit value with 12-bit mantissa and 4-bit exponent. See Annex F.8 of [1] for a thorough definition of the SFLOAT-Type. This data type is defined as follows:

Exponent Mantissa
Size 4 bit 12 bit

16-bit float type; the integer type is a placeholder only

SFLOAT-Type ::= INT-U16

The 16–bit value contains a 4-bit exponent to base 10, followed by a 12-bit mantissa. Each is in twos-complement form.

Special values are assigned to express the following:

  • NaN [exponent 0, mantissa +(2^11 –1) → 0x07FF]
  • NRes [exponent 0, mantissa > –(2^11) → 0x0800]
  • INFINITY [exponent 0, mantissa +(2^11 –2) →0x07FE]– INFINITY [exponent 0, mantissa –(2^11 –2) → 0x0802]
  • Reserved for future use [exponent 0, mantissa –(2^11 –1) → 0x0801]

关于java - 如何将 IEEE-11073 16 位 SFLOAT 转换为 Java 中的简单 float ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11564270/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com