# NOT RUN {
# for integer values
dval <- 12
(bval <- decimal2binary(dval))
binary2decimal(bval)
# for real values
dval <- 12.456
# use
(bval <- decimal2binary(dval*1000))
binary2decimal(bval)/1000
# }
Run the code above in your browser using DataLab