Questions on arithmetic operations in Mathematica.

learn more… | top users | synonyms

0
votes
1answer
43 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 ...
64
votes
2answers
696 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 ...
4
votes
2answers
150 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 ...
18
votes
1answer
398 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
102 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 ...
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?
2
votes
1answer
175 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 ...
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?
1
vote
1answer
218 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 ...
0
votes
0answers
160 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 ...
7
votes
2answers
202 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 ...
24
votes
2answers
515 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
190 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 ...