Questions tagged [arithmetic]

Questions on arithmetic operations in Mathematica.

97 questions
5
votes
14 answers

Sum of Squares without multiplication

I want to sum the squares for a given number N from 1 without using Multiplication. Is it possible?
user2212
  • 75
  • 2
4
votes
0 answers

Force computation on IEEE float/double

I'm checking two different procedures that will eventually be used with regular floating point arithmetic. I need to estimate numerical error arising from floating point arithmetic. Is there a way to force computation on floating point…
Radost
  • 211
  • 1
  • 4
2
votes
6 answers

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 a function f, that instead of doing what Mod does, Mod[{1, 2, 3, 4, 5, 6}, 3, 1] {1, 2, 3, 1, 2, 3} I would like to…
Mencia
  • 1,324
  • 12
  • 26
2
votes
1 answer

Can we change Mathematica's original number system for arithmetic mod p or other arithmetic systems?

It seems Mathematica has a standard arithmetic system that resembles real numbers. Can we change Mathematica's original number system for arithmetic mod p so that whenever we write expressions, it sum and multiply like arithmetic mod p?
Red Banana
  • 5,329
  • 2
  • 29
  • 47
1
vote
1 answer

Does Mathematica always return a rational number in its simplified form?

If I enter: 1/RandomInteger[10^200]+1/RandomInteger[10^200] I get (instantly) an exact fraction. Is this fraction in simplified (reduced) form? In other words is the greatest common divisor of the numerator and denominator equal to 1?.
Geoffrey Critzer
  • 1,661
  • 1
  • 11
  • 14
1
vote
1 answer

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

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
Kruz
  • 13
  • 2
0
votes
0 answers

Roots in Mathematica

Example: x = (-8)^(1/3) Return: 2 (-1)^(1/3) How simplifying? I need an answer as x = -2 Thanks!
0
votes
0 answers

How to make the built-in analytic functions to use custom multiplication?

How to make the built-in functions like Log, Sin, Exp to work as power series but with custom multiplication operation, thus defining those functions on a space with custom multiplication?
Anixx
  • 3,585
  • 1
  • 20
  • 32
-1
votes
1 answer

Could this Be a Bug in V.11.1.1.0

Here is an elementary third root calculation of -8 (or any negative real number) with and without parentheses, but Mathematica seems to be given different answers! In[1]:= -8^(1/3) // N Out[1]= -2. In[2]:= (-8)^(1/3) // N, Out[2]= 1. + 1.73205…
D. Andrew
  • 423
  • 2
  • 8
-4
votes
1 answer

Arithmetic Progression

How can I resolve these issues? I'm from Brazil and I don't have many things related to the subject here ** In an arithmetic progression of 6 Terms, the reason is 5. The product of the 1° with the latter is 12500. Determine the value of 3° Term Ps.…