Questions tagged [number-representation]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
26 views

How does the Bias parameter adjusts Chebyshev nodes in RationalInterpolation of the Function Approximation Package?

How does the Bias parameter adjusts Chebyshev nodes in RationalInterpolation of the Function Approximation Package? What is the mathematical mapping/formula applied in the Bias adjustment from -1 1 ...
2
votes
3answers
68 views

How to get string from the result of BaseForm function

I want to get the string "b0.3ae" In:=BaseForm[176.23, 16] Out:=Subscript[b0.3ae, 16] And then I want to get 176.23 by ...
5
votes
4answers
277 views

How to format natural numbers so that they are 2 digits long?

I want to format all numbers from 1 to 50 so that they are all 2 digits long. desiredOutput={01,02,...,49,50} Digging through the documentation the ...
4
votes
5answers
254 views

Convert decimal value to hexadecimal

How can I convert for example 62343 to a hexadecimal value 45 to a hexadecimal value ? I see I can use: IntegerDigits[62343, 16] = {15, 3, 8, 7} ...
7
votes
3answers
460 views

Scientific notation for exact numbers?

Some of my symbolic computations involve many large numbers, e.g.: 37894580188800000000000000000000000000000000000000 As the computation is symbolic, I'd like to leave the numbers in exact form, ...
4
votes
0answers
120 views

How does Mathematica evaluate N[π, 30] == π?

I want to know how N[π, 30] == π works. The result is True. I wonder whether the exact number ...
0
votes
0answers
51 views

A MeijerG function does not accep arguments wrapped in “*Form” for numeric evaluation [duplicate]

I get the following Meijer function as a result of a symbolic integration: expr = MeijerG[{{1, 3/2}, {}}, {{1, 1}, {1/2}}, x]. I try to calculate numerical ...
1
vote
3answers
64 views

How to add suffix to numbers in CForm?

I want to create C-Code from some expressions which have many explicit floating point numbers in them. I need real numbers to be in quadruple and not double precision. Is there a way to add a 'q' ...
1
vote
0answers
68 views

How do I interpret numbers like 0``-24.779598336747533$ [closed]

A numerical calculation leads to the following strange output. I converted it to InputForm and it looks like this: ...
0
votes
1answer
70 views

Displaying the repeating decimal expansion of a rational number [duplicate]

How do I write a decimal expansion of a rational number $a/b$ with only periodic part, e.g., given $1/7=0.14285714285714285714 \ldots$, I want just $0.142857$, the periodic part of $1/7$, to be ...
2
votes
3answers
67 views

Find the number of true's in a TrueQ expression

How can I find how many times the code: Table[TrueQ[FractionalPart[Sqrt[n]] == 0], {n, 1, m, 1}] Gives the value True back for a variable $m$? So, we know that ...
0
votes
2answers
67 views

How to solve a problem using DensityPlot in a Hypergeometric function?

The problem is to obtain a DensityPlot of a Hypergeometric function The code is the following ...
0
votes
1answer
51 views

NumberForm with fixed width and exponent as “e+00” or “e-02”

I wish to export a matrix of real numbers out to a txt file in which the entries have the MatLab form: ...
1
vote
2answers
500 views

How to generate all the combinations? [duplicate]

There are $N$ optimization variables, $v_1,v_2,\cdots,v_N$. and $v_n\in{0,1,2,3,\cdots,K}$. Let $N=10$ and $K=5$. How can I generate all the possible combinations? For example, the first ...
2
votes
1answer
57 views

Web Scraping - Why are these numbers interpreted as strings?

I started with: data = Import["https://www.destatis.de/DE/ZahlenFakten/GesellschaftStaat/Gesundheit/Todesursachen/Tabellen/Sterbefaelle_Unfaelle.html", "Data"] ...
0
votes
0answers
46 views

Ignoring text when converting strings of text to numbers

I have a string of measurements--mostly numbers, but occasionally an NA. Right now Mathematica is reading it all as text, so I'm using ...
0
votes
0answers
39 views

Return the precision of the first non zero digit in a number for measurement error representation function

