Skip to main content

All Questions

5 votes
2 answers
656 views

Strange results about the sine function of a big integer

I want to calculate the sine of a big integer, e.g., Sin[10^50], but found that N[Sin[10^50]], N[Sin[10^50],10], and N[Sin[10^50],20] give different results: ...
Quantum Physics's user avatar
0 votes
0 answers
44 views

How to get the correct result of the difference of two large numbers? [duplicate]

I found that when the variables of the Airy functions are complex numbers such as a=-36.3 - 63.1 I and b=-37.7- 65.4 I in the ...
user106060's user avatar
1 vote
1 answer
81 views

Why is the accuracy of NSolve's solutions for equations with multiple roots lower than the accuracy of the original coefficients? [closed]

Try the following code ...
lapcal's user avatar
  • 876
0 votes
1 answer
35 views

`NMinimize` provides wrong answer when `WorkingPrecision` is specified

I'm trying to use NMinimize to solve the 4th question of Hundred-dollar, Hundred-digit Challenge problems What is the global minimum of the function $\exp(\sin(50x)...
Jie Zhu's user avatar
  • 2,330
0 votes
0 answers
41 views

Getting better answers by smaller working precision?

I have the following code ...
Dotman's user avatar
  • 590
0 votes
1 answer
54 views

ContourPlot does not draw intersection point and draws ragged plots [closed]

I have the following implicit equation: $$ M^{-2\frac{\gamma-1}{\gamma+1}}(r)+\frac{\gamma-1}{2}M^{\frac{4}{\gamma+1}}(r) = \frac{g(r)}{g_0}\left( M_0^{-2\frac{\gamma-1}{\gamma+1}}+\frac{\gamma-1}{2}...
atapaka's user avatar
  • 4,056
0 votes
1 answer
179 views

NMinimize can not find points that satisfy constraints

NMinimize cant find solutions for a function which clearly has one. Setting a working precision resulted in some output, however with error messages about tolerance and precision. Heres my code. The ...
Dotman's user avatar
  • 590
2 votes
2 answers
175 views

How to get correct numerical result without lots of digit precisions?

I am wondering if it is possible to get the correct numerical result without computing with a lot of precisions in expressions. as a simple example suppose in the middle of some of my numerical code ...
ghadir jafari's user avatar
0 votes
0 answers
51 views

Numerical integration converging too slowly with Tanhyberbolic function

...
Tiku's user avatar
  • 51
2 votes
2 answers
276 views

How to prevent Mathematica from rounding some PDF values to 0?

Dear Mathematica community, I'm having a problem with the PDF function for the hypoexponential distribution. Specifically, Mathematica returns 0 as soon as the value is very small. Below is an example:...
user88652's user avatar
1 vote
0 answers
129 views

Kahan Compensated Summation

Is there an example/library that implements Kahan summation in Mathematica for matrix-matrix/vector-matrix multiplication? Having some trouble adapting something like this Compilation of Total with ...
chunckz7's user avatar
5 votes
1 answer
144 views

Mathematica ignores precision requirement when evaluating a Legendre function

Bug persisting through 13.1.0 [CASE:4953269] When attempting to calculate a certain associated Legendre polynomial within a given precision, Mathematica seems to ignore it if the argument is ...
Patrick.B's user avatar
  • 1,575
4 votes
2 answers
200 views

Adding numbers with defined precision produces incorrect result

I've tracked a bug in my code down to the problem of adding two numbers together, with the left argument having machine precision, e.g by 3` . The issue is, if ...
shanedrum's user avatar
  • 587
1 vote
0 answers
59 views

Controlling accuracy for code

So I have a lot of trouble controlling precision and or accuracy with Mathematica. I have tried reading up for it but in the end I get even more confused. Here is my code, it is a little long but it ...
2132123's user avatar
  • 657
0 votes
1 answer
94 views

Confusion about precision [duplicate]

When I evaluate x = 1.0000000000000000001 (* Precision of 20 digits *) Mathematica returns ...
Gert's user avatar
  • 1,752

15 30 50 per page
1
2 3 4 5
11