Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
32 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 ...
3
votes
1answer
47 views

NumberForm and Precision

With MachinePrecision this construction works as expected ...
2
votes
1answer
79 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
46 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
110 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
88 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
54 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 ...
7
votes
3answers
434 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
55 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
35 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
33 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
54 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
88 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
85 views

Strange numerical values [closed]

I have a table of numerical values which contains a lot of strange values. ...
5
votes
0answers
55 views

Problem to import numbers longer that 19-digit with “JSON” and “RawJSON”

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 repeated and, if so, is it a bug? (excuses if I've missed ...
2
votes
1answer
155 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
91 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
39 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
246 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
52 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
179 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
67 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
261 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 ...
7
votes
3answers
927 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
66 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
51 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
43 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
63 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
1k 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 ...
4
votes
2answers
372 views

Is there a command that does exact numerical conversion of non-exact to exact numbers?

I generally prefer to do all my intermediate calculations with exact numbers, and then round my result at the end. Thus I will typically convert each arbitrary-precision number to its exact equivalent;...
2
votes
2answers
107 views

How to directly use formatted numbers (e.g. AccountingForm) in calculations?

The documentation for AccountingForm states: AccountingForm acts as a "wrapper", which affects printing, but not evaluation. However, ...
2
votes
1answer
124 views

How to plot data that are already in scientific form? [duplicate]

I've got an array of data shown in scientific form. Which looks like this: x = {0.0001,ScientificForm[0.999890436521418]} Now I'm trying to use ListPlot to plot ...
1
vote
1answer
60 views

Calculating a 64-bit integer from 8 one-byte integers

I have 8 bytes expressed as integer values stored in a list. They correspond to a 64-bit counter with the lowest significant byte at first position. Here is an example what I am doing: ...
4
votes
2answers
82 views

StringTemplate does not respect NumberFormat

I am trying to write Latex report generator for my standard data analysis. But there is an issue with formatting numbers I can not get around. I would like to make use of my own ...
0
votes
1answer
58 views

How to switch a number back from AccountingForm? [closed]

I am working with a function that returns output in AccountingForm format. I would like to do math with that output, but Mathematica does not recognize it as ...
8
votes
1answer
154 views

Arbitrary-Precision Arithmetic behaves unexpectedly

I want to understand how small numerical errors propagate through a computation and may drastically change the final result. To this end, I consider a toy world in which every number is limited to ...
0
votes
1answer
121 views

How do I get Mathematica to write the coefficients of polynomial as fractions rather than decimal expansions? [duplicate]

I am trying to have Mathematica find the polynomial of degree $n$ in a single variable which fits the given points $(x_1,y_1),\dots, (x_{n+1},y_{n+1})$. In the examples I am concerned with, the ...
4
votes
3answers
142 views

find and count the number of solutions without multiplicity in Solve?

I would like to solve a Diophantine equation and find its solution, but I need only count one time for each $a$, i.e., when for some $a$ it found some $x,y,z$, then go to the next $a$. more precisely ...
4
votes
2answers
382 views

Representation of Rational Numbers

Following up on this question I would like to understand the way MMA represents rational numbers. First of all, as Carl Woll suggested, x/y is not a simple ...
11
votes
2answers
663 views

Understanding simple numerical calculation

I am trying to understand why N[0.1]//FullForm returns 0.1' (A). Indeed, $0.1$ in base two is $0.000110011001100110011...$. If I ...
4
votes
1answer
75 views

ExponentFunction not respected in NumberForm when typesetting zero?

Let's try to typeset a couple of numbers with a precision accuracy of 4: 0``4 1``4 1000000``4 I do not want the numbers returned with ...
3
votes
2answers
78 views

Dynamic Interpretation Button Label Loses Formatting on Copy and Paste

I have an Interpretation Button that displays its label correctly on evaluation. However, when I copy and paste it as input the ...
8
votes
3answers
374 views

How to format a number with an error?

I'm having a surprising amount of difficulty in trying to format some numbers with errors. I can't find any previous attempts to do this here or elsewhere and it would surely be of use to the ...
1
vote
1answer
113 views

Mathematica Input to get the exact form [duplicate]

Question: Is there a command in mathematica that can take a decimal input, and output it into its exact form? The question arose when I tried to use this command: ...
2
votes
1answer
67 views

Unexpected behavior from `NumberForm` of a matix [duplicate]

If I calculate the dimension of the matrix after NumberForm directly, then there will be something wrong ...
2
votes
2answers
133 views

Changing threshold for scientific notation from 10^6 so that InputField display is uniform

Related to but different from this question. I'd like my InputField to display scientific notation not only for numbers larger than one million, but also for ...
1
vote
1answer
66 views

e approximations [closed]

Can you help me? I'm writing program to calculate e with given percision (not using function from Mathematics) by using e=sum (1/k!) k=0 to infinity. I have this: ...
3
votes
3answers
144 views

Showing more decimals in number calculated in While loop

I'm new to Mathematica and am not sure why I cannot show more decimal points in a variable. I am using Newton's Method to find the zero's of a function and I'm trying to print the x value of the zero. ...
6
votes
1answer
140 views

Why 2^^1*^k does not work?

Table[2^^1*^k,{k,0,10}] This gives an error, why is that? Also this BaseForm[2 ** 1*^ #, 16] & /@ Range[10] What is ...
3
votes
0answers
125 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. ...