Questions tagged [numerical-value]

Question relating numerical representations, operations and methods, including approximate results instead of exact symbolic results.

Filter by
Sorted by
Tagged with
8
votes
2answers
3k views

Could I define 0^0 to be 1? [duplicate]

Many occasions, where I need to work numerically with functions. For a variable strictly between 0 and 1, during the optimization, it could become 0.^0 or 0^0, which then become indeterminate. Is ...
3
votes
1answer
169 views
4
votes
2answers
793 views

Why are my recursive functions running so slowly? And how do I fix them?

I am working with making numerical solvers for a modeling class I am in, and I want to use the internal recursion handling that is built into mathematcia, but there seems to be a problem. NDSolve ...
4
votes
1answer
499 views

Recognize physical constants?

Is there some way to ask Mathematica to recognize physical constants, such as 32 or 9.81 (gravitational acceleration, in different units, at Earth's surface)? I have in mind something like the "...
2
votes
3answers
434 views

Re-arranging / selecting of a data table very slow in For loop [duplicate]

My task is quite simple; I have a table of data like M = {{1,2}, {1,3}, {3,4}, {5,1}, {6,9}, {6,8}, {6,1}}; so the table is sorted with respect to the first ...
1
vote
3answers
1k views

Why is 1. x (Times[1.`, x]) not simplified to x?

This is maybe a silly question, but I could not think of any logical reason why it is not simplified automatically. I was working with a big linear equation system with some constrained inequalities ...
18
votes
2answers
679 views

Error and uncertainty propagation: Is using Precision/Accuracy a sound strategy?

Questions What are the available resources to deal with experimental error and uncertainty propagation in Mathematica? Given that Mathematica already uses linearized model of error propagation on ...
34
votes
2answers
731 views

GroupBy twice gives different results

Bug introduced in 7.0 or earlier and persisting through 11.1 It took me quite a lot of time to finally trace down to this strange output. I really don't know why. First, I create a list ...
11
votes
3answers
999 views

Solve Laplace equation in Cylindrical - Polar Coordinates

Hey mathematica stackexchange!! I've got a (possibly stupid) problem. I've tried many things to no avail, and I've read every post I've found on Laplace's equation. Background: I'm trying to find the ...
4
votes
1answer
653 views

Fixed-Point Numbers in Mathematica

I am working with a library that needs input in a Fixed Point notation. I’d like to figure out a way to convert the floating point results into fixed point representation. The fixed point length is ...
2
votes
1answer
2k views

How to use NIntegrate in a function using parameters from a list

I would like to use NIntegrate in a function with some parameters from a list. I simplified my problem for this forum. The list of parameters is as follows: ...
8
votes
2answers
292 views

Why does N[Re@f] give complex result?

Consider this code: ...
5
votes
3answers
231 views

How to plot output data of Do-command?

The following in a simple numerical solution of the simple harmonic oscillator. ...
3
votes
2answers
121 views

Role of Accuracy in numerical evaluations, SplitBy vs GatherBy

This is a follow-up question to this question. I generated a list by substituting the results of a solve[] routine and set: ...
3
votes
1answer
115 views

Solve a system of 4-th order polynomial equations (numerically)

I have a function defined on $ S^6 \times S^6 $ (two spheres embedded in $ \mathbb{R}^7 $ individually). Let us call this vector $ \vec{f}(\vec{x},\vec{y}) $, where $ \vec{x} $ and $ \vec{y} $ are ...
2
votes
2answers
681 views

Center column heading in TableForm

I have a TableForm as follows: ...
1
vote
0answers
81 views

Why the data from Do-command disagree with the plot I get using them? [closed]

This is a question relevant to How to plot output data of Do-command? The Differential Equation at hand now is $\frac{d^2 f}{dx^2} + \frac{2}{x+0.1} \frac{df}{dx} = k(f)$ I give the code with the ...
0
votes
0answers
83 views

Maintaining working precision in my program

I am badly stuck with this program I am writing. I want output of program below to be precise up to 25 digits after decimal point. I am supplying all inputs with precision 25. But after each iteration ...
0
votes
2answers
113 views

Product of large number with a very small number returns zero because Mathematica sets the very small number equal to zero [closed]

I have a product Exp[-I*Pi*x]*BesselK[-1, 2.43*Ix]. Now, Exp[-I*Pi*x] grows larger and larger as $x$ increases for imaginary ...