For questions regarding the underlying implementation of built-in functions.

learn more… | top users | synonyms

66
votes
6answers
3k views

What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

Note: I put Simon's implementation on GitHub. Contributions welcome! When trying to read the definition of already defined (package or built-in) symbols using ...
41
votes
1answer
992 views

What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
43
votes
3answers
3k views

How to find out which method Mathematica selected?

There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
29
votes
2answers
1k views

How does Plot work?

I considered the following function: sin[x_] := Module[{}, Print["x=", x]; Sin[x] ] in Mathematica. Next, I tried to plot it using: ...
17
votes
2answers
490 views

Where can I get detailed information on how the Plot command works?

The command Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow produces this output. What I don't understand is what ...
9
votes
2answers
451 views

How to interpret the FullForm of a SparseArray?

SparseArrays are atomic objects, but they do have a FullForm which reveals information about them. What is the meaning of the ...
15
votes
1answer
2k views

How does Mathematica integrate?

Basically, this question can be considered to be an extenstion to my other question. What I wanted to do was this integral as homework (it is indefinite BTW so no approximations using Simpson's Rule ...
45
votes
2answers
987 views

How is pattern specificity decided?

Mathematica has a notion of pattern specificity, which is a partial ordering on patterns. The rules (e.g. DownValues, ...
29
votes
1answer
682 views

How are MemberQ and FreeQ so fast?

I would like to understand the implementation that allows MemberQ and FreeQ to be as fast as they are. I noticed this thanks to ...
23
votes
1answer
496 views

Why does list assignment with a packed array result in unpacked values?

Bug introduced in 5.2 or earlier and fixed in 10.1.0 This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be ...
21
votes
2answers
835 views

Blend code for built-in ColorData schemes

Hi I want to get a blend similar to "SunsetColors". To make those slight modifications, I would like to know the precise blend of that color scheme. My try: ...
7
votes
1answer
2k views

Methods for NonlinearModelFit

I am using NonlinearModelFit for a thesis project. I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
10
votes
1answer
940 views

How does Mma compute Confidence Intervals?

I am trying to understand how Mma computes the Confidence Intervals after a NonlinearModelFit. Consider the following example: ...
22
votes
2answers
502 views

How to implement FittedModel like objects

In the course of making some RLink wrappers I want to have some richer containers like Mathematica does with its FittedModel ...
20
votes
1answer
475 views

Underlying Algorithms for List Manipulation Functions

Does anyone know, or know of a link for the underlying algorithms used for list manipulation functions? Specifically: Union with and without the ...
15
votes
2answers
484 views

Why does iterating Prime in reverse order require much more time?

Say I would like to display the $10$ greatest primes that are less than $10^5$. I could do the following: ...
9
votes
1answer
386 views

How to know the internal algorithms of functions like Predict or Classify?

The document centre seems only explain how to use these functions, but just in an very brief way. I know Mathmatica is not open source, so we can not expect to see the code of the function, but are ...
14
votes
1answer
2k views

What method does NDSolve use for solving PDEs?

What is NDSolve's mode of operation? I use it to solve partial differential equations and never gave it too much thought. Recently, I came across this question. ...
12
votes
1answer
343 views

What is the default ColorFunction for Image3D?

What is the default ColorFunction for Image3D? I find it a bit confusing that the most intense colour is not shown where the ...
6
votes
1answer
287 views

Citation of the algorithms used in FindGraphCommunities

For my research work I need to put a comparison of different community detection algorithms. Instead of implementing all those algorithms once again, I would like to use the methods already provided ...
2
votes
0answers
98 views

What are the limits of the Prime-functions? [duplicate]

Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits for these funtions? ...
34
votes
2answers
5k views

How does Interpolation really work?

I'm looking for some explanation or advice, not help in solving something. Recently I finished my program and my supervisor said "Ok, now it's time for your first paper: write a scientific text about ...
28
votes
2answers
626 views

What is behind Mathematica's experimental `FindFormula` function?

In version 10.2 there is a new experimental function: FindFormula. I suspect that a genetic programming algorithm (symbolic regression) is behind this new feature ...
12
votes
2answers
787 views

How does Mathematica determine that an evaluation should be terminated?

How exactly does Mathematica determine that evaluation of particular expression should be finished and the result should be returned? Here are some examples of unclear behavior which have arisen, ...
15
votes
1answer
183 views

Why does't SeedRandom work here?

From the docs on SeedRandom, SeedRandom[] resets the generator, using as a seed the time of day and certain attributes of ...
19
votes
1answer
617 views

How to determine BLAS/LAPACK implementation used internally for numerical matrix operations?

Is there a command which reveals which implementation of BLAS and LAPACK are used in Mathematica's matrix operations such as Eigensystem? I asked a related question ...
16
votes
1answer
444 views

What does “suitable for symbolic manipulation” in the documentation mean?

This question is related to this other one I posted on Stack Overflow some time ago. There, in a beautiful answer, acl (with some unhumble editing done by me) showed that the derivative of ...
14
votes
1answer
438 views

What is the real default CellEvaluationFunction?

The default CellEvaluationFunction is Identity but one can quickly see that this is handled specially as an equivalent function, ...
10
votes
1answer
324 views

How does LocationTest choose its “AutomaticTest”?

Is there a way of determining how LocationTest chooses its "AutomaticTest"? Sometimes it's clear from the ...
7
votes
1answer
792 views

The difference between “SymbolicProcessing” -> 0 and restricting the function definition to numeric values only

The Documentation tells us that there are two ways to disable symbolic processing of the integrand by the NIntegrate function when it is known that it just slows ...
22
votes
3answers
411 views

Efficiently appending points to a NearestFunction

I have a program which works with a list of points (in 3D, but it could be in 1D as well, it won't make a difference). Within a loop, it keeps adding new points to the list. To calculate the ...
14
votes
1answer
2k views

How was Mathematica built?

I've been wondering this for a while now: How was Mathematica built? Is it written in Haskell? C++? I'd love to get a taste of the wizardry behind this incredible software.
14
votes
1answer
1k views

What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
3
votes
0answers
78 views

How does Mathematica automatically choose which classifier method to use?

I'm interested in what heuristics are used in Classify's choice of method.
30
votes
1answer
780 views

What calendar is Mathematica using for dates in the distant past?

It appears that Mathematica treats all dates as proleptic Gregorian dates by default, a hypothesis that can be easily tested by using AbsoluteTime to compute the ...
5
votes
2answers
897 views

what is The Formula behind the Kolmogorov-Smirnov test statistics?

I calculate the Kolmogrov-samirnov test statistic for the following data: ...
10
votes
1answer
183 views

Algorithm used by IsomorphicGraphQ

I'd like to know which algorithm is used to test if two graphs are isomorphic?
7
votes
2answers
284 views

Get name of hidden inbuilt functions (like Ticks drawing)

how do I get the name and definition of a builtin Mathematica functions? For instance, I would like to see how default Tick plotting function is implemented. However, it is not clear where it is and ...
6
votes
2answers
137 views

Algorithm in RandomChoice[{w1,w2,…}->{e1,e2,…},n]?

I wonder if someone happens to know the actual algorithm implemented in the particular overload of RandomChoice that handles explicitly presented discrete ...
5
votes
1answer
228 views

The default ColorFunction of DensityPlot before v10?

The default ColorFunction of Plot, Plot3D before v10 is respectively mentioned here and ...
5
votes
1answer
256 views

Can we know the background code associated with basic mathematica functions

I wanted to know how computers calculate basic functions like Sqrt so first I checked how humans do it I found that they use something called "Newton's method" that ...
4
votes
0answers
139 views

Given two samples, how does LocationTest select its AutomaticTest?

How does LocationTest select its "AutomaticTest" when testing two samples? Background: A previous post poses a similar question ...
8
votes
1answer
247 views

Possible Method for MatrixExp

Well, probably a hard question, but I think it's better to cry out loud :). I noticed that MatrixExp owns Method option when ...
4
votes
1answer
153 views

References on functions FindGraphPartition and FindGraphCommunties

Does somebody have some interesting references on the FindGraphPartition and FindGraphCommunties[.., Method -> "Spectral"] ...
3
votes
0answers
124 views

PlotRange->Automatic the exact function used to calculate outliers

I know that PlotRange->Automatic does the following: "the distribution of coordinate values is found, and any points sufficiently far out in the distribution ...
3
votes
1answer
522 views

What algorithms does NSolve use?

I've been using NSolve to find roots and now I've been wondering what underlying algorithm Mathematica uses. It's probabaly similiar to ...
2
votes
1answer
62 views

Is there a method to look inside at the internal code of Built-In functions? [duplicate]

How can I look at the code of built-in functions? Is there something like this: LookInsideFunction[SubsetQ] RETURNS ...
2
votes
2answers
154 views

Derivative of Vectoral NDSolve Interpolated Function / Rule Solutions,/., and Vector NDSolve [duplicate]

I need to find the instantaneous phase and instantaneous frequency for a rotating system. I am having difficulty making the math work with interpolating functions. First, here is a problem without ...
0
votes
1answer
122 views

Mathematica Lattice Reduce Command

I'm going through a very old copy of "Mathematica: A System for Doing Mathematics by Computer" for self practice. I'm on chapter 3, and ran into the LatticeReduce ...