-
Posts
1903 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by fiveworlds
-
Easier explained as computers use databases to do mathematics. Each binary string corresponds to a memory location representing a number.
-
Imagination does basically nothing at the end of the day. The time taken to solve problems is far higher than the time taken to verify the solutions to already known problems. A basic standard of education is a necessity to even understand most modern day problems. Of course you can learn material online but you have to be fairly devoted to your education to be capable of educating oneself. However the ability to educate oneself is in some ways more impressive than the ability to rote learn but this education has to be recognized formally and unfortunately it rarely is. I was fairly lucky I recently started college at 23 since I didn't have the funds to start education before this however I was able to get recognition of prior learning for a lot of my modules as a result me putting the work in and learning things online.
-
The point was that the time in calculating is lost in generating the massive list instead of just checking it against a database. This is much faster <script> function fact(n){ var factorial = [ "1", "1", "2", "6", "24", "120", "720", "5040", "40320", "362880", "3628800", "39916800", "479001600", "6227020800", "87178291200", "1307674368000", "20922789888000", "355687428096000", "6402373705728000", "121645100408832000", "2432902008176640000", "51090942171709440000", "1124000727777607680000", "25852016738884976640000", "620448401733239439360000", "15511210043330985984000000", "403291461126605635584000000", "10888869450418352160768000000", "304888344611713860501504000000", "8841761993739701954543616000000", "265252859812191058636308480000000", "8222838654177922817725562880000000", "263130836933693530167218012160000000", "8683317618811886495518194401280000000", "295232799039604140847618609643520000000", "10333147966386144929666651337523200000000", "371993326789901217467999448150835200000000", "13763753091226345046315979581580902400000000", "523022617466601111760007224100074291200000000", "20397882081197443358640281739902897356800000000", "815915283247897734345611269596115894272000000000", "33452526613163807108170062053440751665152000000000", "1405006117752879898543142606244511569936384000000000", "60415263063373835637355132068513997507264512000000000", "2658271574788448768043625811014615890319638528000000000", "119622220865480194561963161495657715064383733760000000000", "5502622159812088949850305428800254892961651752960000000000", "258623241511168180642964355153611979969197632389120000000000", "12413915592536072670862289047373375038521486354677760000000000", "608281864034267560872252163321295376887552831379210240000000000", "30414093201713378043612608166064768844377641568960512000000000000", "1551118753287382280224243016469303211063259720016986112000000000000", "80658175170943878571660636856403766975289505440883277824000000000000", "4274883284060025564298013753389399649690343788366813724672000000000000", "230843697339241380472092742683027581083278564571807941132288000000000000", "12696403353658275925965100847566516959580321051449436762275840000000000000", "710998587804863451854045647463724949736497978881168458687447040000000000000", "40526919504877216755680601905432322134980384796226602145184481280000000000000", "2350561331282878571829474910515074683828862318181142924420699914240000000000000", "138683118545689835737939019720389406345902876772687432540821294940160000000000000", "8320987112741390144276341183223364380754172606361245952449277696409600000000000000", "507580213877224798800856812176625227226004528988036003099405939480985600000000000000", "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000", "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000", "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000", "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000", "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000", "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000", "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000", "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000", "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000", "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000", "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000", "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000", "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000", "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000", "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000", "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000", "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000", "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000", "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000", "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000", "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000", "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000", "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000", "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000", "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000", "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000", "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000", "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000", "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000", "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000", "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000", "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000", "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000", "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000", "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000", "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000", "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000", "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000" ]; if(factorial[n]){document.write(factorial[n]);} else{document.write("overflowerror");} } fact(99); </script> You can easily get 9999 factorial by curling this page http://www.calculatorsoup.com/calculators/discretemathematics/factorials.php dunno if there is a better list elsewhere. You could just try doing projecteuler though... https://projecteuler.net/problem=551 Let's look at the practicalities of the given list when applied to standard python. Every number storable in python is already in the provided list. double 1.7977e+308 factorial(171) single 3.4028e+38 factorial(single(35)) uint64 264-1 factorial(uint64(21)) int64 263-1 factorial(int64(21)) uint32 232-1 factorial(uint32(13)) int32 231-1 factorial(int32(13)) uint16 216-1 factorial(uint16(9)) int16 215-1 factorial(int16(8)) uint8 28-1 factorial(uint8(6)) int8 27-1 factorial(int8(6))
-
To calculate a factorial you must Generate the range of values for instance the range of 10 is (1,2,3,4,5,6,7,8,9,10). Then the calculate the sum of that range which for 10 is 55. Then multiply 55 by 10 to get the factorial. So what takes a long time in the above is generating range and generating the sum of the range. You're right there is no shortcut. However imagine we have a global cloud database. When we need to know things that are hard to generate we ask the database for the value and it is returned relatively quickly.
- 21 replies
-
-3
-
No problem. <script> function factorial(start) { temp=start; for (var ret = []; temp> -1; temp--) { ret.push(temp); } return start*ret.reduce(function(previousValue, currentValue){ return currentValue + previousValue; }); } sum = factorial(40000000); document.write(sum); </script>
- 21 replies
-
-1
-
A factotial is a number multiplied by the sum of the range.
- 21 replies
-
-2
-
p=np.pdf https://www.docdroid.net/4EicR1W/pnp.pdf.html Tried writing a paper I'm not exactly an expert so there is probably tons of mistakes.
-
Aye but he holds copyright if he can prove he is lightning deity as such he should be able to patent a derivative work provided the derivative isn't publicly available.
-
You need to prove that you are lightening deity this can be as simple as an email from this site saying you registered the username.
-
Accidentally exposed to radiation..I think.
fiveworlds replied to Elite Engineer's topic in Chemistry
Sounds like a lie to be honest your school would have informed you if the building was dangerous at the time. -
We don't allow adverts here no software can repair file corruption and even opening the file could be dangerous.
-
Consider the case where you might want to store locations. For instance the same method can be applied to 3 dimensional objects. Perhaps a method could be added like color the next 200 pixels black. Old image compression used the idea of a color table where you chose from a predefined list of colors like 256 colors which has advantages in that the file could be smaller but it also limited the availability of colors.
-
Does anybody know of an image compression algorithm similar to <script> imagewidth = 300; colors = { (0,0,0,0)[20,30,40,60,200](255,255,255,0)[120,270,140,160,300] }; document.write(colors.rgb000000000000); </script> where instead of writing rgba (a,b,c,d) a thousand times like in png to donate the color instead all the pixels to be given a specific color are written by their pixel position index in the image only storing colors actually used??
-
Hmm the only one I can think of here is robotics camp but then I live in a country where you can be kicked out of medicine and teaching courses because you are an atheist.
-
A few questions on external graphics card
fiveworlds replied to imnottheguy's topic in Computer Help
Both together. Same graphics card will mean that you will not have to install additional drivers which is a plus. Also manufacturer is a thing nvidia support SLI http://www.geforce.com/hardware/technology/sli supported for up to 4 graphics cards of the same make and model. Amd supports crossfire for up to 2 or 4 cards depending on make or model http://support.amd.com/en-us/search/faq/107 -
Screens have not been shown to have such negative effects. The content is more of an issue. A responsible parent should be able to make of the parental controls that are built in to almost all computers nowadays. Parental controls can block games, videos,webpages and limit a child's logon session to a certain time every day. You don't have to buy mobile data for your kid's phone plenty of mobile provider's allow you to opt out and I don't use mobile data on my phone because all the background data usage costs a lot of money. I also don't have a television in my home I can watch everything I want online anyway. For instance Most routers will allow you to set mac addresses to not-connect during certain hours (like at night)
-
Possible the movie that photo was from (avatar) never explained what the air was made of people walked around in pressurized suits with oxygen.
-
I saw that a while ago I thought it was pretty cool at the time. One can imagine a future where cities could grow food underground managed by robots.
-
Most compression algorithms use bits that aren't normally used. For instance lets say my computer can read 64-bit which is 0000000000000000000000000000000000000000000000000000000000000000 Then lets say that I want to store numbers I can store a number with 4 bits. 0 = 0000 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 7 = 0111 8 = 1000 9 = 1001 Now lets say my computer stores the number 19 in 64 - bit it could be stored something like this (It probably isn't). 00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000001001 The same number in 4 bits is 00011001 We can see the excessive use of space here a bad compression algorithm could use 64/4 or 16 numbers 0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0001 however a good compression algorithm could have 2^64/16 or 1152921504606846976 numbers. Decompression was generally handled by the cpu until hd televisions came out then gpu accelerated video decoding became more of a thing.
-
Disease and death in children vs. adults
fiveworlds replied to Function's topic in Psychiatry and Psychology
Isn't that completely in the eye of the beholder? Somebody who has lost their child will probably be more upset about a sick child but somebody who lost a parent young will know how much harder a lone parent has to work for them and all the implications resulting from that. Lets say that a parent and child are injured. You can save the parent or the child and not both. The parents have a mortgage on their home. If you save the child then the second parent can't pay the mortgage and as a result the child becomes homeless and dies from exposure. You aren't god you can't judge which would be the best choice simply on the face of it. -
How can I embed an animation from a website?
fiveworlds replied to jimmydasaint's topic in The Sandbox
I am using the media bbcode on this forum [media] http://highered.mheducation.com/sites/dl/free/0072495855/291136/transmission_across_synapse.swf [/media] you can also just use the url http://highered.mheducation.com/sites/dl/free/0072495855/291136/transmission_across_synapse.swf the html equivalent is <embed src="http://highered.mheducation.com/sites/dl/free/0072495855/291136/transmission_across_synapse.swf" play="true" loop="true" quality="best" type="application/x-shockwave-flash" wmode="transparent" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> -
function of x variables with non repeat outputs
fiveworlds replied to fredreload's topic in Mathematics
Would you care to enlighten us. I certainly haven't a clue what you were on about from your first post. I shouldn't have to click on an external link. Is it something like unique passenger ticket generation?? Or is it placing things in alphabetical/numerical order lexicographical indexing like in the stackoverflow link?? <?php $passeneger_ticket_numbers = array("1212","2413","5135","51326","315256"); $passengers = array(array("derek",""),array("bob",""),array("joe",""),array("marie",""),array("anna","")); if(count($passengers)===5){ for($i=0;$i<=count($passengers)-1;$i=$i+1){ $random = rand(0, count($passeneger_ticket_numbers)-1); $passengers[$i][1]= $passeneger_ticket_numbers[$random]; unset($passeneger_ticket_numbers[$random]); $passeneger_ticket_numbers = array_values($passeneger_ticket_numbers); } } var_dump($passengers); ?> The above take O(1) time and space because my boat holds x number of passengers and always try to have the maximum number of passengers before departure. -
Okay but after n=4 it fails completely ...
-
How can I embed an animation from a website?
fiveworlds replied to jimmydasaint's topic in The Sandbox
http://highered.mheducation.com/sites/dl/free/0072495855/291136/transmission_across_synapse.swf testing. Hmm the resizing doesn't seem to be working maybe I don't have it exactly right... -
I have gone home already so I can't write it down. I'm like a six hour flight away.