# Questions tagged [number-representation]

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

194 questions
Filter by
Sorted by
Tagged with
283 views

### IntegerPart - is this a known bug?

I'm working in Mathematica 13.0 and I type a=0.00001; IntegerPart[a/a] and well, the output is 0. Try with almost any other value of ...
1 vote
66 views

### Extracting powers of a sum

Given a sum in the form Sum[n^k, {k, kl}] for some natural n and natural list kl, is it ...
• 4,368
1 vote
33 views

### Extracting digits of a real number with RealDigits produces unexpected result

I have a list of real numbers, each of which has two decimal places. I'm trying to extract the second digit after the decimal point. The function I'm using is ...
• 1,241
1 vote
126 views

### How can I get these decimals formatted properly?

It's nothing serious, but I was just wondering. I have a large number of floating point numbers which I write to a file. Mathematica writes each number with 17 decimal positions, which is way more ...
• 6,658
68 views

### BarLegend with comma as NumberPoint

I'm having trouble in plotting a Barlegend with comma as decimal separator in Wolfram Mathematica 13.0. I already tried to change the environment variables or to use ...
63 views

### When there is decimal number in N[], how can ensure digits more than machine precision?

We know that N[3/7,100] will keep 100 digits after decimal point. But N[3.1/7,100] will Keep only machine precision fewer ...
• 173
56 views

### Check if a fraction leads to an integer, choose $r$ and run trough $0\le a\le n$ and go to $r+1$

Well, I am trying to do the following: I have two functions $y(r,a)$ and $z(r,a)$ and I want to check of the division of both those functions leads to an integer. In order to do that I want to choose ...
• 1,765
109 views

### Finding IntegerPartitions[252] with no zero and no duplicates

Well, I am trying to execute the following code: ...
• 1,765
47 views

### Alternative for PowerRepresentations[n, x, 1]

I am looking for numbers $n$ that can be written as the sum of other numbers. So: PowersRepresentations[n, x, 1]. But is there a faster way of finding these numbers?...
• 1,765
313 views

### Checking if a number is right sorted

I have a number $n$ such that the digits of $n$ are strictly increasing to the left except for the first digit. So for example when $n=51369$ fits the bill because: $$1<3<6<9\tag1$$ Is there ...
• 1,765
675 views

### How to force Mathematica to do infinite-precision calculations?

Consider the following calculation: 1234*5678*90.12 The result is: 6.31439*10^8 However, I want to get a precise result. Of ...
• 145
1k views

### Making the number 12345...n

Well, I am trying to write a code that makes the number: $$123456\dots n\tag1$$ So, when $n=10$ we get: $$12345678910$$ And when $n=15$ we get: $$123456789101112131415$$ And when $n=4$ we get: $$1234$$...
• 1,765
88 views

### Get sign of unassigned variables

I want to find the signs of the following expression of unassigned variables: a = x1 x2 - x3 x4; The signs or prefactors are +1 ...
1 vote
67 views

### Implementing the Binary GCD algorithm in Mathematica

Well, I have $n\in\mathbb{N}$ and I want to transform $n$ to a binary number which can be done using FromDigits[IntegerDigits[n, 2]]. I want to compute the ...
• 1,765
32 views

### Making a binary number $n$ that must contain $k$ times a $1$ such that k==GCD[n,IntegerReverse[n]]

Well, I am trying to code the following thing in Mathematica: I have a binary number $n$ that must contain $k$ times a $1$. So for example: when $k=5$ the following binary numbers does fit the rule: ...
• 1,765
1 vote
74 views

### Solving a system of equations using a list of possible solutions

Well, I have for example the following input and output of a code: ...
• 1,765
1 vote
99 views

### Parallel Mathematica-code that runs too slow when running PowerRepresentations[] function

Well, I am a student in elementary number theory and trying to find natural numbers that can be written as the sum of integers to the power of an integer. The code I am using now is the following: <...
• 1,765
44 views

### Solving a system of equations (works with squares not with fifth powers)

Well, I was trying to solve a system of equations in a different question of mine. There @kglr gave a very efficient code for solving that system of equations using squares: ...
• 1,765
84 views

### Removing a element from list when obeying a certain condition

Well, I have the following code: Select[PowersRepresentations[n, a, b], DuplicateFreeQ[#] && ! MemberQ[#, 0] &] This code finds ...
• 1,765
246 views

### Solving for a unique set of solutions

I have the following code: ...
• 1,765
1 vote
67 views

### Is there a function in Mathematica that saves the power of 10 of a number in scientific form?

I have a number for instance 0.0622. I want to put it in ScientificForm so I do ...
74 views

### How to Shape Text?

Imagine I have a certain number 23819657294172004194219023914217958273128471531429470113 If I convert it to a string with ...
• 4,368
1 vote
108 views

### How to express number in exponential decimal such as 1e2=100?

I am using MATLAB for a long time, and usually I express the number as exponential decimal such as x = 1e2; % x=100 However, if I write this form in mathematica, ...
• 13
1 vote
76 views

### Extending NumberForm

I'd like to define a function, call it NumberF, that takes a real number n and two naturals l...
• 4,368
72 views

• 101