Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

# Questions tagged [number-representation]

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

135 questions
Filter by
Sorted by
Tagged with
1answer
117 views

### Is there a Real equivalent to FromDigits?

One can extract an Integer's digits using IntegerDigits and reassemble them into the Integer ...
4answers
4k views

### How to implement Donald Knuth's up-arrow notation

How does one enter very large numbers in up-arrow notation? Up-arrow notation was created by Donald Knuth to write very large numbers in it iterated exponentiation form, for example 6↑↑3 = 6^6^6.
1answer
836 views

### Converting strings of the form “1.34e5” to real numbers? [duplicate]

ToExpresssion doesn't understand real numbers of the form "1.34e5". How do I convert the string ...
1answer
487 views

### Machine Epsilon

I'm trying to evaluate the machine epsilon of my computer (see below). I wrote this: ...
0answers
730 views

### How to work with large numbers

How do I browse very large numbers in mathematica, say $10^{{10}^{{10}^{1.414\ldots}}}$? By browse I mean finding the $k$th decimal place before or after the decimal point. Everything I have tried ...
2answers
200 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
185 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
276 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
892 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
118 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
164 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 ...
2answers
39k 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
100 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 ...
4answers
8k views

### Convert Integer to Real [duplicate]

Is there a preferred way of converting an Integer to a Real? What I'm using at the moment is ...
4answers
3k views

### How to plot logarithmic scales

How can a simple logarithmic number line be drawn between any 2 integer values? The closest function I found in the documentation is LogLinearPlot[] and I've been ...
2answers
118 views

### How to interpret and show an input number with the amount of significant digits given?

what can I do to have Mathematica intepret and show a number with exactly the amount of digits I gave as an input? I have a larger talbe with numbers (text file, whitespace seperated) which are ...
3answers
3k views

### When can I assume that all decimal digits returned by Mathematica are provably correct?

How to Control the Precision and Accuracy of Numerical Results Arbitrary-Precision Numbers Mathematica works with exact numbers and with two different types of approximate numbers: machine-...
1answer
296 views

### Finite precision - how to get rid of “near zeros” [duplicate]

I am performing a finite-precision operation on a matrix A which I know precisely; call the result B. The operation is taking ...
3answers
1k views

### Expression of uncertainty in measurement.

I have a problem with writing a Mathematica function. I have been requested to show the results of my experiments with the measurement uncertainty (mu) like below: ...
1answer
4k views

### How do I get Mathematica to show a number in non-exponential form? [duplicate]

Sometimes I make a calculation in Mathematica that produces a big number, which Mathematica shows like so: -1.52522*10^7 This is annoying to me, because I want ...
1answer
323 views

### Is it possible to lower the bitwidth of (floating point) numbers?

The answer to this question will most probably be a definite no. Nevertheless, I would like to know whether it is possible to represent reals in the memory on less than the standard 32 or 64 bits (...
1answer
837 views

### How can I change the default output number form to accounting form?

By default, large numbers are displayed in scientific form in output like 1.2345 x 10^8 in Mathematica 8.0.4, but I would prefer having numbers in accounting form ...
1answer
844 views

### Number with no decimal mark

I'm using Mathematica to create some images and labeling them after a simple calculation done previously. As the name of the file depends on the result, I want to show it with no decimal separator (...
1answer
2k views

### Number format in Legend Labels

I would like to use the usual (new and nice) BarLegend[] with something like BarLegend[{"LakeColors", 1/10000 {-2, 2}}] which ...
2answers
751 views

### Fast Karatsuba Squaring, how to?

I want to improve timing of squaring for big numbers. So I asked What is the fastest way to split a number into parts and What is the most efficient way to add zeros to end of a number with several ...
2answers
401 views

### What is the most efficient way to add zeros to end of a number?

Beside *10^n, is there a faster way to add thousands of zeros to end of a number? Updated Timings: ...
1answer
699 views

### What is the fastest way to split a number into parts?

I have very large numbers (million digits). number = A*10^partlen + B As of now, I split the numbers by this way: ...
2answers
4k views

### Convert a string to hex number?

How can I convert a string containing a hex number such as "6b" to a hex digit that mathematica can use to do math with? I have tried using ...
2answers
771 views

### hexList[[1]] returns a list of decimal numbers

Sorry for not being clear about this question earlier. I appreciate the answers I got, but the edits I made should make the question more understandable. I have been working with hex in Mathematica,...
1answer
3k views

### Change number from real to integer [duplicate]

Possible Duplicate: Is this the most efficient way to round approximate integers to integers while leaving other Reals untouched? Please consider the following: ...
2answers
896 views

### Representation of negative exponents [duplicate]

Possible Duplicate: Way to improve “show me this decimal number to M places, don't use scientific notation”? How can I expand e.g. number 1.*10^-8 so that there would be no ...
2answers
3k views

### Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
2answers
1k views

### decompose a number (less than 255) in a sum of powers of 2

Is there a built in function that would take a number and decompose it into a sum of powers of 2? The numbers will be non negative less than 256. For what it's worth I'm trying to understand a paper ...
5answers
2k views

### Is this the most efficient way to round approximate integers to integers while leaving other Reals untouched?

This might seem like an overly simple question, but I need to specify custom plot tick marks as integers (no trailing decimal point) if they are approximately integers, but not if they are not. Using <...
7answers
3k views

### Formatting a fraction as a mixed number

Is there a command that will take a rational number and rewrite it in a mixed-number-like form? That is, I'd like to apply a command to something like 10/7 and get ...