bits_as_string: Generate a text representation of the bits in a double

Description Usage Arguments Examples

View source: R/squeeze_bits.R

Description

Generate a character vector of ones, zeros, and spaces, representing the bits in a double. Spaces are used to separate the sign bit, 11 exponent bits, and 52 fraction bits.

Usage

1

Arguments

d

a numeric value

Examples

1
2
3
# Output binary representation of pi
bits_as_string(pi)
# 0 10000000000 1001001000011111101101010100010001000010110100011000

bitsqueezr documentation built on March 26, 2020, 8:42 p.m.