Better Looking Calculator. (File Updated 04/26/05) - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +---- Forum: FB Projects (http://qbasicnews.com/newforum/forum-16.html) +---- Thread: Better Looking Calculator. (File Updated 04/26/05) (/thread-6845.html) |
Better Looking Calculator. (File Updated 04/26/05) - Neo - 04-16-2005 Found some weird things already though. First of all, your calculator states the following: Code: Sqr(-a) = b / 0 { with a >= 0, b >= 0 } (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. ^_^ Better Looking Calculator. (File Updated 04/26/05) - Rattrapmax6 - 04-17-2005 @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: Better Looking Calculator. (File Updated 04/26/05) - Neo - 04-17-2005 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 =) Better Looking Calculator. (File Updated 04/26/05) - Rattrapmax6 - 04-17-2005 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: Better Looking Calculator. (File Updated 04/26/05) - Neo - 04-17-2005 Good good =) About i... Note that there's more on i than just that First of all: Quote:i^0=1Simply 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 Hehe, just details Would be fun if it were implemented though. But first make sure it works very good ^_^ Better Looking Calculator. (File Updated 04/26/05) - Rattrapmax6 - 04-17-2005 :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? Better Looking Calculator. (File Updated 04/26/05) - KiZ - 04-17-2005 Neo, I think he just wanted to make a simple calculator. Imaginary numbers aint exactly simple Better Looking Calculator. (File Updated 04/26/05) - Neo - 04-17-2005 Hehe I was just saying it existed 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. Fun to see you like it though Better Looking Calculator. (File Updated 04/26/05) - shiftLynx - 04-17-2005 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. I agree with Neo: it would be cool to have e. These buttons would be good additions (no pun intended ): * pi * e * ln * log * x^y * 10^x (normally this button is labelled 'EXP' on calculators) Better Looking Calculator. (File Updated 04/26/05) - Rattrapmax6 - 04-17-2005 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. 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.. :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.. |