http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Calculator Programming \ Complex Numbers

Click here to log in (you must be logged in to post comments).

AuthorComment
Zachary940
Wraith
avatar
Posted: 19 Apr 2007
18:58 GMT
Total Posts: 714
Text(0,0,H

Why is it that when H is a complex number I get an argument err, but when it is a real number it works fine.

And is there a way that I can get a complex number on the graph screen.
I've tried Strings and variables like H. All have failed.

Maybe a list would work. Hmm I'll try that.

---
It is much easier to suggest solutions when you know nothing about the problem.
allynfolksjr
Administrator
avatar
Posted: 22 Apr 2007
00:00 GMT
Total Posts: 1892
Maybe you need to set the calculator by program to complex mode?
Zachary940
Wraith
avatar
Posted: 22 Apr 2007
12:08 GMT
Total Posts: 714
Srry that would be too easy. It still gives me an argument err, no matter what mode it is in. Output works. but text does not.

---
It is much easier to suggest solutions when you know nothing about the problem.
haveacalc
Guardian
avatar
Posted: 23 Apr 2007
01:22 GMT
Total Posts: 1111
Make your own toString routine that adds "i" to the string if imag( of the number is nonzero.

---
-quoted directly from most movies that don't exist (and some that do).
threefingeredguy
Ghost
avatar
Posted: 23 Apr 2007
01:37 GMT
Total Posts: 1189
Or the ipart.

---
Someone call for an exterminator?
Zachary940
Wraith
avatar
Posted: 25 Apr 2007
07:24 GMT
Total Posts: 714
That was cake but How do I add the real part of the complex number.
EX. 2+3i

I got the 3i but How would I extract the 2.
I've looked and can not find a command that does this. Maybe I missed it.

---
It is much easier to suggest solutions when you know nothing about the problem.
threefingeredguy
Ghost
avatar
Posted: 25 Apr 2007
11:38 GMT
Total Posts: 1189
2+3i-imag(2+3i maybe?
What does fpart( do?

---
Someone call for an exterminator?
haveacalc
Guardian
avatar
Posted: 25 Apr 2007
13:18 GMT
Total Posts: 1111
>That was cake but How do I add the real part of the complex number.
Use the worst function in the world:real(! It might not work properly if you have things like xLib or Omnicalc installed, though. If you do, do what 3fg said.

fPart( returns the decimal part of the input.

---
-quoted directly from most movies that don't exist (and some that do).
banjo2E
Wraith
avatar
Posted: 26 Apr 2007
05:50 GMT
Total Posts: 689
Real(!) will come up with an error.

However, Real(X) will not.
Real(Ans) won't either.

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
haveacalc
Guardian
avatar
Posted: 26 Apr 2007
08:47 GMT
Total Posts: 1111
Contrary to what you just said, real(Ans) wouldn't work at all if Ans either was a string or contained an error (not easy to do that).
The "!" was the punctuation in my sentence. I know English has become unpopular, but I like to use it anyway.

---
-quoted directly from most movies that don't exist (and some that do).
Zachary940
Wraith
avatar
Posted: 26 Apr 2007
09:19 GMT
Total Posts: 714
Was one of my posts deleted?? I thought I already posted this bellow.

It works without xLib, but not with it.



---
It is much easier to suggest solutions when you know nothing about the problem.
banjo2E
Wraith
avatar
Posted: 26 Apr 2007
11:05 GMT
Total Posts: 689
@haveacalc: I know. I was just teasing you. Seriously.

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!
dprog
Marine
avatar
Posted: 26 Apr 2007
12:36 GMT
Total Posts: 49
banjo2E is an admin???
allynfolksjr
Administrator
avatar
Posted: 26 Apr 2007
14:14 GMT
Total Posts: 1892
No
haveacalc
Guardian
avatar
Posted: 26 Apr 2007
14:58 GMT
Total Posts: 1111
@banjo: I know. 90% of the time, I'm just being an ass.

---
-quoted directly from most movies that don't exist (and some that do).
banjo2E
Wraith
avatar
Posted: 27 Apr 2007
05:48 GMT
Total Posts: 689
Well, technically yes, but only in my own forum.

Actually, that's probably "moderator."

---
http://uncyclopedia.org/wiki/User:Administrator <------ WOOOOO!!!!!





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org