# Questions tagged [machine-precision]

For questions on the use of machine-precision real numbers (also known as floats), the numbers that can be directly manipulated through the underlying numerical capabilities of your computer system.

165 questions
Filter by
Sorted by
Tagged with
307 views

### How to tell Mathematica to treat all numbers (including those in decimal form) as arbitrary precision numbers

I have code that is essentially numerical. It uses functions like NDSolve and NIntegrate. But in most interesting cases, the ...
1k views

### DeleteDuplicates[] does not work as expected on floating point values

Here is my simple example, and in this case function DeleteDuplicates does not work as expected. I want to FindRoot of my ...
364 views

### Plot of $\sin(x^x)$ is missing from $x=143$

When plotting the graph of $\sin(x^x)$ I noticed that there is no plot from about $x=143$. I don't suppose there is a purely mathematical explanation for this? So, why is there no graph in ...
204 views

### Classification problem using SVM methods

I am running SVM on mathematica and I a used this code with classes: ...
91 views

### Wrong Limit[…] for inexact expressions

I noticed that Limit can return nonsense when using inexact parameters. In the following code, a is my (exact/inexact) parameter,...
228 views

### Bug in ListPlot?

I want to check if this is a bug before I email WR about it. I can't get ListPlot[] to make scatter plots over a very small area: ...
163 views

### Compilation, square roots, and integers

After looking at this question, particularly this answer, I wrote my own performance test, using the two functions ...
134 views

### Abnormal behavior of RealDigits[x]

In the Details of the document of RealDigits writes the following line: RealDigits[x] normally returns a list of digits of ...
109 views

### Make mathematica “forget” numbers beyond the precision goal

I need Mathematica to remember only things upto two decimal places. I'm currently using the unwieldy Floor[x*100]/100 which works but is there a better way to ...
488 views

### How to increase the precision to get the correct roots at the boundaries?

I want to solve an equation and Plot a graph of $\delta(\tau)$, where $0<\tau,\delta<1$. In principal $\delta(0)=1,\delta(1)=0$. However, when I solve the equation, the points near $\tau=1$ can'...
281 views

154 views

### Why does it matter at what point I replace?

I need to find four orthogonal linear combinations of complicated functions, that vanish at four different points. I use (LK4 is defined below, but its shape should have nothing to do with my problem)...
276 views

...
156 views

### Floating point arithmetic bug caused by Table[]

I was doing something fairly ordinary and noticed something I can't, for the life of me, explain. For context, I wanted to take make a function that takes an array of data like the one below, then an ...
150 views

### Enforcing WorkingPrecision in NIntegrate

I have a very complicated 2D integral that I need to calculate repeatedly, and I'm trying to speed it up a bit, since at the moment it's taking a couple of days to complete. One thing I've noticed is ...
883 views

### NIntegrate 2D highly oscillatory function

I am trying to integrate a function, and the error I get is greater than the result. So I need to calculate ...
159 views

### Machine precision infinity

Is it possible to obtain the machine precision (double) version of Infinity? This is useful when using LibraryLink and C ...
132 views

### Can I force Mathematica to use machine precision? [duplicate]

Some built-in functions (like Exp) give an arbitrary precision result, even when the argument is a machine precision number. Example: ...
65 views

### Which operations preserve digit precision?

Imagine I had to use numbers with a 600 precision digits. Do all mathematical operations, like +,-,...
498 views

### Reasonable choice of MachinePrecision, AccuracyGoal and PrecisionGoal for NDSolve

I am trying to use this model for later use in FindFit: ...
767 views

### How to increase significant digits in Mathematica

How can I increase the number of significant digits in Mathematica? When I import a matrix, an element like 112.5276 is rounded to 112.528. I would like to increase the number of significant digits ...
113 views

### Decimal output from a simple equation

Let x= 0.0000000000000000036; y = 1 - x If i type this in Mathematica the answer of y is 1. I want the answer to be as it ...
141 views

### How to map HoldForm?

I'm trying to compare between Sqrt[3.] and Sqrt. To display the result, I mapped HoldForm to display the expressions on the left hand column (code at end), but it seems like Sqrt[3.] had been ...
147 views

### Why am I getting wildly incorrect results from FirstPassageTimeDistribution with inexact transition matrix?

Working on some large systems using DiscreteMarkovProcess, I changed the transition matrix to machine precision vs using exact values, which sped things up handily. ...
80 views

### Unexpected behavior of subtraction with approximate numbers [duplicate]

I'm using the Table command to generate a list of values: FullForm /@ Table[10. - x, {x, 2.7, 2.8, .1}] and I get the ...
3k views

### Meaning of backtick in floating-point literal

If I compute, say, 1/3//N, Mathematica displays 0.333333 as the result. When I copy that output to use elsewhere, the paste ...
1k views

### How to get more accurate orthonormal eigenvectors?

I have a matrix M with real entries in MachinePrecision. I compute its eigenvectors and construct matrix ...
55 views

### Number precision in a list [duplicate]

I have list with elements: ...
201 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 ...
1k views

### Floating point addition not associative

Can anybody explain the following behavior? x = 0.2 + (0.3 + 0.1); y = (0.2 + 0.3) + 0.1; x == y (* -> True *) But actually the variables do not exactly ...
2k views

### Plot periodic function from Dirac delta function [duplicate]

Sorry for my bad english. I need to plot periodic function from dirac delta: δT(t)=∑δ(t–n*T), where T - is a constant, and n=-20..20 And after them, plot new function fd=f(t)*δT(t) - discrete signal ...
1k views

After my evaluations I have an error: N::meprec: Internal precision limit $MaxExtraPrecision=50. reached while evaluating ... ... 1answer 439 views ### How to use adaptive precision in matrix computations? I wish to compute the pseudo inverse of rectangular (or square) matrices by the cubically method of Chebyshev given by$X_{k+1}=X_k(3I-AX_k(3I-AX_k))$where$X_0=\frac{1}{\|A\|_F^2}A^*$. The procedure ... 1answer 252 views ### Why to do parentheses change the results of a calculation? I'm getting results that are sensitive to where I place parentheses with respect to operations that are associative1 (and should thus be insensitive to such placement). For example, if I define2 <... 1answer 134 views ### Issues with$MachineEpsilon

I'm attempting to add \$MachineEpsilon to numbers I am pulling from the domains of 3 interpolating functions. I pulled 3 numbers, and for one of these numbers adding ...
529 views

### how to calculate with just double floating point precision [duplicate]

I want to calculate with simple double floating point precision. ...
256 views

### How to improve the performance of this code

I have implemented a code in Mathematica 9 to simulate a scattering problem, and I got really disappointed about its performance when compared to Matlab. Since I am a newbie in Mathematica, would ...
175 views

### Long run time for older code that ran fast in older versions

The following code block is in Trott's Guidebook for Programming. The associated notebook says that this and a few other routines ran in a matter of seconds. I killed it after half an hour. I am ...