Questions tagged [implementation-details]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Complex Airy function implementation in Mathematica?

Which algorithm does Mathematica use for double-precision N[*,16] computation of the AiryAi and AiryAiPrime functions? Are there any references? Any TOMS number or libraries?
user avatar
0 votes
0 answers
40 views

Choice of initial values for FindMinimum

I have been using the FindMinimum function in Mathematica to implement nonlinear regression (for function $f(x,y)$, say). I am curious to find how the starting ...
user avatar
6 votes
1 answer
94 views

Are derivatives from interpolating functions created by NDSolve using derivatives of the spline or numerics from solving DE

For example given the code: ...
user avatar
  • 697
2 votes
0 answers
77 views

Theory behind CountRoots

According to this page, one can compute the number of zeros of a meromorphic function over an interval in Mathematica. I am working with univariate functions of x, which are meromorphic elementary ...
user avatar
5 votes
1 answer
191 views

Is K is a function? [duplicate]

Some of the capitalized single letters are functions. Starting a fresh kernel and typing in the 24 capital letters, the following letters turn black since they are special functions, ...
user avatar
  • 1,957
5 votes
1 answer
149 views

How does FindRoot decide if a solution has converged?

I am solving a 1D non-linear differential equation using the finite element method with NDSolve. From the documentation I understand that the equation is discretized and then solved with FindRoot, I ...
user avatar
  • 117
9 votes
1 answer
564 views

Mathematica internal source code for a numerical method

I read this (Six Reasons Why the Wolfram Language Is (Like) Open Source), which inspired me to re-investigate Mathematica's implementation of some numerical methods. I would like to see the code that ...
user avatar
1 vote
0 answers
108 views

How is MatrixPower computed?

How does Mathematica compute MatrixPower[m,n]? The documentation states it is equivalent to Dot @@ ConstantArray[m, {n}], but ...
user avatar
  • 1,705
6 votes
1 answer
211 views

Why does NMinimize using NelderMead without PostProcessing always stop at the nearest decade of iterations, e.g. 100, 110, 120

Why does NMinimize using NelderMead without PostProcessing always stop at the nearest decade of iterations, e.g. 100, 110, 120... Perhaps Catch Throw can prevent this e.g., see this answer, but that ...
user avatar
  • 639
4 votes
2 answers
152 views

RandomReal vs Random[Real

Let's say I need random numbers with increasing precision to simulate a particular function, so I try: ...
user avatar
  • 16.2k
2 votes
1 answer
54 views

My construction of additive compound matrices doesn't work sometimes; why?

Using the multiplicative compound matrix --see definition at Are compound matrices implemented in mathematica? one may define also additive compound matrices ...
user avatar
  • 906
3 votes
1 answer
80 views

Construction of an additive compound matrix

I want to construct an additive compound matrix which has the following form as output : ...
user avatar
1 vote
0 answers
63 views

Can LinearOptimization (ex. LinearProgramming) support other methods (Ellipsoid method)?

Can LinearOptimization (ex. LinearProgramming) support methods other than "InteriorPoint", "Simplex", "RevisedSimplex"? Specifically, I need the Ellipsoid Method. Are ...
user avatar
  • 622
1 vote
0 answers
110 views

Spelunking yields <<kernel function>> [closed]

This is in the spirit of the old but excellent thread: What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools) Using ...
user avatar
  • 313
2 votes
1 answer
121 views

How FunctionConvexity is implemented in Wolfram Mathematica?

I am wondering how FunctionConvexity was implemented in Wolfram Mathematica. I am trying to prove the convexity of the function $A(v)$: $$ A(v) = -\dfrac{k-1}{\...
user avatar
  • 57
2 votes
1 answer
153 views

How is this asymptotic expansion of an integral calculated?

I am strongly impressed by this example from New in 13 as = AsymptoticIntegrate[ (t^10 + 3) Exp[I λ (t^5 + t + 1)], {t, -2, 2}, {λ, Infinity, 2} ] <...
user avatar
  • 17.4k
7 votes
1 answer
196 views

Exactly recreating image NetEncoder output

I need to run an exported NetChain in ONNX, surprisingly the model exports and runs successfully, but there's a discrepancy in the image loading stage (the NetEncoder'ing that must be written manually)...
user avatar
  • 3,711
1 vote
0 answers
79 views

How does Mathematica numerically evaluate Gaussian Hypergeometric function $_2F_1(a,b,c,z)$ where $a,b,c \in \mathbb{C}$ [closed]

Gaussian hypergeometric function $_2F_1(a,b,c,z)$ usually takes $a,b,c \in \mathbb{R}$ and $z \in \mathbb{C}$. But using Barnes integral representation, one can analytically continue the $_2F_1(a,b,c,...
user avatar
4 votes
1 answer
54 views

`NetNestOperator` with custom input / output ports

I'd like to use NetNestOperator on a NetGraph that has custom input / output port names, such as ...
user avatar
1 vote
0 answers
41 views

How is the Riemann-Siegel Z function evaluated in Mathematica?

How is the Riemann-Siegel Z function evaluated in Mathematica? Is it calculated using the first so many terms of its power series or by other means?
user avatar
  • 285
4 votes
2 answers
413 views

How does mathematica numerically evaluate the Meijer G-function?

The Meijer G-function is defined as a contour integral in the complex plane. Mathematica is able to numerically evaluate such a function quickly and accurately. How does she do that?
user avatar
4 votes
0 answers
49 views

What are the valid options for the "ParametricCaching" option in ParametricNDSolve?

I am using ParametricNDSolve as part of the calculation of an objective function for an optimization, so I am trying to strike a balance between memory usage and ...
user avatar
2 votes
2 answers
133 views

How does Plot choose the points in a figure?

Taking a simple example, ...
user avatar
  • 491
1 vote
0 answers
152 views

Is anyone aware of Mathematica implementation of OpenAI's GPT-3 API?

Is anyone aware of Mathematica's implementation of OpenAI's GPT-3 API?
user avatar
  • 361
18 votes
2 answers
1k views

How do the functions Reap and Sow actually work behind the scenes?

I have read that using Reap and Sow to generate a list of unknown length is much more efficient than using AppendTo over and over. I believe AppendTo works by creating a new list that is one element ...
user avatar
  • 333
1 vote
1 answer
69 views

AsymptoticOutputTracker to Matlab-Simulink

What is the structural scheme for AsymptoticOutputTracker in Mathematica? I need this in order to transfer the feedback signals received with the help of ...
user avatar
  • 1,721
10 votes
3 answers
275 views

Why does ReliefPlot not have a version for functions?

TL, DR: Use the LightingAngle option to DensityPlot to achieve the same shadows effect as ...
user avatar
  • 658
6 votes
1 answer
119 views

GroebnerBasis internals and runtime dependence on variable list ordering

I have a problem I have reduced to asking for a Gröbner basis. For some reason, Mathematica is able to solve this in minutes, while other programs more dedicated to these types of calculations run for ...
user avatar
9 votes
1 answer
167 views

Automatic Method for FindMinimum with constraints

What is the default method used by FindMinimum with constraints? The documentation says: "Currently, the only method available for constrained optimization is ...
user avatar
  • 93
4 votes
0 answers
139 views

NMinimize differential evolution: how do search points and initial points really work?

I am puzzled by the settings of a specific method for NMinimize called DifferentialEvolution, given for example here. The ...
user avatar
  • 1,491
3 votes
0 answers
74 views

Algorithm used by Mathematica for evaluating partial sums

Today, while using mathematica, I entered the command Sum[1/Factorial[n], {n, 0, x}] and found that: $$\sum_{x\geq n\geq0}\frac{1}{n!}=\frac{e\Gamma(x+1,1)}{\Gamma(...
user avatar
3 votes
0 answers
115 views

Is there any way to change the box-formatting behavior thoroughly?

Background The box-formmating behavior is affected by the downvalues of the symbol MakeBoxes. But the formatting behavior is not exactly ...
user avatar
  • 563
4 votes
1 answer
238 views

Implementation of quantum Uhlmann Fidelity in Mathematica

I want to implement the quantum Uhlmann fidelity $$F(\rho, \sigma) := \mathrm{tr} \left[\sqrt{\sqrt{\rho} \sigma \sqrt{\rho}} \right]^2.$$ in Mathematica as a measure of "closeness" between ...
user avatar
  • 191
6 votes
1 answer
128 views

Why Does Subsets[...,{n}] not Output a Packed List, Even Though it Doesn't Unpack?

Assume list is packed. I expect Subsets[] is a structural operation because it depends on the number of elements, not on what ...
user avatar
2 votes
0 answers
43 views

How algebraic (or more general) expression is represented (memory level, data structure) in Mathematica?

This is not a question about the usage of Mathematica, it is more about implementation. Mathematica is a very huge system, it can provide a series of very advanced operation against a Mathematica ...
user avatar
8 votes
3 answers
397 views

How is Grad defined for array particularly in non-Cartesian coordinates?

This question can be viewed as a follow-up of What is the definition of Curl in Mathematica? First argument of Grad can be an array, but what definition does ...
user avatar
  • 52.9k
7 votes
1 answer
363 views

Which methods are available for NDEigensystem?

I am trying to find out what methods/options are available for NDEigensystem and descriptions of their use. Perusing the help, online Q&As, Mathematica's in-...
user avatar
  • 7,299
1 vote
0 answers
51 views

How does Mathematica determine if a multivariate polynomial is absolutely irreducibile?

I am working with a collection of multivariate polynomials over Q in 5 or more indeterminates, all of which are irreducible over Q. However, after testing their absolute irreducibility via ...
user avatar
4 votes
1 answer
94 views

What algorithm(s) are used by MoleculeModify's GenerateConformers?

Starting with Mathematica 12, the MoleculeModify function has a "GenerateConformers" option. What is the algorithm used to ...
user avatar
5 votes
1 answer
135 views

Which algorithm does Mathematica use for FindClique?

Does anyone know which algorithms Mathematica use for computing FindClique[g] and FindClique[g,{n}] (finds a maximal clique ...
user avatar
0 votes
0 answers
81 views

How to get a method used by ParametricNDSolve?

How to get a method used by ParametricNDSolve for solving a problem? Specifically, a boundary value problem. The code looks like that: ...
user avatar
4 votes
1 answer
202 views

How do you create the Commonest function

How does the Commonest function work? How can I implement that functionality without using that command?
user avatar
8 votes
0 answers
97 views

What's the solver behind Method -> {“EquationSimplification” -> “MassMatrix”}

Related: What's behind Method -> {“EquationSimplification” -> “Residual”} By reading the document carefully, I've learnt that there are 3 possible options in "EquationSimplification" for DAE systems: ...
user avatar
  • 1,389
14 votes
2 answers
387 views

What's the principle behind the new MoleculeRecognize function?

I played a bit with the new MoleculeRecognize function implemented in the newly released WM 12.1: which simply recognizes a molecule in image and returns it as a Molecule object. ...
user avatar
  • 255
1 vote
0 answers
96 views

Pleasantly Dynamic Property of Around

It's a rare occurrence when an improper lexicon is mete with forgiveness when coding. However, I was pleasantly surprised to stumble across the fact that ...
user avatar
7 votes
2 answers
90 views

How to know what GraphLayout was used when Method set to Automatic

I was expecting to get the answer to the above by doing either of the following: ...
user avatar
  • 1,856
2 votes
1 answer
93 views

How to know what underlying algorithm mathematica function is using? [closed]

For example Blur, the documentation doesn't seem to tell what is the algorithm it is using (https://reference.wolfram.com/language/ref/Blur.html). Is there any ...
user avatar
  • 569
6 votes
1 answer
144 views

Algorithms used for DelaunayMesh

Is it possible to find what algorithms are used for Delanunay triangulations?
user avatar
5 votes
0 answers
108 views

Is there a way to get the decision trees used by machine learning methods like `RandomForest`?

I was looking at a tutorial of SimFin, a new German-based financial data provider. There is a nice example of machine learning using sklearn in python. The package ...
user avatar
  • 8,337
5 votes
0 answers
64 views

How Prime[n] is implemented and why is that bounded? [duplicate]

How is Prime[n] implemented in Mathematica? I have just observed that calculating large primes is quite fast (but not in O(1) ...
user avatar
  • 151

1
2 3 4 5
7