Skip to main content

Questions tagged [implementation-details]

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

Filter by
Sorted by
Tagged with
8 votes
1 answer
150 views

Why does Together speed up RowReduce?

Try the following code ...
lapcal's user avatar
  • 689
3 votes
3 answers
162 views

FindInstance and Integers option

I am looking for integer solutions of $$a^3 + b + 1 = (b^2 - c^2)^2$$ Some solutions are $$(a, b, c) = (6,8,7); (46,7,19);(665, 8575, 8584)$$ I tried this with the FindInstance command as ...
Moo's user avatar
  • 3,462
8 votes
2 answers
429 views

Boundary condition for heat equation in polar coordinates deduced with L'Hôpital's rule fails for method of lines, but works well for FDM

Update I manage to find a way that resolves the problem. I'd like not to make this solution public for the moment so other answerers will have more chance to get the bounty. Here's a hint: it's a ...
xzczd's user avatar
  • 68.4k
2 votes
1 answer
77 views

How is the reference line in QuantilePlot defined?

We know that, when using QuantilePlot to visualize data, a reference line will be added by default. For example the red line below: ...
xzczd's user avatar
  • 68.4k
7 votes
1 answer
149 views

Orientation of 1st order 2D boundary mesh is counter-clockwise but 2nd order one is clockwise, any deep reason?

Consider this toy example: ...
xzczd's user avatar
  • 68.4k
0 votes
0 answers
41 views

The "StandardGaussian" bandwidth selection method in the SmoothKernelDistribution function

I have a list of points which follow the Gaussian distribution: ...
J. W's user avatar
  • 71
1 vote
1 answer
109 views

On `ContinuedFraction`

The code p = Integrate[E^-x^2, {x, 0, 1}] p // ContinuedFraction produces Does this mean that (i) Mathematica knows that a terminating or periodic continued ...
Iosif Pinelis's user avatar
5 votes
1 answer
156 views

Understanding NDSolve's implementation of the method of lines

In order to better understand the MethodOfLines flag, I tried comparing the results of NDSolve for a driven heat equation with a ...
phonon's user avatar
  • 205
1 vote
1 answer
134 views

A request on the kernel of the function ”SpheroidalEigenvalue“ in Mathemitica 11

I want to understand the algorithm of the function "SpheroidalEigenvlaue" in Mathematica 11, especially the code of the following command. Then I will try to use this algorithm to reproduce ...
Robert Xu's user avatar
0 votes
0 answers
117 views

How is the analytical continuation for the HurwitzZeta function implemented?

Following up on this question, I am trying to understand the implementation details of the HurwitzZeta[x,y] function in Mathematica, particularly when the first ...
stefan_chem's user avatar
3 votes
1 answer
154 views

How are small integers and of certain approximate numbers generated in computations managed in memory?

In the documentation tutorial/SomeNotesOnInternalImplementation, it says: Most raw objects such as strings and numbers are allocated separately; however, unique ...
rnotlnglgq's user avatar
  • 3,750
5 votes
2 answers
302 views

What do the arguments of a generated BSplineFunction mean?

For example, if we evaluate this: BSplineFunction@{{0,100},{200,50},{200,0}} we'll get ...
rnotlnglgq's user avatar
  • 3,750
12 votes
3 answers
818 views

FEM doesn't output exactly the same solution for exactly the same code?

Consider this toy example: ...
xzczd's user avatar
  • 68.4k
13 votes
2 answers
340 views

How is the zoom tooltip in the "Coordinates Tool" implemented?

I notice that the built-in "Coordinates Tool" has a very efficient zoom tooltip displaying an enlarged portion of the image along with coordinates and row/column indices: How to get the ...
Alexey Popkov's user avatar
4 votes
2 answers
196 views

Interior point method for unconstrained problems

I was recently working on applying the FindMinimum function to $f(x)=(x+1)(x-1)$, and chose the interior point method as the 'method', which yielded $x=0$. I would like to better understand how the ...
manofwar's user avatar
25 votes
2 answers
2k views

What happens if you don't Reap what you've Sown?

As I understand it, when using Sow[expr] you throw the expr on some private stack which you can ...
Gert's user avatar
  • 1,670
4 votes
1 answer
235 views

Inverse Laplace Algorithm used in Mathematica [closed]

