function _removeFractions (thing) {
    if (isFraction(thing)) {
      return thing.valueOf()
    }
    if (thing instanceof Array) {
      return thing.map(_removeFractions)
    }
    if (isMatrix(thing)) {
      return matrix(_removeFractions(thing.valueOf()))
    }
    return thing
  }
simplifyConstant() takes a mathjs expression (either a Node representing
a parse tree or a string which it parses to produce a node), and replaces
any subexpression of it consisting entirely of constants with the computed
value of that subexpression.

Syntax:

    math.simplifyConstant(expr)
    math.simplifyConstant(expr, options)

Examples:

    math.simplifyConstant('x + 4*3/6')  // Node "x + 2"
    math.simplifyConstant('z cos(0)')   // Node "z 1"
    math.simplifyConstant('(5.2 + 1.08)t', {exactFractions: false})  // Node "6.28 t"

See also:

    simplify, simplifyCore, resolve, derivative

@param {Node | string} node
    The expression to be simplified
@param {Object} options
    Simplification options, as per simplify()
@return {Node} Returns expression with constant subexpressions evaluated