Displaying 1 result from an estimated 1 matches for "myfrac".
Did you mean:
myfac
2009 Aug 06
0
About numerical accuracy: should there be a rational number class for fractions?
...1.htm
avoid division until the last possible moment!)
In R, we could protect ourselves somewhat if there were a class for
handling rational numbers. Instead of taking a value like 2/3 and
letting the floating point calculation occur, a function could create
a "rational number object"
myfrac <- rational(2, 3)
And if I'm understanding the inheritance logic of objects in S 4
classes, then the rational class could implement +, -, / .
Well, I'm just wondering what you think about this question. I don't
think I could write this class, but I might be able to help somebody
re...