Dear R users
I looked around for a package which can help me with the task of binary
arithmetic, the closest I found is sfsmisc with digitsBase function, which may
help a little in this task, but still wondering how to get this problem solved.
example:
given the addition operation of 2 real numbers to equal as below
99.30
2.11
===
102.09 <--- desired output as explained below
the decimal point is for ease or reading and does carry the usual meaning.
the numbers t0 the right of the decimal point are added
30
11
===
41
divided by 32 equal 1 with a reminder of 9
the numbers to the left of the decimal point are added
99
2
===
101
1 which is carried from above
===
102
put together 102.09, again the decimal point doesn't carry the usual meaning
but only for ease of reading.
the same principle above is needed to alse apply for other operations like
subtraction,
thank you
---------------------------------
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html