概要
plunkerでieee754やってみた。
dataview使わないで、浮動小数点(binary32)に変換、その逆も。
使用したライブラリー
サンプルコード
var out = document.getElementById("out");
var src = document.getElementById("src");
var out2 = document.getElementById("out2");
function run0() {
var val = src.value;
out.value = getPrecision(val);
}
function run1() {
var val = out.value;
out2.value = getDecimal(val);
}
成果物
以上。