Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,529

Indeed I have been working on a Complex Number Calculator

It can only do + - × / and ^ so far. And it may get those wrong.

I have had a lot of difficulty "parsing" and "walking" the formula, but I figure it is worth it - it is easier, and much more elegant, to write the formula than to enter the real and imaginary into different boxes and press function keys.

Could you pose it a few problems and see how it goes?

(Oh, and it is a real number calculator, too!)

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

5^i = -0.0386319699339353+0.99925350682348i

i(54i-3i^3)^5 + 9i - i^i^i + 3 = 3+601692067i

Interpreted Formula: ((((UNKNOWN(((54*i)-(3*(i^3)))))^5)+(9*i))-((i^i)^i))+3

0i + 4i - 0^0 + 0^i - i^i^i^i^i^i = -1.20787957635076+4i

i/0 = NaNNaNi

i^2i^3i^4i^5i^6i^7i^8i^9i = i

i^(2i*3i*4i*5i*6i*7i*8i*9i) = 1

I have no idea if any of these are right or wrong, but it seems to handle all sorts of weird things. (The last two seem contradictory, though.)

El que pega primero pega dos veces.

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

ryos wrote:

i^2i^3i^4i^5i^6i^7i^8i^9i = i

i^(2i*3i*4i*5i*6i*7i*8i*9i) = 1(The last two seem contradictory, though.)

maybe thats because the first one is (i^2)*(i^3)*(i^4) and not the second one which would be i^(2i)^(3i)

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,529

ryos wrote:

Interpreted Formula: ((((UNKNOWN(((54*i)-(3*(i^3)))))^5)+(9*i))-((i^i)^i))+3

Well that one is obviously wrong, because it thinks i() is a function - I shall have to teach it otherwise

I hope to extend the functions it knows to sin, cos, sinh, etc etc

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,529

OK I have added a heap of functions to the Complex Number Calculator.

I have done some testing, but I need more done ... please

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

I typed

5+6[ENTER]

and the text disappeared.

Isn't it supposed to perform the calculation with [ENTER]?

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,529

What a good idea ... I have made it respond to the Enter Key.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

Very nice calculator. Here's something that I think might be weird, but I could have easily made a mistake.

Ryos's post made me decide to try out i^i. Its answer for that is ~0.2 + 0i.

It's a standard identity that e^(iθ) = cosθ + isinθ.

Therefore, i = e^(i*π/4)

Substituting this into the original gives [e^(i*π/4)]^i.

Using the laws of indices, we can the turn that into e^i²π/4 = e^-π/4.

But then putting that into the calculator gives you ~0.7 + 0i, even though it's equivalent to i^i.

Have I gone wrong somewhere?

Why did the vector cross the road?

It wanted to be normal.

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

It's a standard identity that e^(iθ) = cosθ + isinθ.

Therefore, i = e^(i*π/4)

sin(pi/4) ≠ 1

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,529

Slightly newer version (v0.91). Should be able to type in e^(-pi/4) and it figures out the right order of calculation.

I also added a "cis" format button so you can see the result in polar form. Fun with e^() type entries.

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 12,962

Outstanding!

The Complex Number Calculator is very good, very well created!

Initially (that was some days back), I couldn't see the number keys and the operation keys.

I used the keyboard keys, the calculator works perfectly well!

I even tried functions like e^(i*pi) and found the results correct!

Commendable work, MathsIsFun!

Character is who you are when no one is looking.

Offline