diff options
author | Alon Zakai <azakai@mozilla.com> | 2011-01-24 20:32:15 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2011-01-24 20:32:15 -0800 |
commit | eaa744cc501293669b277b754975addbb7af3ba8 (patch) | |
tree | 990995538ee5fe8b699cf99383e0311a272b0553 /src | |
parent | df10a98f50d94962596fccdcaaca0cace922e3c6 (diff) |
ldexp in library; fixes issue 30
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index d12147f0..9c25ebce 100644 --- a/src/library.js +++ b/src/library.js @@ -883,6 +883,9 @@ var Library = { llvm_sqrt_f64: 'Math.sqrt', llvm_pow_f32: 'Math.pow', llvm_pow_f64: 'Math.pow', + ldexp: function(x, exp_) { + return x*Math.pow(2, exp_); + }, modf: function(x, intpart) { {{{ makeSetValue('intpart', 0, 'Math.floor(x)', 'double') }}} |