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

learn more… | top users | synonyms

5
votes
1answer
111 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 ...
4
votes
1answer
199 views

Mathematica's morphological thinning algorithm

Could anyone cite some papers that describe Mathematica's morphological thinning algorithm?
5
votes
1answer
87 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 ...
3
votes
1answer
307 views

What method does NIntegrate use by default?

There is a variety of algorithms for performing numerical integration (See wiki). What method does NIntegrate use by default? I looked at the documentation page ...
1
vote
0answers
34 views

Where can I find documentation on the methods/algorithm used in FindGraphPartition in Mathematica 10?

I am working on a graph theoretical project where it would be helpful to know the name of the algorithm used in FindGraphPartition. Question: Where can I find ...
1
vote
2answers
123 views

NIntegrate evaluates its 1st argument while it has the attribute HoldAll?

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
11
votes
2answers
119 views

Why NIntegrate is badly-behaved on $J_{\frac{9}{2}}(x)$ by default?

A friend of mine showed me this example: Plot[BesselJ[9/2, x], {x, 0, 1}, PlotLabel -> Style["The integrand seems to be simple", 14]] ...
0
votes
0answers
38 views

What is the default method used by NSolve

I have a system of 6 polynomial equations of the form aijk xi xj + bik xi = ck (k=1,2,...,6; summation convention on i & j) I am using NSolve[{eq1,eq2,...,eq6},{x1,x2,...,x6},Reals] What ...
4
votes
1answer
68 views

Classifying text and number features

I am new to the ML algorithms and I am checking the Classify function of Mathematica. I understand the math for the random forest algorithm, but I have a question ...
5
votes
1answer
74 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 ...
2
votes
1answer
32 views

What is the default `SignificanceTest` setting for `FindClusters` with `Optimize` method?

According to the documentation, the default value of FindCluster's Method option is Optimize....
0
votes
0answers
50 views

Can parallelization speed up FindClusters?

I have a clustering task that would take FindClusters 2-3 months1 to complete. Can this calculation be sped up with parallelization? (FWIW, the data to be ...
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
1answer
250 views

GroebnerBasis without specifying variables

All the examples in the Mathematica documentation specify that the syntax for the GroebnerBasis command is ...
0
votes
0answers
47 views

min and max in Ticks determination

I wonder, how Mathematica determines the values that it sends to custom tick functions, ie. the minimum and the maximum on the axes? Here is an example: ...
2
votes
0answers
91 views

How does Mathematica compute the determinant of a matrix? [closed]

I have been trying to write efficient code for calculating the matrix determinant for some time now. I noticed last night that Mathematica is able to compute the determinant of a $200 \times 200$ ...
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 ...
3
votes
0answers
92 views

FrobeniusSolve: how does it work?

Can someone suggest any reference to read? I would like to understand how the algorithm works.
3
votes
0answers
30 views

Where do DistributeDefinitions and ParallelNeeds put their definitions for newly-launched kernels to find

I'm sorry to keep banging on the definition distribution bell, but here is another (hopefully well-focused enough) question on that vein. If one is trying to distribute the definitions in a package ...
19
votes
2answers
565 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 ...
2
votes
0answers
78 views

How can I access the Criterion function of KI method in `FindThreshold` for a dataset?

I want to find a threshold for some data set, using Kittler-Illingworth minimum error thresholding method (KI method). To do so, I use the Mathematica built-in function ...
34
votes
3answers
822 views

What is behind experimental function: FindFormula?

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

The theory/algorithm knowledge behind the built-in Discretize* and Boundary*

The ComputationalGeometry package was built-in in V10 distribution. In classical computational geometry field, the following questions were investigated. Convex ...
1
vote
0answers
74 views

Meaning of the character sequence after an Entity's name

Mathematica can interpret an entity when you type Ctrl+=, like this: Then we'll get an entity We can get the InputForm You will get a canonical name ...
10
votes
2answers
155 views
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 ...
3
votes
1answer
90 views

What kind of preprocessing does Mathematica do when I use EdgeDetect on an image?

I am doing my own implementation of Canny and Sobel in another language (not in Mathematica). I was testing the EdgeDetect method (Sobel and Canny), and my own, and ...
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 ...
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 ...
1
vote
2answers
795 views

How does ListPlot3D interpolate data?

I have data of the form {{x1, y1, f(x1, y1}, {x2, y2, f(x2, y2)}, ...}. I need to interpolate the data to get an interpolated ...
45
votes
2answers
1k 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, SubValues,...
2
votes
0answers
61 views

Algorithm used by Fit[]

Does anyone know what algorithm Mathematica's basic Fit[] function uses? Is it proprietary? I'm trying to do some pretty basic, linear, polynomial data fitting (...
7
votes
1answer
93 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 ...
3
votes
0answers
69 views

What CPU instruction set extensions does Mathematica support?

Most CPUs in desktops and laptops nowadays are backwards compatible with the x86-64 instruction sets. But newer CPUs also have additional instruction set extensions like AVX 2, FMA3, and BMI/BMI2 ...
2
votes
1answer
72 views

What is the encoding used when exporting images as MOV with “VideoEncoding” -> “MPEG-4 Video”?

I have a few rasterised images generated in Mathematica, and I want to output them in a video file, ideally using H.264 encoding. I found the following command. ...
23
votes
2answers
554 views

Symbolic derivatives are being calculated numerically

Just found the following while debugging a problem. Mathematica is calculating the derivative of IntegerPart[x] in some odd way: ...
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?
10
votes
1answer
202 views

How does Mathematica calculate $\sin(\pi/5)$?

Consider: Sin[Pi/5] which returns: $$\sqrt{\frac58-\frac{\sqrt5}{8}}$$ Does anyone know how to figure out the trigonometric identities used by Mathematica to ...
4
votes
1answer
92 views

What is the default ColorFunction for MatrixPlot?

I think the the default ColorFunction for ArrayPlot is ColorNegate[RGBColor[{#, #, #}]] &...
13
votes
1answer
224 views

What governs images resizing in the FrontEnd environment

What is responsible for the middle Row images' size? And why single image row is different? ...
17
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.
2
votes
1answer
74 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 ...
17
votes
2answers
319 views

What algorithm do the Compress and Uncompress functions use?

Compress and Uncompress are used internally by Mathematica to compress things like 3D data in notebook files - data that I'd like to read independently. Does anyone have any idea if the compression ...
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
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
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, ...
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 ...
16
votes
1answer
2k 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 ...
1
vote
1answer
113 views

How to show steps of Integrate[Exp[-(I*(s*t))]/(Sqrt[2*Pi]*Sqrt[s]), {s, 0, Infinity}]? [duplicate]

I am trying to use Wolfram Alpha in Mathematica 10.2 to show me the steps for calculating the integral in the title, i.e I have written the following command: show steps of ...
3
votes
1answer
111 views

How does Matematica compute the CDF of the binomial distribution?

I want to know, how Mathematica actually implements the cumulative distribution function of the binomial distribution. Which algorithm does Mathematica use to compute ...