generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: using Very Large Numbers

Previous Thread :: Next Thread 
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:30 AM
Inspired by this btc boom, I am trying to do some RSA in ROBLOX. After a few minutes, I realized that Lua could not handle large numbers (155 digits+) and simply 'rounded up' to infinity.

Does anybody know a way around it?
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 03:35 AM
Your computer can't handle numbers like that.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:38 AM
I decided to start using smaller numbers, 11, 13, 17

d=11^13^17

Still insanely large, but my computer CAN handle it. In this case it's definitely Lua's fault.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 03:40 AM
No, google binnary. Every calculator(computer in nutshell) has limit.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:44 AM
My calculator on my computer could compute 11^13^17 while Lua can't.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 03:50 AM
Well, probably Lua can't access enough memory for that huge numbers. And why would you ever need numbers like that?
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 03:53 AM
You could store value on string, but you'd need to find way, how you'd calculate and save with system like that.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:54 AM
RSA is often called public-key cryptography. It uses very large numbers. Bitcoin uses it.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:55 AM
That's a good idea, not sure how I'd work it though. In the end I would have to use maths at one point (I think) so maybe not.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 03:57 AM
Try doing math in binnary, then find way how to convert it to numbers.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 03:59 AM
I suppose that would work. The way I'm thinking, it would involve having a table full of 'true's and 'false's. Don't think I'm good enough at maths, though.

Thanks for the help, btw.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 04:01 AM
I'll ask dr01d about this. He is great at creating algebric classes for Lua.
Report Abuse
harryx is not online. harryx
Joined: 25 Oct 2008
Total Posts: 3209
05 Apr 2013 04:06 AM
Thanks :)
Report Abuse
lah30303 is not online. lah30303
Joined: 15 Feb 2008
Total Posts: 10027
05 Apr 2013 05:05 AM
You could look up the source code for Java's BigInteger class and try to make something similar to that. I think it has something to do with having an array of integer values, and the actual value is the addition of all those values. I'm not certain.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Apr 2013 05:20 AM
c++ time <3
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 05:26 AM
Still spamming?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Apr 2013 05:31 AM
ugly guyaboveme
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
05 Apr 2013 05:33 AM
12 years old boy above.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Apr 2013 05:33 AM
Your some years off, but, unlike you, idgaf about your life.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
05 Apr 2013 07:23 AM
Why would zars not care about his life?
Why would you even care?
Why are you still posting?
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
05 Apr 2013 07:28 AM
Take a few integers of a certain length, line them up, and connect the ends. Boom, bigger numbers.

This is a completely unsarcastic response, but I'm withholding some information for you to figure out.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
05 Apr 2013 07:33 AM
By the way, the biggest possible number for Roblox (to print without getting inf) is

179769313486230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

As for your question - data types have limits, Roblox uses doubles and floats.
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
05 Apr 2013 07:34 AM
Myrco, he is just your fan =D! Spamming the forum!
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
05 Apr 2013 07:40 AM
You can make integers as big as you want as long as you have the RAM to store them, and the patience to process them.

Figuring out how to do math with these bigger integers probably wouldn't be much fuss either.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
05 Apr 2013 07:42 AM
@awsum: Indeed.

Let's ship some yottabytes lol.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image