# Tagged Questions

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

67k views

### Get a “step-by-step” evaluation in Mathematica

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that's to say, outputting not only the result but all the stages that have led to it? If so, how does one do it? ...
6k views

### Plot draws list of curves in same color when not using Evaluate

This example comes from the Mathematica documentation for Plot under Basic Examples. Can someone please explain why these are each plotted as a different color in ...
2k views

### Injecting a sequence of expressions into a held expression

Consider the following toy example: Hold[{1, 2, x}] /. x -> Sequence[3, 4] It will give Hold[{1, 2, Sequence[3, 4]}] ...
2k views

### The clearest way to represent Mathematica's evaluation sequence

WReach has presented here a nice way to represent the Mathematica's evaluation sequence using OpenerView. It is much more clear way to go than using the standard <...
3k views

### How do I evaluate only one step of an expression?

I am looking for a simple, robust way to evaluate an expression only one step, and return the result in a held form. The definition of a single step is ambiguous, and this itself is probably worthy ...
1k views

### How to compare power towers in Mathematica?

First I tried it directly, but it overflowed: ...
1k views

### How do you set attributes on SubValues?

SubValues, as discussed in a previous question, are declared as follows ...
2k views

### What are the cool kids talking about when they use ##&[]? [duplicate]

All the cool kids are apparently using ##&[] for Unevaluated @ Sequence[] but I have no idea what either means. ...
873 views

### Block attributes of Equal

I answered “Equating matrices (or higher order tensors) element-wise” with: ...
1k views

### How do you programatically load data into symbols?

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
1k views

### Asynchronous evaluation: Is it possible?

Currently we have a limited number of ways to perform asynchronous evaluation. The most common is through Dynamic and Manipulate...
962 views

### How does Return work?

It is not completely clear to me how Return[] works. The documentation says: Return[expr] returns the value expr from a ...
2k views

### A one line proof that one is zero using Mathematica 10

a = (Sqrt[2] + 1) (Sqrt[2] - 1) - 1; {a/a, Simplify[a]/a, b/b == Simplify[b]/b} {1, 0, True} This one line "proof" that ...
479 views

### Evaluation of OptionValue[]

I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
3k views

### Difference between AbsoluteTiming and Timing

I need to evaluate the efficiency of my code. Therefore I would like to evaluate the time the code need for some calculations. Mathematica gives me two possibilities for this kind of evaluation: <...
433 views

### Can't inject EncryptedObject

Bug present from 10.0 to 10.3.1 and fixed in 10.4.0 !! Here are minimal examples: ...
776 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 ...
460 views

### Result about Context is inconsistent with the description of “Power Programming with Mathematica”

x = 5; tempx = 6; Begin["temp"] {x, Globalx, tempx} The result in my Mathematica session is {5,5,6}, but it's ...
1k views

### Mathematica for Computer Scientists

Background I've coded in C/Scheme for 10 years. I have a BS CS. I've recently become very interested in pattern-matching (lisp's match macro), and term rewriting systems, which brought me to ...