# 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}$$ <...
Accepted

### Puzzle with Mathematica

A non brute-force approach is the following, similar to my answer for the Zebra Puzzle. Both puzzles are examples of constrainst satisfaction problems, that can be solved with ...

### How to enter a repeating decimal in Mathematica

Use the ResourceFunction RepeatingDecimalToRational: ...

### Puzzle with Mathematica

Can't think out a better method than brute force, it'll be conciser in Mathematica of course: ...

### 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 ...

### 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): ...
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. ...

### Puzzle with Mathematica

To make the brute force solution a bit more pleasant for the eye of the observer: ...

### 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 ...

...
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 ...

### 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 ...

### 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 ...
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 ...

### 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} *) ...
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 ...
Accepted

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

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

...
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. ...
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. ...

### intermediate steps of a Mathematica operation

I feel like I should be prefacing this answer with three confessions, considering that this is an arithmetic question. First, I had a hard time with the multiplication tables until I was nine years ...
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'...
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.

### 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 ...

### 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, ...

### 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, ...
Accepted

Using With you can get a more interactive feel: ...

### Improving Map Function on Lists

A slightly faster method uses KroneckerProduct to create a suitable matrix of offsets. Some data: ...
Here are all $4$ solutions to the puzzle Technique #1 heavily plagiarizing this excellent answer Apparently Groupings is the tool for the job! ...