Published
Edited
Jan 8, 2021
1 fork
Insert cell
md`# Float utils
需要实现:
- 单精度转半精度二进制形式:str toFloat16Bin(float32)
- 半精度二进制形式转单精度 float parseFloat16Bin(str)
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
toFloat16Bin(0.15625).match(/^(\d)(\d{5})(\d{10})$/).slice(1).join(' ')
Insert cell
parseFloat16Bin('0011000100000000')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more