Questions on arithmetic operations in Mathematica.

learn more… | top users | synonyms

1
vote
1answer
63 views

Why I'm getting 9999s after decimal and how do I fix it? [duplicate]

Check the screen shot. Why I'm getting 999s? It is suppose to be 127,977.52 Thanks in advance, Quick solution: AccountingForm[58156.48 + 69821.04, 16] And thanks to Yves Klett
0
votes
1answer
52 views

A problem with getting a coefficient

I try Coefficient[E^(I a (t - b)), E^(I a t)] and expect the output E^(-I a b) but in fact I get ...
2
votes
1answer
39 views

A question about expanding complex functions of real arguments

I have the following problem. There is such an expression as: P[x_,y_] := z[y] E^(I beta x) + Conjugate[z[y] E^(I beta x)]; The variables ...
0
votes
1answer
50 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 ...
4
votes
2answers
163 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 ...
70
votes
2answers
867 views

Why are numeric division and subtraction not handled better in Mathematica?

There is something that has been troubling me for a while. At least in version 7, the performance of a / b and a - b is not ...
20
votes
1answer
457 views

Is there a difference between Divide[a,b] and a/b?

In this comment it was asserted that Divide[a,b] and a/b are different, though the documentation indicates that they are the ...
0
votes
1answer
110 views

arthmetic progression problem series upto 40 terms? [closed]

Find the sum of series 5+7+9+10+13+13+17+16+....., upto 40 terms? Please help i am facing problem while solving this question.i have tried my best to solve this but unable to find the common ...
2
votes
1answer
197 views

Expressing large numbers in index form

I have a quick question. Is there anyway of expressing a large number as a power of another number in Mathematica? By this, I mean for example, $1237940039285380274899124224 = 512^{10}$. Is there a ...
2
votes
6answers
268 views

Is there any function that creates an array from 1 to n, repeating each value m times?

I am trying to implement SparseArray, using the function With to give the condition for different matrix elements. I would need ...
1
vote
1answer
226 views

Why is arithmetic faster for inexact arithmetic?

I have been trying to compute eigenvalues of a rather sizable matrix A, about $500 \times 500$ (but sparse). I asked Mathematica to compute ...
7
votes
2answers
204 views

Is there a way to show the details of a numerical computation?

I have recently started using Mathematica as a calculator while teaching (definitely overkill, but I try to use as few tools as possible). I would like my students to be able to trace simple numerical ...
0
votes
0answers
164 views

Rounding values [duplicate]

In Mathematica 8 when I enter 1 - 0.99 - 0.01 I get 8.67362*10^-18 instead of zero. How do I fix this problem? I am getting ...
25
votes
2answers
529 views

Should 0 * 5ft be 0 or 0ft?

After playing with the new quantity system in Mathematica 9 for a while, I keep stumbling over this issue: 0 * Quantity[1, "Meters"] is not the same as ...
1
vote
0answers
84 views

Non Commutative Multiply [duplicate]

Possible Duplicate: Non-commutative symbolic linear algebra I want to multiply two matrices, for example, A = {{e, f}, {g, h}} B = {{a, b}, {c, d}} ...
5
votes
1answer
205 views

Why can't I remove Orderless from Plus?

I am making some random algebra equations, and I want to have the ordering be random too, such that if my random equation generator makes x+1, the output stays ...
5
votes
14answers
1k views

Sum of Squares without multiplication

I want to sum the squares for a given number N from 1 without using Multiplication. Is it possible?
9
votes
3answers
3k views

Expressing a decimal as a fraction in lowest terms

How can I express a decimal such as 0.1845095405274387 as a fraction in its lowest terms?