I have a general question. I want to know what algorithm (The name of this numerical method) is already used to calculate a numerical Inverse Laplace in Mathematica. I used the function ...
Ali AlCapone's user avatar
2 votes
0 answers
121 views

What is LatticeReduce minimizing?

According to the manual page on LatticeReduce, The product of the norms of lattice vectors will decrease. The claim seems to be true for small lattices, but, I cannot confirm this for higher ...
A. Kato's user avatar
  • 5,515
5 votes
2 answers
101 views

Which model behind SequencePredictorFunction?

Is the SequencePredictorFunction based on Hidden Markov Model? If so, how does the model estimate the number of hidden states?
andrea simonetti's user avatar
3 votes
2 answers
436 views

Solving hyperbolic equation with parallelization in python by elucidating Mathematica algorithm [closed]

So! I have what seems like a rather basic hyperbolic equation to be solved written in Mathematica, with an integer input ‘n’, for which I am seeking the First {x,y} Integer solution to satisfy the ...
Travis Arlen McCracken's user avatar
2 votes
1 answer
90 views

Does SessionSubmit[ScheduledTask[expr,spec]] create a separate thread?

I don't quite understand how SessionSubmit[ScheduledTask[expr,spec]] works. We can create a background task, which can go without interfering with the main loop. If ...
Kirill Vasin's user avatar
  • 1,605
7 votes
1 answer
196 views

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

For example given the code: ...
akozi's user avatar
  • 873
2 votes
0 answers
122 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 ...
James Cheung's user avatar
4 votes
1 answer
110 views

Does RandomArrayLayer implement the reparameterization trick?

I want to backpropagate through random operations (e.g. learn the mean and variance of a Gaussian random variable). I assumed that ...
Ian's user avatar
  • 101
6 votes
1 answer
572 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, ...
Kai's user avatar
  • 2,139
6 votes
1 answer
194 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 ...
Eddi's user avatar
  • 147
12 votes
1 answer
816 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
156 views

How is MatrixPower computed?

How does Mathematica compute MatrixPower[m,n]? The documentation states it is equivalent to Dot @@ ConstantArray[m, {n}], but ...
GregH's user avatar
  • 1,939
6 votes
1 answer
271 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 ...
Carl's user avatar
  • 801
4 votes
2 answers
319 views

RandomReal vs Random[Real

Let's say I need random numbers with increasing precision to simulate a particular function, so I try: ...
Syed's user avatar
  • 59.2k
2 votes
1 answer
99 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 ...
florin's user avatar
  • 2,166
3 votes
1 answer
206 views

Construction of an additive compound matrix

I want to construct an additive compound matrix which has the following form as output : ...
Rim ADENANE's user avatar
1 vote
0 answers
68 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 ...
Vepir's user avatar
  • 632
1 vote
0 answers
151 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 ...
qreus's user avatar
  • 343
2 votes
1 answer
234 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}{\...
Oleh's user avatar
  • 81
2 votes
1 answer
225 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} ] <...
user64494's user avatar
  • 29.1k
7 votes
1 answer
227 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)...
user5601's user avatar
  • 3,790
1 vote
0 answers
111 views

How does Mathematica compute PseudoInverse? [closed]

What is the algorithm that is used in computing the PseudoInverse in Mathematica?
User101's user avatar
  • 613
1 vote
0 answers
183 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,...
Mockingbird's user avatar
4 votes
1 answer
74 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 ...
Fidel I. Schaposnik's user avatar
1 vote
0 answers
56 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?
Gabi23's user avatar
  • 305
6 votes
2 answers
914 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?
LeastSquare's user avatar
5 votes
0 answers
67 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 ...
Michael Seifert's user avatar
2 votes
2 answers
159 views

How does Plot choose the points in a figure?

Taking a simple example, ...
Mark_Phys's user avatar
  • 511
7 votes
1 answer
756 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?
blackace's user avatar
  • 415
20 votes
2 answers
2k 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 ...
Cat Bisque's user avatar
1 vote
1 answer
78 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 ...
ayr's user avatar
  • 2,494
11 votes
3 answers
326 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 ...
Gravifer's user avatar
  • 904
6 votes
1 answer
219 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 ...
RedCurry's user avatar
9 votes
1 answer
223 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 ...
VarunM's user avatar
  • 101

1
2 3 4 5
7