lvm.js

changeset 142
574e0baea136
parent 141
16b833862ae2
child 143
a689e0187ef5
--- a/lvm.js	Wed Nov 24 03:36:14 2010 +0000
+++ b/lvm.js	Sat Sep 21 14:02:16 2013 +0100
@@ -846,6 +846,16 @@
 	{
 		return [this.LValue(m.value*Math.pow(2, e.value))];
 	},
+	frexp: function (x)
+	{
+		var m = x.value;
+		var e = 0;
+		while (Math.abs(m) >= 1) {
+			m = m / 2;
+			e = e + 1;
+		};
+		return [this.LValue(m), this.LValue(e)];
+	},
 	floor: function (x)
 	{
 		return [this.LValue(Math.floor(x.value))];

mercurial