I'd like to return the precision of the first non zero digit in a number. The motivation is so that I can quickly construct my error notation which is the bracketed notation, e.g. $x = 1.234$ with ...
1
vote
1answer
776 views

Rounding a number to decimal places and keeping a trailing zero

It's often useful for me to round numbers to some decimal place for printing on a graph or figure. I usually do this by: ...
4
votes
5answers
254 views

How to convert list of digits to number? [closed]

I have a list such as: a = {1, 2, 4, 3}; and I want to get the 'number' of the list. For this example, I want to get this number: ...
0
votes
1answer
55 views

How can I simplify an Irrational Fractional Expression in Mathematica

The expression is: $$\frac{4\surd3 + 5\surd2}{\surd48 + \surd18}$$ and its simplification is: $$\frac{3}{5} + \frac{4\surd6}{15}$$ How can I perform such simplification in Mathematica?
0
votes
0answers
60 views

Solving a system of linear equations in Mathematica regarding the errors of different methods

I have a system of equations, i.e. 0.62243x + 0.51824y = 0.70524 0.71497x + 0.59496y = 0.80996 I have 3 ways to solve this system (there are more but I am ...
4
votes
1answer
127 views

NumberForm and Precision

With MachinePrecision this construction works as expected ...
2
votes
1answer
142 views

LieArt — 8 dimensional Irreducible representation of $\mathrm{SO}(8)$ and their decompositions - No.2

This is the followed up question of LieArt --- 3 different 8 dimensional Irreducible representation of SO(8) and their decompositions, Since $$ \mathrm{SO}(8) \supset \mathrm{SU}(2) \times \mathrm{...
1
vote
0answers
134 views

LieArt — 3 different 8 dimensional irreducible representation of $\mathrm{SO}(8)$ and their decompositions

I am using the LieArt which you can download freely online https://arxiv.org/pdf/1206.6379.pdf There are three different 8 dimensional $\mathrm{SO}(8)$ irreducible representations, formally it is ...
4
votes
2answers
161 views

number format with fixed total digit

How to get an output of number form of a given TOTAL digit? For example, a total digit of 3, then one get 1.00 for 1. ...
5
votes
2answers
146 views

Early vs. late application of arbitrary precision

The following arbitrary-precision computations, in which arbitrary precision is applied early (to the inputs), both work as expected: ...
2
votes
0answers
101 views

Check the data of representations of Lie groups

Is there a way in Mathematica to check the data of representation of Lie groups? For example, the number of generators. the rank (or the dimension) of the representation matrices. and a list of all ...
4
votes
1answer
149 views

Self-locating Strings in $\pi$?

According to The Pi-Search Page, in the first 100 million digits of $\pi$ the following numbers are self-locating: 1, 16470, 44899, 79873884. The following inefficient code (which also does not ...
8
votes
3answers
484 views

How to write an array of repeated numbers as a single number

Let's say we have a random number consisting of an arbitrary number of digits, such as for example 3097. This number can be represented as an array of repeated numbers with Mathematica by typing <...
1
vote
2answers
56 views

Issue with Internal`RealNumberQ in list: How to tell if a given element of a list is real-valued [closed]

I define a list of zeros to the equation $y(1-\frac{1}{2}y)^4=0.1$: zeros = NSolve[y (1 - 0.5*y)^4 == 0.1, y]; I can call/make the explicit list of solutions. <...
0
votes
0answers
50 views

Decimal representation in Mathematica 10

I am using a slider to assign the value for a dynamic variable x, and want to display the value of y=10^Dynamic@x in decimal ...
0
votes
0answers
41 views

Using Rationalize to find the exact rational form [duplicate]

When I run Rationalize[2.98688387095, 0] I get $\frac{117300079}{39271724}$ However, when I run N[117300079/39271724, 50] ...
1
vote
1answer
65 views

How to add 0 to right of decimal for exported numbers

I'm using Mathematica to process some grades which are saved via Export[]. However, if I have real versions of integers, the exported numbers don't have a trailing ...
2
votes
1answer
93 views

Extracting a product of factors from an expression in unevaluated form

Suppose I have an expression like so: $\qquad {\rm expr}=2\,i\,{\rm Gamma}(4)\,\pi\, 9.93 f(x)\,g(y) \frac{h(x, 4y)^3}{11 q}$ What is best (most succinct) way to extract out only the product of ...
1
vote
1answer
92 views

Strange numerical values [closed]

I have a table of numerical values which contains a lot of strange values. ...
7
votes
1answer
154 views

Problem to import numbers longer than 19-digit with “JSON” or “RawJSON”

Bug introduced in 11.0.1 or earlier and fixed in 12.0. MMA 11.0.1.0 (Windows 10, 64-bit) I see that "JSON" import can be buggy (154245), so my question is simple: can the following behaviour be ...
2
votes
1answer
180 views

Number of digits problem

Why the following code Table[ N[i, 4], {i, 1, 2, 0.5}] do not output numbers with fixed number of digits, but gives this ...
1
vote
0answers
176 views

The binary of negative integer number

I have a question about the binary of negative integer number in Mathematica. In most implementations, negative signed integers are stored in what is called two's complement. The other major way of ...
0
votes
0answers
43 views

representing decimals with commas instead of dots [duplicate]

I want the decimal numbers in the axes of my graphs to be represented with commas instead of dots Is it possible? Does anyone know how to do it? I've made a few research, but I've got no answer. ...
1
vote
2answers
535 views

Number format of plot legend

How can I change format of numbers for bar legends. I would like to show numbers without digits after the decimal point. ...
0
votes
0answers
78 views

Can FindFormula or FindSequenceFunction be used to identify a formula for a number? [duplicate]

This is closely related to: https://math.stackexchange.com/q/2361727/10063 and is a new version of Can Mathematica propose an exact value based on an approximate one?. In Wolfram|Alpha I can input ...
5
votes
3answers
185 views

Dynamically updated AccountingForm

Bug introduced in 10.4 or earlier and persisting through 11.1.1 CASE:3918306 confirmed I freshly installed Wolfram Mathematica. I can't quite remember how to output a dynamically updated variable ...
1
vote
2answers
136 views

How can I simplfy the result of Eigenvalues? [duplicate]

As we know, the eigen vectors and eigen values of a real symmetric matrix always is are real numbers. I am trying to use the Mathematica to verify this theory. Suppose I have a matrix ...
4
votes
2answers
347 views

Using FromDigits to convert number strings to numbers

I've loved mathematics for a very long time but am only now beginning my journey to learn to code. The attached image shows the two different outputs (out-5, out 6) for a simple crypto-cypher I'm ...
9
votes
4answers
2k views

Test if number represents an integer

I can't figure out how to test if a number is an integer. I have found IntegerQ, but this function only checks if the type of the input is an integer, not whether ...
2
votes
1answer
92 views

Why N[vector[[j]]] or NumberForm[vector[[j]]] not working? [closed]

Why is N not giving the approximate result (removing the .)? vectorj = Table[j, {j, 0, 0.1, 0.01}] N[vectorj[[1]], 0] (*out=0.*) or ...
0
votes
1answer
96 views

Why is NumberForm not good with ListPlot? [duplicate]

Is NumberForm not good with the following use of ListPlot? Look at my example: vectorj = {Rationalize[0.3],NumberForm[1.2131, 2]}; ListPlot[vectorj] This is ...
0
votes
2answers
45 views

How can I retrieve an element of an array created with Range? [duplicate]

I have the following Mathematica code where I create a linearly spaced array of numbers and try to retrieve the third element: ...
0
votes
1answer
72 views

Find a number's digits in an arbitrary base [closed]

I want to write a program in Mathematica which for an input $n$ gives me a representation in a number system of base 26. For example, $$1419=2\cdot 26^2+2\cdot 26+15.$$ The output I am looking for is ...
6
votes
5answers
2k views

How to get exact Rationalize of a decimal number?

This is on Mathematica 11.1 on Windows 7. I have this value 0.97646105481464028 which I'd like to get exact rational for it. I have thought that every terminating ...