lvm.js

changeset 142
574e0baea136
parent 141
16b833862ae2
child 143
a689e0187ef5
equal deleted inserted replaced
141:16b833862ae2 142:574e0baea136
844 var math = { 844 var math = {
845 ldexp: function (m, e) 845 ldexp: function (m, e)
846 { 846 {
847 return [this.LValue(m.value*Math.pow(2, e.value))]; 847 return [this.LValue(m.value*Math.pow(2, e.value))];
848 }, 848 },
849 frexp: function (x)
850 {
851 var m = x.value;
852 var e = 0;
853 while (Math.abs(m) >= 1) {
854 m = m / 2;
855 e = e + 1;
856 };
857 return [this.LValue(m), this.LValue(e)];
858 },
849 floor: function (x) 859 floor: function (x)
850 { 860 {
851 return [this.LValue(Math.floor(x.value))]; 861 return [this.LValue(Math.floor(x.value))];
852 } 862 }
853 }; 863 };

mercurial