Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Question: How to convert the "uint16" value to half-precision float (i.e. "float16")? #78

Description

@stuartZhang

Hello,

In my project, I need to unpack a binary file where there are a few of the half-precision float (i.e. "float16") values. As of this writing, I read it from the binary stream by using the specification API "getUint16(0)".

Could you please teach me how to convert the "uint16" number back to the "float16" using JavaScript?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions