Questions tagged [evaluation]

Questions about how Mathematica evaluates expressions, tracing evaluation (Trace*), handling expressions in unevaluated form (Hold*, Unevaluated), nonstandard evaluation, etc.

150 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
20 votes
0 answers
211 views

Status of all Evaluators?

Since I have 4 cores on my machine I typically have 4 notebooks open each with their own kernel evaluator. I'd like to construct a dynamic pane similar to the parallel kernels status window: But that ...
user avatar
  • 30.4k
10 votes
0 answers
147 views

'Visibility' of Dynamics in TabView with respect to SynchronousUpdating

Bug introduced in 11 or earlier and persisting through 12.0.0 CASE:4076464 Example 1 ...
user avatar
  • 133k
10 votes
0 answers
348 views

Built-in symbols which are more close to the root/core of Wolfram Language

Seeing the vast scope of science covered by the Wolfram Language (WL) and the large amount of built-in symbols (functions), I am curious to know which built-in symbols are more close to the root of WL,...
user avatar
  • 1,419
9 votes
0 answers
104 views

Possible bug in Refresh[x, None] on the very first x = val

Bug introduced in 8 or earlier and persisting through 11.3 [CASE:3995912] From Refresh docs: Refresh[expr,None] ...
user avatar
  • 133k
8 votes
0 answers
142 views

Relation between the syntactic and evaluated Association

This question is inspired by this answer and related to unsolved post "Association's Attributes change between 10.3.1 & 10.4"...
user avatar
  • 2,702
8 votes
0 answers
221 views

Regarding Evaluated True

Done a bit of reading: Normal[Series[ ]] does not give a normal expression Regarding the Evaluated->True, consider: ...
user avatar
  • 14.5k
7 votes
0 answers
114 views

How useful is $SynchronousEvaluation?

Example SessionSubmit @ Print @ $SynchronousEvaluation Will print False even though ref/SessionSubmit/Details last point: ...
user avatar
  • 133k
7 votes
0 answers
399 views

Is there an analogue of Evaluated->False (in FindRoot) for FindMinimum?

I guess functions like FindRoot, FindMinimum, etc puts the estimation number into the expression, and then do other calculations....
user avatar
  • 7,661
7 votes
0 answers
241 views

