# Tagged Questions

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

1k views

### Is there a way to stop evaluation immediately? [closed]

Sometimes I'll have a loop that I accidentally made too big. I'll evaluate, and MM will try to run through the entire loop. The program itself doesn't actually seem frozen... I can go to Evaluation-> ...
151 views

### How to calculate the residue of $1/f(z)$ at a numerical approximation to a root of $f(z)$?

The input Residue[1/DirichletL[19,10,s],{s,s0}] gives 0 even when s0 is a root. For ...
137 views

125 views

### Strange results of definitions using OwnValues

I am asking this question simultatenously with this one, which is strongly related. I was trying to see if I could create the behaviour as in that question without using ...
320 views

### Another difference between Set and Setdelayed. Evaluation shortcut?

A little while ago I wondered why f[x_] = f[x] gives an infinite iteration. I ended up discovering the following difference in evaluation between ...
1k views

### Replace symbols with values without evaluation

If I have assigned values to a, b and c: a=7; b=5; c=6; ...
2k views

### Defining a function in terms of matrix elements [closed]

Currently trying to use elements from a matrix in defining a function however having some trouble. This is a somewhat simplified version of the problem. Say I have the matrix ...
1k views

### Why do certain values in ArcSin not fully evaluate?

This is a continuation of: Why do certain fractional values in TriangleWave not evaluate? The analysis by R.M and rasher revealed that problem to reduce to the behavior of: ...
115 views

### Why do certain fractional values in TriangleWave not evaluate?

While answering another question I discovered that TriangleWave does not automatically evaluate when given certain fractional values, specifically fractions with a ...
192 views

19 views

### Evaluating a String that is a Variable [duplicate]

I have a Variable assigned a value, say ImportantDocuments=1 How do I make N["ImportantDocuments"] evaluate to be 1 instead of ImportantDocuments I found that N[...
127 views

### Why is held expression evaluated?

Context: I'm studying non-linear dynamics. As part of a bigger problem, I'd like to generate lists of the form {{deq, ic1}, {deq, ic2}, ...}, where ...
380 views

### Understanding Villegas-Gayley

Temporary message: I have written another question about the behaviour the code by Oleksandr R. . Sadly I clicked "discard" and that was lost. I am a bit demotivated now and in order to not let the ...
272 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 Ubuntu ...
83 views

### Problem of RuleDelayed, how to evaluate some parts of the right side of RuleDelayed

Problem of RuleDelayed ...
248 views

### Piecewise function with user-input interval

I would like define a function g[data,bins,x] which is a piecewise constant function taking value data[[i]] in the range ...
146 views

### Need help looping a notebook evaluation

I'm a new user and would like to find the minimum value of soln1[30] obtained after repeating the following evaluation (below) for 1000 cycles (for instance). I can obtain sequential values of soln[...
788 views

### Elegant high precision log1p?

Sometimes it is hard to understand how numerical expressions are evaluated. I remember reading claims by Wolfram on how smart the Kernel is to evaluate expressions trees numerically by recognizing ...
181 views

### Keep data in memory inside a notebook without having to evaluate it again [duplicate]

I have a notebook that calculates some data in a relatively large time so I want to keep these data saved inside the notebook without recalculate them every time I open the notebook. I know I can ...
98 views

### Preventing evaluation until all undefined symbols are resolved

FixedPoint[If[# <= 0, 0, # - 1]&, 2 x] Causes an infinite loop because of 'x'. How do i automatically prevent evaluation until ...
83 views

### Need to run evaluation 2 times

Why does this only work after running the evaluation 2 times? ...
73 views

### Evaluate only one from a set of procedures

Let's say I've got a list of procedures: {Print[1];, Print[2];, Print[3];} And I want to only evaluate 3rd one: ...
199 views

### Assigning an equation as a variable

I am compiling a calculator where many slider parameters are used to define a value, where the defined value may then be reused to define another value. I am unable able to, or at least been ...
140 views

### Using a variable to tell Mathematica which existing variable to manipulate

I have an estimation routine I have coded up, I want now to do some tests on it where I pick a particular parameter and run the estimation for differing values of that parameter. What I want is to be ...
143 views

### Selecting expressions from a sequence that are not subexpressions of earlier elements

I have a While loop that generates and prints an expression on each iteration (there can be thousands of iterations). UPDATE: Some expressions are generated in ...
124 views

### Aborting from inside a ScheduledTask

If you have an Abort[] inside a ScheduledTask expression, what does it abort? The scheduled task evaluation, or any main kernel ...
114 views

### Manual CellGrouping option causes crash at cell evaluation

Update: Try to reproduce this behaviour with CellGrouping set to manual. To do that: either evaluate ...
189 views

### Partial result of aborted evaluation of FullSimplify

When FullSimplify invoked on a large expression, it can run for hours. If I do not have time to wait, and abort the evaluation, I get no result, although, ...
189 views

### Differentiating a function that has NIntegrate within it

I am something of a novice with Mathematica. I have written the following code; ...
382 views

### ScheduledTask with scoped variables. Working with timed evaluation

I guess I have to try harder and focus more but timed evaluation always frustrates me. I will show the issue on simple example of delayed trigger. ...
322 views

### How to exit from the innermost enclosing pure function?

Here is what I tried to do: Scan[Function[x, Scan[Function[y, If[y == 2, Return[]]; (* Do something useful *) Print[y]], x]], {{1, 2, 3}, {4, 5, 6}}] ...