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

learn more… | top users | synonyms

9
votes
0answers
699 views

Does Mathematica use the Elliptic Curve Method (ECM) in FactorInteger[]?

I'm not a mathematician, and I'm not even going to pretend that I understand anything of the ECM. But I know it can be a fast method for factorization. I benchmarked the factorization of $$...
8
votes
1answer
301 views

Show how Mathematica defines a function

Is there a way to show how Mathematica defines a function, such as In: Something[Sqrt], Out: Sqrt[x] -> x^(1/2) As far as I understand it the command ...
8
votes
1answer
155 views

What values of $\delta$ and $\eta$ are being used in LatticeReduce?

The Lenstra–Lenstra–Lovász algorithm has a parameter $\delta$ with $1/4 < \delta < 1$, where roughly speaking the closer $\delta$ is to 1 the longer it takes, but the better basis reduction you ...
8
votes
1answer
127 views

Accuracy of PrimeQ function

Using PrimeQ in Mathematica 10 on integers up to $2\cdot 10^{5717}$ the function appears to work. The Documentation for Mathematica 5 says that ...
8
votes
1answer
926 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 ...
7
votes
2answers
175 views

Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
7
votes
2answers
293 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 ...
7
votes
1answer
346 views

What algorithm is Mathematica 9 using for “SpectralEmbedding” of graphs?

When I specify that a graph should be realized using the "SpectralEmbedding" procedure, what paper / algorithm for spectral embedding is this based on? I was unable to find any documentation for this....
7
votes
1answer
250 views

GroebnerBasis without specifying variables

All the examples in the Mathematica documentation specify that the syntax for the GroebnerBasis command is ...
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 ...
7
votes
2answers
297 views

What is the underlying algorithm for GroupElementToWord?

What algorithm is Mathematica 9 using for GroupElementToWord[group, g]?
7
votes
1answer
716 views

How does Mathematica's LowpassFilter work?

I don't really understand the documentation for the LowpassFilter[] function in Mathematica. In the course I have about signal processing, low-pass filters come in ...
7
votes
1answer
91 views

Is the Method -> Automatic option for Classify not deterministic?

I just prepared an (well known) example in machine learning, the weather dependent determination of whether to play golf or not, as shown in this picture (of a corresponding Dataset) Now I set up ...
7
votes
0answers
145 views

How does Mathematica resolve symbolic systems of inequalities? [closed]

Before getting into my question, let me provide some context: I recently started using Mathematica to automatically perform stability analyses that I previously did by hand. A major part of the ...
7
votes
0answers
172 views

Finding hidden treasure (aka finding undocumented functions) [duplicate]

I was searching for a way to determine if a point is within a polygon and stumbled upon rm -rf's answer. (actually, I really wanted to find a point within a ...
6
votes
9answers
946 views

Find the smallest positive integer that satisfies a certain condition

I know Mathematica is really powerful when it comes to functional operations like applying a list of tasks to a list of variables. Sometimes I feel like it isn't the most powerful tool when it comes ...
6
votes
2answers
192 views

How does Mathematica calculate LaguerreL

About the function LaguerreL[n,a,x], the helping documents in Mathematica only say that this function satisfies equation $xy^{\prime\prime}+(a+1-x)y^\prime+ny=0$. ...
6
votes
2answers
556 views

Any ideas on how GeneralMiniMaxApproximation is implemented?

GeneralMiniMaxApproximation is used to construct minimax approximations of parametrically defined functions. I am curious about how ...
6
votes
2answers
141 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 ...
6
votes
1answer
367 views

Algorithms behind implemented Mathematica functions [duplicate]

When I use Mathematica for analysis and I write a publication, readers often ask me: "What is the algorithm behind your calculation?". I answer that I did it with Mathematica and if they are ...
6
votes
1answer
230 views

Default algorithm in NonlinearModelFit

Does anyone know the default algorithm used in NonlinearModelFit? The documentation gives several possible algorithms, but I can't figure out what it uses if you do not specify the algorithm. Thanks.
6
votes
1answer
287 views

The default ColorFunction of DensityPlot before v10?

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

Actual bins used for Pearson Chi Square Test

PearsonChiSquareTest[data, dist] computes bins for data as a step towards calculating the test statistic. For continuous ...
6
votes
1answer
320 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 ...
6
votes
0answers
74 views

What is the underlying algorithm to simplify sums of reciprocals of polynomials?

Flipping through Wolfram's blog entry on Leibniz, W noted Huygens' interview test for the young Leibniz, namely to determine: $$ \sum_{n\ge2} \frac{1}{{n \choose 2}} $$ It's one thing to do this by ...
6
votes
0answers
85 views

