Approximated complex numbers. How I put them to zero?

In summary, the speaker is struggling with complex numbers in Mathematica and is looking for a way to set the imaginary part to zero or set a threshold for a number to be considered as zero. They are advised to use the function Chop, either with the default threshold or by setting their own.
  • #1
matteo.bina
2
0
Dear all,
I'm fighting against complicated expressions which contain complex numbers that, after some calculations and simplifications, appear in a form like: 1. + 0.I. I think that this weighs down the next calculations.
The question is: how can I put zero the imaginary part? or, in general, how can I set a threshold for a number under which it must be considered as zero?
Thank you very much!

Teo
 
Physics news on Phys.org
  • #2
Looking at your notation, I suspect you are talking about Mathematica?
In that case, you could try
Code:
Chop[x]
You can also set your own threshold, with Chop[expr, delta].
 
  • #3
Ok...thank you very much!
I was absolutely convinced to have put the Mathematica reference...I've learned: never to be convinced!
Thanks again...I will try!
 

1. What are approximated complex numbers?

Approximated complex numbers are a representation of complex numbers where the values are rounded or estimated to a certain degree of accuracy. This is often done in scientific or mathematical calculations to simplify the calculations.

2. Why would I want to put approximated complex numbers to zero?

Putting approximated complex numbers to zero can help simplify calculations and make it easier to analyze the data. It can also help eliminate any errors that may have occurred due to the approximation process.

3. How do I put approximated complex numbers to zero?

To put approximated complex numbers to zero, you can use the rounding or estimation method used to approximate the numbers in the first place. Alternatively, you can also use the absolute value function to determine the nearest whole number and then use that value in place of the approximated number.

4. Is it always necessary to put approximated complex numbers to zero?

No, it is not always necessary to put approximated complex numbers to zero. It depends on the purpose of the calculation and the level of accuracy required. In some cases, leaving the numbers as approximations may be sufficient.

5. Can approximated complex numbers be put to zero without affecting the overall result?

In most cases, putting approximated complex numbers to zero will not significantly affect the overall result. However, there may be cases where the approximation has a large impact on the final result and should be taken into consideration.

Similar threads

Replies
6
Views
541
  • Differential Equations
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
746
  • Precalculus Mathematics Homework Help
Replies
19
Views
1K
  • Precalculus Mathematics Homework Help
Replies
12
Views
967
Replies
5
Views
1K
  • Topology and Analysis
Replies
11
Views
1K
Back
Top