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: How to find a root of any number that isnt a decimal

Previous Thread :: Next Thread 
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 01:37 PM
Lets take the number 27, we want to find a root for this number. So we first take the number 2

sqrt(27) = ucky decimals

but lets take the third root of it
thirdroot(27) = 3

Wallah! We found a number that leaves a nice number behind, but the problem is we guessed and checked. How do we find out what number we can use without guessing and checking?
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 01:39 PM
factor 27? into 3*9 then factor it into 3x3x3? Idk, factor trees may work
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 02:00 PM
Im talking about doing it with a computer
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 02:02 PM
But the thing is, there are practically an infinite number of 'roots' you can do.

the 3.14th root of 36.337838880174696063223495599519 is 2
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 02:09 PM
yes do a factor tree. then only accept integers as potential "roots"
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 02:10 PM
I could do decimals too, even in the final result, I just dont want it to be gigantic like 5 decimals on any three numbers max
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 02:16 PM
I came up with this for guessing and checking. I dont know how I would code a factor tree

local code = 32542390589034985689034859034985890234859034895034859043
for i = 1,1000,.00001 do
local num = (code ^(1/i))
if num% 1 ~= 0 then
print('FOUND',i,num)
break
end
wait()
end
Report Abuse
lego555444 is not online. lego555444
Joined: 21 Sep 2008
Total Posts: 1383
13 Sep 2015 02:34 PM
My last resort would be to find a web api then do get requests lol
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
13 Sep 2015 02:37 PM
"dont know how I would code a factor tree"
If you even had the processing power to factor a number that big xD
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 02:38 PM
lmao
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
13 Sep 2015 02:40 PM
well i mean

sqrt(27)

find perfect square factors

if they are there then

take out perfect square, square root it

end result

3*sqrt(3)

basic math

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
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