Heliocentric coordinates in PlanetData

I tried to use planets' HeliocentricLongitude and I wonder if anyone has any insight on what coordinate system they use. I took vernal equinox times from http://ns1763.ca/equinox/eqindex.html and ...
6
votes
0answers
72 views

Functionality of FindMaximumFlow

I know that the superseeded function NetworkFlow (needs Combinatorica) uses Goldberg-Tarjan's Push-Relabel-Algorithm but i cant find any information on Mathematica's built-in-function (...
6
votes
0answers
114 views

Design considerations behind `O` (a.k.a. BigOh, a.k.a. Landau Order)

This works without any warnings: O[Log[x]]. This raises a warning: O[x^2]. I have a few questions around this: Why is it a ...
5
votes
3answers
297 views

How could I implement the equivalent of NextPrime

I would like to know what an implementation of the function NextPrime would look like if it were implemented in Mathematica's core language.
5
votes
2answers
1k views

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

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

BoxWhiskerChart Notched: how is the notch calculated?

I am aware of one convention for the uncertainty in a median: it is 1.58 * IQR / Sqrt[n], where IQR is the inter-quartile range and n is the number of data points. This was proposed by McGill, Tukey, ...
5
votes
1answer
268 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 ...
5
votes
1answer
86 views

How does ListInterpolation work?

ListInterpolation takes an array of data and interpolates between the entries. Let us interpolate between the elements of the identity matrix. For reference, this ...
5
votes
2answers
171 views

Why this upvalue doesn't escape from Sum?

Probably a hard question, but I decide to cry out loud :). This is actually another problem I encountered when answering this question. Consider the following transform rule stored as an upvalue: <...
5
votes
1answer
174 views

References on functions FindGraphPartition and FindGraphCommunties

Does somebody have some interesting references on the FindGraphPartition and FindGraphCommunties[.., Method -> "Spectral"] ...
5
votes
1answer
73 views

Are the triangles in DelaunayMesh oriented ccw?

MeshCells[R, 2] returns the triangles from R=DelaunayMesh[pts], where pts is a list of 2D ...
5
votes
1answer
110 views

The implementation of FunctionRange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of ...
5
votes
0answers
53 views

How many clusters does DominantColors return?

Is there any documentation on how it automatically chooses the number of colors - does it use X-means or some other heuristic to determine the number of clusters it automatically returns?
5
votes
0answers
71 views

How does Plus work on machine precision Real arguments?

I thought Kahan's summation method would make a nice example for students to use to think about round-off error [W. Kahan, Pracniques: Further Remarks on Reducing Truncation Errors, Commun. ACM 8  (...
5
votes
0answers
168 views

Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
4
votes
1answer
195 views

Mathematica's morphological thinning algorithm

Could anyone cite some papers that describe Mathematica's morphological thinning algorithm?
4
votes
2answers
245 views

What does MinimalPolynomial do?

suppose $x^5-x-1=0$, $y^7-y-1=0$ and $z=x+y$. I want to find a minimal polynomial expression of $z$, such that $p(z)=0$, and the code can be written like this: ...
4
votes
3answers
172 views

Pick bug? level 0 matching

A previous discussion of this issue (Is there a bug in Pick?) accepted that matching at level 0 is not a bug in Pick. Was that correct? I am not yet persuaded. ...
4
votes
2answers
355 views

Implementation of builtin function Fold

In the documentation for fold, it says Fold[f,x,list] gives the last element of FoldList[f,x,list]. But this is surely not the way it is implemented, right? ...
4
votes
1answer
606 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 ...
4
votes
1answer
144 views

What is the formula Mathematica uses for ZetaZero?

What is the formula/algorithm Mathematica uses for the ZetaZero command?
4
votes
1answer
491 views

Use of Strassen's algorithm

Strassen's algorithm is an algorithm for matrix multiplication that is asymptotically faster than the naive one. In practice, the matrices involved have to be quite large before Strassen's algorithm ...
4
votes
1answer
149 views

The algorithm of ListGraphs[n,m]

I'm not sure if this is a Mathematica problem, math problem or a CS problem, so if this is off-topic please transfer it. In the package Combinatorica there is a ...
4
votes
1answer
527 views

How does Mathematica calculate the nth prime?

When I enter Prime[2000000000000], the two-trillionth prime, Mathematica gives 61427839512211 for the answer after several ...
4
votes
1answer
91 views

What is the default ColorFunction for MatrixPlot?

I think the the default ColorFunction for ArrayPlot is ColorNegate[RGBColor[{#, #, #}]] &...