Jump to content




Advanced Calculator


  • This topic is locked This topic is locked
54 replies to this topic

#41 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 25 February 2013 - 07:31 PM

When you think about it, dividing by zero should equal infinity. When you say 4/2, you ask, "how many two's go into the number 4?" The answer is of course 2. When you say 4/0, you ask, "how many zeros go into 4?" As 0*0*0*0... will always equal zero, the answer is Infinity.

#42 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 February 2013 - 02:00 AM

View PostDlcruz129, on 25 February 2013 - 07:31 PM, said:

When you think about it, dividing by zero should equal infinity. When you say 4/2, you ask, "how many two's go into the number 4?" The answer is of course 2. When you say 4/0, you ask, "how many zeros go into 4?" As 0*0*0*0... will always equal zero, the answer is Infinity.
That's actually a good way of illustrating it. I'm still not changing from divide by zero being infinity, as that's how many languages handle it. That, or NaN errors.

#43 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 26 February 2013 - 03:47 AM

I have one suggestion:

Please use normal numbers for the outcome, because I can hardly read them. You should do a poll if you are going to do this

#44 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 26 February 2013 - 04:10 AM

View PostDlcruz129, on 25 February 2013 - 07:31 PM, said:

When you think about it, dividing by zero should equal infinity. When you say 4/2, you ask, "how many two's go into the number 4?" The answer is of course 2. When you say 4/0, you ask, "how many zeros go into 4?" As 0*0*0*0... will always equal zero, the answer is Infinity.
no, you cant devide by zero
its undefined

#45 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 February 2013 - 04:29 AM

View PostPixelToast, on 26 February 2013 - 04:10 AM, said:

no, you cant devide by zero
its undefined
YOU CAN IN PROGRAMMING! DEAL WITH IT!

#46 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 26 February 2013 - 04:38 AM

no you cant, you just simply check for it
if you REALLY devided by zero it would just loop forever

#47 Lightning101

  • Members
  • 5 posts

Posted 26 February 2013 - 06:01 AM

How about the M+ key you get on a lot of calculators?
Or a square root function using math.sqrt?

#48 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 February 2013 - 08:39 AM

View PostPixelToast, on 26 February 2013 - 04:38 AM, said:

no you cant, you just simply check for it
if you REALLY devided by zero it would just loop forever
Still not gonna change it. Learn to love it.

View PostLightning101, on 26 February 2013 - 06:01 AM, said:

How about the M+ key you get on a lot of calculators?
Or a square root function using math.sqrt?
The memory key was a pain to try to add, but there is a square root function already implemented. And it does use math.sqrt.

#49 momona5

  • Members
  • 14 posts

Posted 20 March 2013 - 11:55 AM

Can I use this in my OS? Also If I did how would I change it, because I can't find the "OFF" button code.

#50 AnDwHaT5

  • Members
  • 244 posts

Posted 20 March 2013 - 12:01 PM

I will find a way to error it it shouldnt be to hard :P im the master at spamming numbers.

#51 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 20 March 2013 - 03:10 PM

View PostAnDwHaT5, on 20 March 2013 - 12:01 PM, said:

I will find a way to error it it shouldnt be to hard :P im the master at spamming numbers.
you sure?
because everything is error checked

#52 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 20 March 2013 - 03:13 PM

View Postmomona5, on 20 March 2013 - 11:55 AM, said:

Also If I did how would I change it, because I can't find the "OFF" button code.
The code to exit the program is on lines 273 — 278 ... but I don't understand why you would want to change it ...

#53 Shazz

  • Members
  • 175 posts

Posted 20 March 2013 - 03:36 PM

View PostDlcruz129, on 25 February 2013 - 07:31 PM, said:

When you think about it, dividing by zero should equal infinity. When you say 4/2, you ask, "how many two's go into the number 4?" The answer is of course 2. When you say 4/0, you ask, "how many zeros go into 4?" As 0*0*0*0... will always equal zero, the answer is Infinity.

How many 2's in -4? It's -2. How many 0's go into -4? It will be negative infinity.
So, using your logic, dividing with zero will not always give you positive infinity.
And what about this:
4/2 = 2
8/2 = 4
4 > 2
Therefore 4 and 8 are not equal.

Using your logic:
4/0 = INF
8/0 = INF
INF == INF
Therefore 4 == 8???

Also, consider this. Since division is the reverse of multiplication, take this for an example:
8/2 = 4
8x4 = 2

8/0 = INF
8 x INF = 0??


Any number divided by 0 is undefined.
But since it returns infinity in Lua, I think this calculator should keep it for consistency.

#54 mrdawgza

  • Members
  • 110 posts
  • LocationSouth Africa

Posted 05 December 2014 - 06:33 PM

Does it have scientific notation?
Like when you do 9999999 x 99999999 would answer 999999890000001,
then in scientific notation it would be
9.99999890000001 x 10(14)
The (14) is what the 10 is powered to.

Edited by mrdawgza, 05 December 2014 - 06:37 PM.


#55 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 05 December 2014 - 10:00 PM

View Postmrdawgza, on 05 December 2014 - 06:33 PM, said:

Does it have scientific notation?
Like when you do 9999999 x 99999999 would answer 999999890000001,
then in scientific notation it would be
9.99999890000001 x 10(14)
The (14) is what the 10 is powered to.
You quite expertly rose this topic from the dead. I don't really support this calculator anymore, but if you'd like to fiddle around with it, you're more than welcome.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users