The frab class provides basic arithmetic methods for frab objects. Arithmetic operations are generally dispatched to one of self-describing functions in the following list:
frab_negative()
frab_reciprocal()
frab_plus_frab()
frab_multiply_frab()
frab_plus_numeric()
frab_multiply_numeric()
frab_power_numeric()
numeric_power_frab()
The most important one is, of course, frab_plus_frab() which is the sine qua non for the whole package. But these functions are not intended for user and are somewhat unfriendly. Use the arithmetic operators, as in ‘a + 2*b’ instead.
Low-level helper functions c_frab_add() and c_frab_multiply() etc. are generated by compileAttributes(). They call the routines in the src directory. Low-level helper function c_frab_pmax() is documented here for consistency; but technically c_frab_pmax() is an Extremes function. They are documented at Compare and pmax respectively.
There are a few peculiarities in the methods. Function frab_plus_numeric(e1,e2) assumes e1 is a frab and e2 is numeric. But if e2 is a named vector, it is coerced to a frab; if not, a [simulated] list("disordR") violation is raised.