# Tagged Questions

Questions about interpretation of numeric input or how Mathematica stores and manipulates numbers internally.

0answers
56 views

### Rationalize error

The docs state that "Rationalize[x,dx] yields the rational number with smallest denominator that lies within dx of x." However, testing this out it appears to be false. ...
0answers
31 views

### Copy-pasting a floating point number [duplicate]

Here is a behavior of the Mathematica front end which confuses me. Type N[Sqrt[2]] The displayed output is 1.41421 ...
1answer
85 views

### How can I completely discard decimals after a set number of significant figures?

I have a number with a long decimal tail, like x=1.23456789789456123 and I would like to (i) keep the first $n$ significant figures, and (ii) completely discard ...
2answers
45 views

### How to round all the numbers in a function?

I have a complicated function that is a combination of floating-point numbers and variables. I want all the numbers rounded off, but I have no clue how to do this. For example I would want ...
1answer
53 views

### 4-digit number, where $d_{1000} \lt d_{100} \lt d_{10}\lt d_{1}$ [closed]

I need to find all 4-digit numbers, where ones-number > tens-number > hundreds-number > thousands-number. 6789 is the highest possible such number and 1234 is the lowest. One solution is to write them ...
0answers
71 views

### RealDigits and functional style

So while thinking about Replacing numbers of which you only know certain digits I have faced, again, a problem that I find hard to extract from RealDigits' output ...
1answer
69 views

### NumberForm pesky warning from Manipulate

I'm using the NumberForm command inside a Manipulate environment, and in some special cases Mathematica gives a pesky and mostly useless warning message : NumberForm::sigz: In addition to the ...
1answer
59 views

### How to refer a number in a list with two columns, first one is a number and the second one is empty? [closed]

Let's say, I have defined a list as list = {{-31, -31}, {52, }, {34, -11}, {-38, }, {78, -44}, {-36,14}, {-9, 98}, {33, 6}, {82, 99}, {-85, -10}} As you can see, ...
1answer
34 views

### Encoding/Decoding matrices as integers, integers as matrices [closed]

I want to convert large binary matrices of m x n dimensions into integers, and then to convert these integers to the original matrices. I attempted the following: ...
2answers
118 views

### How to get the $0$ result for this limit?

Consider the following series: $$\sigma (\text{x\_})\text{:=}\sqrt{\sum _{k=0}^{x-1} \frac{(x! x!) (-1)^{x-k}}{(x-k) (k! (2 x-k)!)}+\frac{\pi ^2}{12}}$$ From the following codes, it seems that the ...
1answer
50 views

### Pattern that matches numbers in the $\epsilon$-neighborhood of a given number?

I dfined the following function to create a pattern that matches the $\epsilon$-neighborhood of a given number. ep[x_, e_] := _?(x - e <= # <= x + e &) ...
0answers
42 views

### Maintaining working precision in my program

I am badly stuck with this program I am writing. I want output of program below to be precise up to 25 digits after decimal point. I am supplying all inputs with precision 25. But after each iteration ...
2answers
159 views

### How to make pairs of Young diagrams appear?

I have the following Young diagrams {{{0}, {2}}, {{0}, {1, 1}}, {{1}, {1}}, {{2}, {0}}, {{1, 1}, {0}}} where you can interpret each pair as following: For ...
1answer
60 views

### Behaviour of RealDigits expected or wrong?

Is this behavior expected or a bug? RealDigits[10304.390456] {{1, 0, 3, 0, 4, 3, 9, 0, 4, 5, 5, 9, 9, 9, 9, 9}, 5} when I ...
3answers
162 views

### Making a replacement on the numerator and denominator of a rational number

It's isn't a big deal, but when I run the following I don't get the output I expect. After discussing this in the comments it appears it has to do with being an atomic expression. ...
1answer
88 views

### Calculations after NumberForm [duplicate]

As specified in documentation center the functions AccountingForm, NumberForm, etc. are useful only to display numbers in ...
1answer
53 views

### NumberLinePlot: How to make the 3rd list (c) appears with “black crosses” or “void circles”?

a = {1, 2, 5, 2} b = {2} c = {1.75, 2.88, 3.25} NumberLinePlot[{a, b, c}, PlotStyle -> Directive[PointSize[0.032]]] I thought about PlotMarkers or PlotStyle, ...
1answer
58 views

2answers
142 views

### The precision of the number

I have problem in Mathematica with unnecessary rounding which is caused by high precision. For example I have value a = 2.052685846*10^-1865, when I make ...
1answer
95 views

### Square root of a value defined in a finite field?

I am trying to find the right way to compute the square root of a number defined in a finite field. For example, ...
0answers
185 views

### NMinimize seems to call function with the same values multiple times

I have to minimize a function where the evaluation of one parameter set takes very long (around 5sec) and discovered alongside, that NMinimize seems to call this ...
2answers
576 views

### Enter exact rational numbers easily with decimal notation

Is there a simple way to enter decimal numbers such as 0.123 so that Mathematica interprets it as an exact rational number 123/1000?
2answers
71 views

### Function that returns the binary string given its index in lexicographic ordering

Index the binary strings in lexicographic order, so that the empty string " " corresponds to 0, the string "0" corresponds to 1, the string "1" to 2, and so on. I want a function that, given a ...
2answers
151 views

### Showing AlgebraicNumber[1/2 (1 + Sqrt[5]), {-3, 2}] in human-readable way

Is there a function to show algebraic numbers in Mathematica more conveniently? I am looking for something similar to MatrixForm for matrices. For example, I would like to view ...
1answer
10k views

### Entering numbers in Scientific Notation?

I need to play with a lot of powers such as 10^-3. 1E-3 does not work for it. Is there any short form for it?
1answer
76 views

### Avoid unnecessary truncation

Is there any way to change the general settings in Mathematica so that when I type e.g. 0.34*60000000 I get the output ...