wolfram mathematica - why there is a difference in the result of addition in mathamatica? -


Iam 32 is trying to solve linearly coupled differential equations, where, when I add them before solving them, they should be canceled and the result should be.

Absolutely zero because the coefficient is such but it is showing a zero zero value in 10 ^ -6 that I do not want As it can be seen in the following program. When I add all 'A' and 'W' values ​​(coefficient), they are zero, but when I combine them together it is giving a non-zero value. Can some help please ?? (ROSE & Lilly are individually zero but why is LOTUS zero?)

  A1 = 507762.5`; A2 = 12 940.625`; A3 = 18134.375`; A4 = 1.468884375` * ^ 6; A5 = 489628.125`; A = -2.61135 * 6; W1 = -571 9 67.7214761395`; W2 = -190655.90715871312`; W3 = 571 9 67.7214761395`; W4 = 190655.90715871312`; Rose = A1 + A2 + A3 + A4 + A5 + A; Lilly = W1 + W2 + W3 + W4; JASMINE = ROSE + LILLY LOTUS = A1 + W1 + A2 + W2 + A3 + W3 + A4 + W4 + A5 + A    

Your answer is incompatibility in response to your exact exact mathematical set. The rule of thumb is that the digit length after decimals is high, and you need more accuracy. For example, requiring high precision to maintain all the decimal parts described in your code W3 from variables A1 .

However, I believe that mathematics maintains a standard precision for all calculations, unless you specify it. You can specify exact for an arbitrary value in mathematics by ordering SetPrecision . If you now specify an exact, say 50, in all the variables, the incompatibility disappears. Hope it helps!

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -