Learn R Programming

XICOR (version 0.4.1)

wholebinary: Encodes a number as a two row binary matrix and its sign

Description

Auxiliary function used for generating expansion of a number, the binary expansion of length nc of the integer part is the first row and the binary expansion of length nc of the fractional part is the second row of the matrix. The sign as appended into the final list object which the function returns.

Usage

wholebinary(x, nc = 31)

Value

This function generates a list with a binary matrix rmat with two rows and the sign sgn in a separate entry of the list.

Arguments

x

is a decimal number

nc

is the length of the binary expansion and defines the number of columns of the output matrix