Created
November 28, 2015 21:27
-
-
Save vicapow/de57cac76ace278e31bb to your computer and use it in GitHub Desktop.
split a double into two floats, hi and low
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function splitDouble(value) { | |
var hi = Float32Array.from([value])[0]; | |
var low = value - hi; | |
return [hi, low]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment