code: def function_application(func):
      
      if func not in NUMEXPR_MATH_FUNCS:
          raise ValueError("Unsupported mathematical function '%s'" % func)
  
      @with_doc(func)
      @with_name(func)
      def mathfunc(self):
          if isinstance(self, NumericalExpression):
              return NumExprFactor(
                  "{func}({expr})".format(func=func, expr=self._expr),
                  self.inputs,
                  dtype=float64_dtype,
              )
          else:
              return NumExprFactor(
                  "{func}(x_0)".format(func=func),
                  (self,),
                  dtype=float64_dtype,
              )
      return mathfunc
docs: Factory function for producing function application methods for Factor
      subclasses.