Qbasicnews.com

Full Version: Better Looking Calculator. (File Updated 04/26/05)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Found some weird things already though.

First of all, your calculator states the following:
Code:
Sqr(-a) = b / 0   { with a >= 0, b >= 0 }
note that Sqr(-1) is definetly not equal to Sqr(-2) or 4 / 0 Wink
(the answers to these are btw: i, sqr(2) * i, and infinity respectively).

Secondly, when I press the +/- sign first, then type a number, the zero stays attached on front, so I could type numbers like 0482.

^_^
@Neo (Post 1)
Right, I had tried it thinking that it activate the X, must have not done it right, got it to work tho... :wink:

@Neo (Post 2, Error found 1)
Not exacly following you on that error. But what it seems,. when I divide something by 0, I get "1.#INF".. And when I square root a negetive, I get the same thing... You do know standard calcs, or any as far as I know, can't SQR a negative right? :???:

(.. Error found 2)
Oh, heh, I'll try and figure that out,. :roll: :wink:
The square root of a negative number is defined as the square root of the absolute value of that number, times i, the complex constant.

So:

Sqr(-a) = Sqr(a) * i { for a >= 0 }

Most simple calculators don't have this implemented though (which actually makes them faulty, but ok). =)
^_^

I'm glad you fixed the errors =)
Smile Oh, so you ment you wanted me to add support for squaring negatives..

IF num <= 0 THEN 'Check for negative
-(num) 'Change to positive
SQR(num) 'Square
dspl$ = STR$(num) + " * i" 'Display

Output (number * i)

Is this what you mean?

Yeah, I fixed the:

0444, & exit on pressing X,. :wink:
Good good =)

About i...
Note that there's more on i than just that Smile
First of all:
Quote:i^0=1
i^1=i
i^2=-1
i^3=-i
i^4=1
and so on
Simply because i = sqr(-1) so i^2 = -1

Also it has been proven that
e^(i * y) = cos(y) + i * sin(y) { with y being any real number }
(e is the mathematical constant of differential equality... or something, it's 2.7182818284590452353602875... (infinite numbers like PI).

If you want more about complex numbers... =) http://www.clarku.edu/~djoyce/complex/ or any other googled link Wink

Hehe, just details Wink Would be fun if it were implemented though.
But first make sure it works very good ^_^
:rotfl:

Isn't that a bit much for a simple calc? So if I add that i support like I did above, I need all that other stuff to render too? :???: Or just the trailling "i" good enough for my calc?

:lol: Funny, Algebra never bothered to mention all that on "i",. oh well.. :wink: .. Thats a higher math isn't it tho? Smile
Neo, I think he just wanted to make a simple calculator. Imaginary numbers aint exactly simple Smile
Hehe I was just saying it existed Big Grin
And yes, there is a lot about complex (I don't like calling them imaginary) numbers, and it's not easy no =)

And yeah... it's relatively higher math. In what I study (Aerospace Engineering) the complex numbers are essential, as with many other university studies.

Smile Fun to see you like it though Wink
Rather than just supporting real or imaginary numbers, it would be better to support complex numbers (which have both a real and imaginary part).

If you did this, you could also add stuff like a complex conjugate button, etc.

When you first made this post, I wasn't going to say anything, but you haven't noticed yet so I suppose I should: you've mis-spelt 'calculator' on your main window. Smile

I agree with Neo: it would be cool to have e.

These buttons would be good additions (no pun intended Wink):

* pi
* e
* ln
* log
* x^y
* 10^x (normally this button is labelled 'EXP' on calculators)
Quote:And yeah... it's relatively higher math. In what I study (Aerospace Engineering) the complex numbers are essential, as with many other university studies.

Smile Fun to see you like it though :wink:

lol,. I'm going for Automotive Designer, but I read I need to know Engineering also,. :lol: ,. so a engineer doesn't have to redesign what I've done... :wink:

And high in math intrests me, yes.. Smile :wink:

@Shift.. Really,. *goes looks*.... AH! darn,.. oh well, can fix that quick,. lol. :wink:

Hmm,. thinks I'll do a scientific calc later on with those opps.. :wink: I'd have to redesign everthing for such modifictions..
Pages: 1 2 3 4 5