This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
H4X0RZ's profile picture

serching for good coders to make a calculator.

Started by H4X0RZ, 14 May 2013 - 03:33 PM
H4X0RZ #1
Posted 14 May 2013 - 05:33 PM
No, I don't want want to make a little calculator that only can add etc.

I search peoplebwho can help me to make a calculator that can handle this number:

Quindezi-lli-quingenti-lli-ni-lli-mi-llion
Yes, this is a number :P/>/>/>
You can calculate it so:

15.500.000.001 × 6

The number has 93.000.000.006 zeroes at the end!

So, if there is anyone who can help, pls reply to this thread :)/>/>/>
Kingdaro #2
Posted 14 May 2013 - 05:38 PM
I don't think Lua can even support a number with that many zeroes.
H4X0RZ #3
Posted 14 May 2013 - 05:42 PM
I don't think Lua can even support a number with that many zeroes.

Damn lua limits -.-
Jarle212 #4
Posted 14 May 2013 - 05:44 PM
No, I don't want want to make a little calculator that only can add etc.

I search peoplebwho can help me to make a calculator that can handle this number:

Quindezi-lli-quingenti-lli-ni-lli-mi-llion
Yes, this is a number :P/>/>
You can calculate it so:

15.500.000.001 × 6

The number has 93.000.000.006 zeros at the end!

So, if there is anyone who can help, pls reply to this thread :)/>/>

Is the number equal to 93000000006 or is it equal to 10^(93000000006) ?

Edit: the largest integer that can be stored in one address is 9.223372036854775807E+18(none double), the largest double number is 2251799813685247E+2047(not 100% shure if possible) on a 64 bit computer
H4X0RZ #5
Posted 14 May 2013 - 05:53 PM
No, I don't want want to make a little calculator that only can add etc.

I search peoplebwho can help me to make a calculator that can handle this number:

Quindezi-lli-quingenti-lli-ni-lli-mi-llion
Yes, this is a number :P/>/>/>/>
You can calculate it so:

15.500.000.001 × 6

The number has 93.000.000.006 zeros at the end!

So, if there is anyone who can help, pls reply to this thread :)/>/>/>/>

Is the number equal to 93000000006 or is it equal to 10^(93000000006) ?

You take a one and put 93.000.000.006 zeroes at the end
Jarle212 #6
Posted 14 May 2013 - 06:01 PM
-snip-
You take a one and put 93.000.000.006 at the end

You whoul need several numbers to handle that. Could be handled like floating points are handled
Cranium #7
Posted 14 May 2013 - 06:10 PM
*COUGH*
H4X0RZ #8
Posted 14 May 2013 - 06:14 PM

bless you!
Pharap #9
Posted 15 May 2013 - 10:10 PM
I don't think Lua can even support a number with that many zeroes.

Yes it can, you just have to do the horrible trick that 32bit systems do to emulate 64 bit numbers.
An array of numbers using another bit of memory (no pun intended) to act as the carry flag.

I made a binary adder with Redpower2 circuits once, it would be like that :D/>


Goddammit, you beat me to it.
The only program that comes to mind when people say 'lua calculator' :D/>
Creeper4869 #10
Posted 16 May 2013 - 02:58 AM
Dont worry…
Frederikam #11
Posted 16 May 2013 - 03:39 AM
With multiple numbers inside an arrays I'm sure this would work. It's possible with Lua.
Pharap #12
Posted 16 May 2013 - 07:42 PM
With multiple numbers inside an arrays I'm sure this would work. It's possible with Lua.

It's possible with any language that supports the ability to store a group of numbers in memory.
In theory you could have a language that only had bytes and arrays of bytes and you could still count much further than the maximum value of a 64 bit number (commonly the largest supported value in any modern programming language).

The big issue is just that the process of performing any form of equation with the numbers would be more long winded and thus much slower.
It would also be more complicated in any language that doesn't provide a way to detect if an arithmetic overflow has occurred (something that you would have to know).