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

learn more… | top users | synonyms

52
votes
2answers
2k views

When I can 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-...
16
votes
5answers
959 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 <...
8
votes
1answer
253 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 (...
9
votes
3answers
963 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: ...
3
votes
2answers
691 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,...
5
votes
3answers
201 views

How can I improve NumberString?

I would like to test strings to see if they represent numbers. This should include number representations with precision marks and scientific notation. NumberString ...
7
votes
2answers
290 views

Mod[1.2, 0.2] is not equal to zero

Why doesn't the following expression evaluate to zero? In[1]:=Mod[1.2, 0.2] Out[1]=0.2 Edit: This is what I wanted to do: ...
2
votes
3answers
106 views

Testing for a vector of reals [closed]

Suppose I define: RealVector[expr_]:=VectorQ[expr,NumberQ[#]&&Head[#]===Real)]; Then: ...
1
vote
1answer
76 views

Calculations after NumberForm [duplicate]

As specified in documentation center the functions AccountingForm, NumberForm, etc. are useful only to display numbers in ...
0
votes
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 ...
22
votes
3answers
755 views

Real Numbers in the Wolfram Language

Epilog: Much of the discussion in the answers below revolves around the distinction between Real as a data type and real numbers as a domain or class of numbers (irrespective of the form in which ...
9
votes
2answers
3k 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 ...
3
votes
2answers
569 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?
5
votes
2answers
146 views

Display All Output Numbers in HEX

How might I modify Mathematica such that I can get the following functionality when working with HEX values. The odd lines are input and the even output. Red values should be the HEX values. ...
5
votes
2answers
150 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 ...
4
votes
2answers
377 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: ...
2
votes
1answer
87 views

Converting a quantity to a decimal form [closed]

I have a function giving me this: (5 Coulomb)/(6 Second) as output. I want this in decimal form and would like to have the variables taken off the end for unit ...
1
vote
1answer
386 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: ...
-1
votes
1answer
399 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 ...