Created
May 26, 2021 13:41
-
-
Save thata/1416977adf7d370eced64d22e0c273d2 to your computer and use it in GitHub Desktop.
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
# bin2float.rb | |
# usage: | |
# ruby bin2float.rb 11000010111011010100000000000000 #=> -118.625 | |
puts [ARGV[0]].pack('B*').unpack('g') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment