MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: decoding inbuilt function

  • To: mathgroup at
  • Subject: [mg121045] Re: decoding inbuilt function
  • From: Simon <simonjtyler at>
  • Date: Wed, 24 Aug 2011 07:51:10 -0400 (EDT)
  • Delivered-to:
  • References: <j2t9j7$m06$>
  • Reply-to: comp.soft-sys.math.mathematica at

Built-in Mathematica functions that are NOT compiled into the kernel can of ten be looked at by removing the ReadProtected attribute

ClearAttributes[fn, ReadProtected]
(* Protect[fn] *)
?? fn

But Limit is part of the kernel and so not accessible unless you have the source code (i.e. have an insider at WRI). That said, many of the algorithms in Mathematica are implementations and improvements of various public algorithms combined with a healthy mix of black magic heuristics.

I'm not at all knowledgeable in this area, but I believe that the main limit algorithm out there is the Gruntz algorithm. So provided Mathematica has various asymptotic information about any special functions in the expression, it can compute the limit.

An unnamed pure python based CAS implements the Gruntz algorithm, and you can see its description and source code at You can also find a link to Gruntz's thesis. Also see and other publications at

Other core parts of mathematica are similar.

For example, I remember hearing a few years ago (I think around v6) that many of Mathematica's special function integration routines are now based on MeijerG formulas (since most special functions can be written as MeijerG functions). This algorithm would be combined with other things such as some version of and a whole heap of heuristics and special cases.
There's an interesting GSoC2011 project (that is just finishing) to implement a MeijerG based integration algorithm in python, see This complements a GSoC2010 project to implement the Risch algorithm in python, see

  • Prev by Date: Re: Nested List Abs[]
  • Next by Date: Re: Nested List Abs[]
  • Previous by thread: Re: decoding inbuilt function
  • Next by thread: Re: decoding inbuilt function