Object CubeRoot provides an extractor method for matching and decomposing expressions that represent cube root operations. This is specifically aimed at identifying instances of NthRoot where the root value is 3.
Extractor method used to match an NthRoot expression with a radicand and a root value of 3, identifying cube roots specifically. This method also extracts the branch value of the NthRoot.
Extractor method used to match an NthRoot expression with a radicand and a root value of 3, identifying cube roots specifically. This method also extracts the branch value of the NthRoot.
Value parameters
expr
the input Expression to be matched and decomposed
Attributes
Returns
an Option containing a tuple of the radicand (of type Eager) and the branch (an Int) if the input is a valid NthRoot with a root value of 3; otherwise, None