This converter supports positive and negative floating-point numbers.
Decimal

float (32bit)

Decimal (exact)
Binary
Hexadecimal

double (64bit)

Decimal (exact)
Binary
Hexadecimal

Description

A floating-point number (value) can be represented as follows: The actual value of a floating-point number is equal to the sign bit multiplied by the exponent bias value, and then multiplied by the fraction value. Yes, it is essentially scientific notation.

IEEE 754 half-precision floating-point number:16 bits sign 1 bit,exponent 5 bit,fraction 10 bit
IEEE 754 single-precision floating-point number:32 bits sign 1 bit,exponent 8 位,fraction 23 bit
IEEE 754 double-precision floating-point number:64 bits sign 1 bit,exponent 11 位,fraction 52 bit

Example of 16-bits half-precision floating-point number calculation process:
16 bit 浮点数计算过程

Refer to:
https://github.com/Skalman/baseconvert
https://www.h-schmidt.net/FloatConverter/IEEE754.html

0 Comments

0 / 300