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

learn more… | top users | synonyms

8
votes
3answers
471 views

The default bandwidth of the SmoothKernelDistribution function

I am researching the Silverman rule of thumb for bandwidth selection. Below is a sample of my code, from which it seems that BW=63 is close to the default parameter given by Mathematica (2 images are ...
4
votes
1answer
383 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 ...
4
votes
1answer
326 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
2answers
413 views

Any ideas on how GeneralMiniMaxApproximation is implemented?

GeneralMiniMaxApproximation is used to construct minimax approximations of parametrically defined functions. I am curious about how ...
2
votes
1answer
145 views

Implementation of Decompose

I'm curious as to how Decompose works so I decided to use Trace with the option ...
1
vote
0answers
80 views

What algorithm is Mathematica using for FirstPassageTimeDistribution[]?

What algorithm is Mathematica 9 using for FirstPassageTimeDistribution[]? Is it attempting to use PseudoInverse[] on the ...
2
votes
1answer
212 views

How does FindShortestTour work?

How are FindShortestTour and the algorithms therewithin implemented internally? Also: Can I access some form of incremental, in-progress result during evaluation? ...
7
votes
0answers
111 views

Apart may use Padé method: what's that?

How does Apart work? The page tutorial/SomeNotesOnInternalImplementation#7441 says, "Apart ...
6
votes
0answers
109 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 ...
22
votes
3answers
363 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 ...
6
votes
1answer
243 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 ...
5
votes
3answers
230 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.
14
votes
2answers
432 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: ...
27
votes
0answers
627 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 ...
20
votes
2answers
609 views

How to retrieve the parameters calculated and used by ImageAdjust?

When ImageAdjust is called with an image, i.e. with one parameter, it returns an automatically adjusted Image. I would like to ...
9
votes
1answer
156 views

Algorithm used by IsomorphicGraphQ

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

PowersRepresentations Algorithm

I'm trying to understand the mathematics behind counting the number of representations of a positive integer by $n$ distinct $k$th powers, i.e. I would really like to know how to do the Mathematica ...
8
votes
0answers
528 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 ...
6
votes
1answer
102 views
6
votes
1answer
501 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 ...
10
votes
1answer
266 views

Why doesn't Mathematica pack Boolean arrays?

I've been wondering about this for a while now, so I'm going to ask. This is a question about the design of Mathematica, which perhaps cannot be directly answered by anyone but the designers, however ...
4
votes
2answers
304 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? ...
3
votes
2answers
203 views

How does RootOfUnityQ work?

How does Mathematica's RootOfUnityQ function work? That is, how does Mathematica know if a number is a root of unity? Example: Let $x = \frac{1-i \sqrt{2+\sqrt{5}}}{1+i \sqrt{2+\sqrt{5}}}$. Then ...
3
votes
2answers
206 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: ...
16
votes
1answer
385 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 ...
12
votes
1answer
1k 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 ...
26
votes
1answer
574 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 ...
5
votes
1answer
236 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 ...
8
votes
1answer
287 views

How to check for Mathematica’s definition of XY?

The question is: Can I ask the Mathematica kernel directly what it takes as the definition of the built-in symbol XY? After all this has to be in the kernel. And if the documentation is not giving any ...