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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more