Functions for conversion of integers to bases other than decimal
Usage
intToASCII(i)
intToBase( i, base=2 )
intToOct( i )
intToHex( i )
Arguments
i,base
Integer
Details
isNumeric Test whether the elements of a character vector
represent legal numbers only.
intToASCII Show character or octal representation at a place in the ASCII sequence.
intToBase Convert an integer number to string representation in a base between 2 and 16 inclusive.
intToOct Convert integer to octal representation.
intToHex Convert integer to hex representation.
contfrac Convert to continued fraction representation.
evalcfr Evaluate continued fraction to corresponding real.
toFrac Build rational approximation num/den to x using forward continued fraction recursion to a depth of depth. Stopping criterion: either depth is reached, or abs(x - num/den) is increasing again.
toFrac2 same as toFrac, but vectors of partial numerators and denominators are returned.
xToBase return res$a, res$e so that x = a*base^e, abs( a ) in [1, base)