What is the difference between GenerateDocument and TemplateApply[NotebookTemplate[

Bug introduced in V10.0 and persisting through V10.4 Since V10.3 the bug still remains but additionally the Genarate and ...
user avatar
  • 133k
6 votes
0 answers
115 views

Difference between the infinite rewriting behavior of evaluation and ReplaceRepeated

In the documentation tutorial/Evaluation it's said that: Every time the expression changes, the Wolfram Language effectively starts the evaluation sequence over ...
user avatar
  • 563
6 votes
0 answers
83 views

In over my head in trying to create a debugger

Apologies for a less than ideal question, but if I could have asked a good question the answer would probably have been revealed in the process... In answer to this question @LeonidShifrin gave some -...
user avatar
  • 2,410
6 votes
0 answers
152 views

How trap expression that doesn't evaluate?

If evaluating an expression produces an error, it's easy to trap that using Check or Throw......
user avatar
  • 11.3k
5 votes
0 answers
191 views

How to allow one process to take advantage of all available cores while other processes run in parallel?

I have to run multiple tasks simultaneously: Data download from stock exchange during live market session and append it to a global variable. Process the data by taking the data from the front of the ...
user avatar
  • 91
5 votes
0 answers
85 views

Run computation in separate process and kill it after a time limit

I am looking for a solution to run a Mathematica calculation in a separate process (separate kernel) and cancel the computation after a given time. If it cannot be cancelled, then just kill that ...
user avatar
  • 225k
5 votes
0 answers
116 views

Dynamic evaluation of Histogram

Can someone explain the following behavior exhibited by a combination of SetDelayed, Dynamic and ...
user avatar
  • 8,289
5 votes
0 answers
76 views

Sequence in Association

Inspired by this question Association's Attributes change between 10.3.1 & 10.4? I have been feeding a variety of strange expressions into Association. ...
user avatar
  • 14.7k
5 votes
0 answers
262 views

Can I define an axiomatic (Boolean algebra) system and prove theorems using Mathematica?

The general question is Can I define an axiomatic system and prove theorems using Mathematica? The more concrete one is about Boolean algebra. I consider this axiomatic Boolean algebra system (wiki)....
user avatar
  • 808
5 votes
0 answers
144 views

Are there any videos that show how different Mathematica expressions are evaluated?

Are there any videos that show how different Mathematica expressions are represented internally as object graphs and demonstrate how they are transformed during an evaluation? I am asking because I ...
user avatar
5 votes
0 answers
774 views

A is fast, B is fast, but together they're Mathematica-crashing slow?

I'm trying to do something with finding solutions to a quantum mechanics problem with n wells. If there are 40 wells, I need to find the solution to an equation in the form: ...
user avatar
4 votes
0 answers
159 views

Inconsistent Output Bug and Code-Quits-Kernel Bug with Compile

This is the strangest bug I've encountered. In my experience, variations in the code will unexpectedly crash the kernel, give inconsistent output, or produce expected results with no problems. 1) Code-...
user avatar
4 votes
0 answers
65 views

Residue for $L(s,\chi_1)$ not same in Mathematica as theoretical value

I want to find the residue of Dirichlet-L function, defined as $L(s,\chi)= \sum_{n=1}^\infty \frac{\chi(n)}{n^s}$ for $Re(s)>1$. We know that $Res_{s=1}L(s,\chi_1)=\frac{\phi(k)}{k}$, where $\chi$ ...
user avatar
  • 195
4 votes
0 answers
118 views

ScheduledTask DateObject pattern to evaluate at same time everyday

I would like to create a ScheduledTask that evaluates at the same time everyday. Such as, evaluate function at 1:00 am everyday. The "Daily" timespec in ScheduledTask doesn't allow me to control the ...
user avatar
  • 1,269
4 votes
1 answer
405 views

Return unevaluated expression from function

Is there any way (except using upvalues) to make a function that returns it's input Unevaluated? What I mean by that: Take the following example: ...
user avatar
  • 23.9k
4 votes
0 answers
123 views

Why does x++ behave strangely under Defer?

Bug introduced in 10.4.1 or earlier and persisting through 11.1.0 or later Using x++ or x=x+1 inside ...
user avatar
  • 1,279
4 votes
0 answers
72 views

Why does FreeQ seem not to work with complex numbers?

I guess I do not understand how Mathematica evaluates this simple expression inside FreeQ ...
user avatar
  • 41
4 votes
0 answers
134 views

Why the flat f[x] is treated as ghostHead_[f[x]]?

While reading this answer I feel confused. If we do not care any specific detail of the original question, then ybeltukov's answer essentially makes use of the following fact ...
user avatar
  • 1,419
4 votes
0 answers
135 views

Functional-Style Fixed-Length Queue Object?

Following up on question Side-effecting an array in an association? and @Mr.Wizard's answer in there, I'm modernizing and tweaking Daniel Lichtblau's efficient queues and ran into a little roadblock. ...
user avatar
  • 8,571
4 votes
0 answers
212 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
user avatar
  • 971
4 votes
0 answers
436 views

DynamicModule, SaveDefinitions and global functions

Unfortunately, I had not checked stackoverflow, because there, the exact same behavior was already reported. Please see the Q&A "SaveDefinitions considered dangerous". Up-front, I'm on ...
user avatar
  • 111k
4 votes
0 answers
99 views

Problem with inequality using refine

I am using inequalities to follow some line of reasoning in Mathematica and I came across a problem I can not explain to myself. Does from a>=0 and b>=0 not follow a+b >= 0? How does Mathematica ...
user avatar
  • 339
3 votes
0 answers
149 views

Using new FoxH function to solve a trinomial equation. Possible issue?

There is a possible issue on solving the following trinomial equation $$x^\alpha+x=y$$ for real $x,y,\alpha$. From Belkic [1], it is known that for $\alpha>1$ a solution is found using the ...
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
3 votes
0 answers
65 views

With notebook's default context set to "Unique to each cell group", how do I make "Evaluate in Place" work in a text cell?

With the notebook's default context set to "Unique to each cell group", I have: x=1 The value of x = x where the second line is a text cell with an ...
user avatar
3 votes
0 answers
85 views

How to plot function with pattern-matched argument and catch-all definition that throws

Consider the following function: f[n_?NumericQ] := n; f[args___] := Throw[{args}]; Then try to plot it: ...
user avatar
3 votes
0 answers
97 views

Language`ExpressionStore and ParallelMap

Is there a way to access NewExpressionStore from within a parallelized calculation? I have tried variations of ...
user avatar
  • 6,328
3 votes
0 answers
83 views

Understanding the difference between EvaluationNotebook and ButtonNotebook (and their FrontEnd` versions)

The Documentation for ButtonNotebook says: ButtonNotebook[] gives the notebook, if any, that contains the button which ...
user avatar
3 votes
0 answers
106 views

Optimization for iterating and plotting a matrix product and its elements?

I have an iterative matrix product of this type $$ \begin{pmatrix}y_{n+1} \\ x_{n+1} \end{pmatrix} = \begin{pmatrix} A & B \\ C & D \end{pmatrix} \begin{pmatrix}y_{n} \\ x_{n} \end{pmatrix} $...
user avatar
  • 39
3 votes
0 answers
129 views

Check an Option without Evaluation

Consider the following: ...
user avatar
3 votes
0 answers
99 views

Why do I need to generalize/parameterize an integral sometimes to get a closed form result?

...
user avatar
3 votes
0 answers
132 views

Assign variables from list inside With or Module

I have found that it is possible to assign variables from lists, as follows. r = {1, 2, 3}; {a, b, c} = r; b 2 However, if ...
user avatar
  • 163
3 votes
0 answers
1k views

Lazy evaluation/loading of parts of an expression

Is it possible to have an expression x such that its elements are only evaluated when they are individually accessed, for example when evaluating statements like <...
user avatar
2 votes
0 answers
45 views

Division by 0 Error when checking whether something is equal to zero

I was running a program and suddenly got Divide::infy messages coming from the following (rather ugly) expression. ...
user avatar
  • 960
2 votes
0 answers
41 views

What is the difference between "SessionSubmit" and "LocalSubmit" in performance?

Does SessionSubmit forward the computation to the master thread and LocalSubmit to some other idle thread? By thread, I mean CPU ...
user avatar
  • 375
2 votes
0 answers
55 views

How can I know the value of some parameter (say w) during a parallel calculation in Mathematica?

I am computing something like ParallelTable[{w, f[w]},{w,0,10,1/100}], in which f[w] is a numerically obtained function that ...
user avatar
2 votes
0 answers
43 views

Hold parents of ArcTan

If this question is beating a dead horse about Hold, Inactivate etc., a close vote is fair enough. That being said, I'm curious ...
user avatar
  • 2,688
2 votes
0 answers
57 views

What are key differences between InputNotebook and EvaluationNotebook?

I am still new to Mathematica but advancing to a point of programming notebook and cell manipulations using native commands. Sometimes they call for specifying ...
user avatar
  • 1,837
2 votes
0 answers
61 views

Which Method is used during the processing of Sum Function?

I am trying to find out which Method is used while evaluating the following function: Sum[1/((n^2)), {n, 1, Infinity}] Any help would be greatly appreciated. A ...
user avatar
  • 121
2 votes
0 answers
139 views

How can I numerically evaluate the trace of a large matrix to speed up the code?

I have a large matrix (4Wn*4Wn) resulted from multiplication of different matrices and I would like to evaluate the trace numerically to speed up the process. Here ...
user avatar
2 votes
0 answers
47 views

How to configure cells **not** to evaluate via "Evaluate Notebook"

Is there a way to configure certain cells/sections not to evaluate under "Evaluate Notebook," while still being able to "manually" evaluate them with Shift+Enter? I have a large notebook with ...
user avatar
  • 699
2 votes
0 answers
53 views

How might one deal with a run-away job, short of "force quitting"?

I've done some miscoding, and I'm in a loop that's producing output quite rapidly. So, it seems that I can't really get the Abort Evaluation or Quit Kernel options to "take". Of course, I can Force ...
user avatar