# Tag Info

### How to enter a repeating decimal in Mathematica

Indeed, there is no direct method to input a repeating decimal. The closest you can get is to input the repeating digits into FromDigits[]: $$0.\overline{142857}$$ <...

### How to enter a repeating decimal in Mathematica

Use the ResourceFunction RepeatingDecimalToRational: ...
• 160k

### Arithmetic operations on NumericArrays

It seems like no one answered this yet, so let me elaborate a little on my comment. A simple example of using FunctionCompile to add ...
• 23.9k

### How to recover Pauli matrices properties in Mathematica?

The Pauli vector: σ = Table[PauliMatrix[i], {i, 1, 3}] MatrixForm /@ σ One can define a dot product of matrices (in spaces of arbitrary dimension): ...
• 24k
Accepted

### Trace of -{1} expression

This is a good question for uncovering an important difference between listability and vectorization. Sometimes these terms are used interchangeably, but I would like to make a technical distinction. ...
• 239k
Accepted

### Why am I seeing what looks like a violation of operator precedence?

Consider the following: 2.84852`+3 2.85 This syntax means "write 2.84852 with 3 digits ...
• 70.9k

### Arbitrary-Precision Arithmetic behaves unexpectedly

This is at best a partial answer. I don't know in full detail what is going on with FullForm or InputForm but I will venture to ...

### Why does the Mathematica give different numerical results?

They are supposed to be different. (-y)^a /. a -> 2.99 /. y -> -2 (*7.94474*) is equivalent to 2^2.99 or ...
• 8,237

s price of soda without bottle, b price of empty bottle, k number of drunk sodas. ...
• 19.9k

### Product of elements of a list

Why is there no equivalent of Total for products? There isn't an equivalent of Total for products, and I believe that there is ...
• 236k
Accepted

### multiply two vectors, component by component

No need to do anything fancy. This is just how ordinary list multiplication works: {a1, a2, a3} {b1, b2, b3} yields ...
• 13.8k

### Rounding Real number

You can use Round and specify the second argument, t = {75.34123, 80.567, 85.789}; Round[t, 0.01] (* {75.34, 80.57, 85.79} *) ...
• 6,161
Accepted

### How to form subgraphs from a connected graph

Update: I just noticed this comment: The constraint I have is: a node can not be in two subgraphs. This is contradictory with the rest of the problem description: need to find all possible ...
• 236k
Accepted

### Why Divide does not give the same answer?

First, since the precedence of Divide is higher than Times, you should expect to parse ...
• 131k
Accepted

...
• 15.6k
Accepted

### Does Mathematica simplify calculation when encounter zero?

A quick experiment shows it does not stop, but it will evaluates all expressions on RHS, even if one is zero. ...
• 147k
Accepted

### Simplify expressions with modulo 2 (Boolean algebra)

You are working in a Boolean algebra (this should be stated explicitly). So there are reduction relations. We'll compute those first. ...
• 59.5k

### Is there a difference between Divide[a,b] and a/b?

I have just a little to add to @Szabolcs' answer, and this seemed an appropriate place rather than a separate Q&A. Since there is a theorem involved (see below), it should be pointed out that this ...
• 239k
Accepted

### Why does this whole number have a recurring value?

It's a numerical artifact that is due to finite precision of computer calculations. Indeed, when one computes SetAccuracy[12.30*12, 15] 147.60000000000002 It'...
• 24k
Accepted

### Multiplication non-deterministic?

It's not a bug and it's not so uncommon. For an explanation have a look here. This and some related issues also appear in this MathGroup thread. Also relevant: 1 2.
• 59.5k

### Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$

Similar to whuber's answer, we can use Groupings(introduced in version 11) to simplify the generation patterns, the number of patterns is related to the CatalanNumber, and use parallel computing, ...
• 15.6k

### Countdown arithmetic solver

Improved answer (Since the contents of the original answer is contained in what follows here, the original answer is deleted.) I address the following problem: given a set of numbers and a target, ...
• 10.2k
Accepted

Using With you can get a more interactive feel: ...
• 37.9k

### Improving Map Function on Lists

A slightly faster method uses KroneckerProduct to create a suitable matrix of offsets. Some data: ...
• 131k

### Applying Mod on list of list with outcomes +1, -1, other

You can use -1 as the third argument of Mod: Mod[##, -1] & @@@ lis {-1, -1, 1, 2} ...
• 399k

### Why does the Mathematica give different numerical results?

Complex power is really a multivalued function. Consider this function, that returns all possible values of a complex number $x^y$: ...
• 7,921

### Solving calculation puzzle

Here are all $4$ solutions to the puzzle Technique #1 heavily plagiarizing this excellent answer Apparently Groupings is the tool for the job! ...
• 7,459

...
• 160k

### How to find a longest word path in dictionary?

This is really a comment and suggestion, but too long to put in a comment format (so please don't down-vote this). I would speed the search by grouping words into the $26 \cdot 26$ classes that have ...
• 41.8k