Jump to content

not so simple math problem


taith

Recommended Posts

hey... i was just calculating some "simple" probability on my math based security... and... aparently its not so simple...

 

short form

62*30!*62*31!*62*32!*62*33!*62*34!*62*35!*62*36!*62*37!*62*38!*62*39!*62*40!

 

calculated out... thats

50586747561369659529427898714959185444864000000000*1264668689034241488235697467873979636121600000000*32427402282929268929120447894204606054400000000*853352691656033392871590734058015948800000000*23063586260973875483015965785351782400000000*640655173915940985639332382926438400000000*18304433540455456732552353797898240000000*538365692366336962722128052879360000000*16314111889888998870367516753920000000*509815996559031214698984898560000000*3795156301928272069719490560000000

 

from there, php calculates it to infinite... and ubuntu's calculator goes to

813665035487097739564052900973113854808099898446057214681902080707157946132672615577380971049336065952161071033555822795004021568792504911666911516290418519452277690486344017408982134857832375125016

which is obviously wrong (not divisible by 10, unlike the prior values)...

 

 

anyone have a calculator that can calculate such absurdly high numbers?

Link to comment
https://forums.phpfreaks.com/topic/133829-not-so-simple-math-problem/
Share on other sites

use the Bc Math library, it calculates numbers as strings, so answers can have a potentially limitless length. They are quite a bit slower than normal math though.

 

http://us2.php.net/bc

 

potentially is right... i didnt even know they existed :P THANKS!

 

if you wanted to know... it returned to a chance of 1 in 8136650354870977395640529009731138548080998984460572146819020807071579461326726155773809710493360659521610710335558227950040215687925049116669115162904185194522776904863440174089821348578323751250169567284370740210436552533589035648782408122229136327260717040309270543913129533866009036478940137705645645817253059961713589113147849546433474284955339391514746837563446514417664000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.