sage04

142 days ago by jozefl

Recall that when factorials larger than 170! and powers of e larger than e^709 are input into Matlab, matlab returns Inf, its abbreviation for infinity. Try changing the factorial below, but be careful: calculation times for factorials increase very quickly.

factorial(200) 
       
78865786736479050355236321393218506229513597768717326329474253324435\
94499634033429203042840119846239041772121389196388302576427902426371\
05061926624952829931113462857270763317237396988943922445621451664240\
25403329186413122742829485327752424240757390324032125740557956866022\
60319041703240623517008587961789222227896237038973747200000000000000\
00000000000000000000000000000000000

Interestingly, it is difficult to break the exponential function.

exp(1000)*1.0 
       
e^1000
exp(1000)*1.01 
       
1.01000000000000*e^1000
exp(log(exp(1000),10)) 
       
e^(1000/log(10))

We have to resort to our RielField function to obtain a numerical aproximation.

R=RealField(100) R(exp(1000)) 
       
1.9700711140170469938888793522e434

Finally,

1/factorial(200) 
       
1/788657867364790503552363213932185062295135977687173263294742533244\
35944996340334292030428401198462390417721213891963883025764279024263\
71050619266249528299311134628572707633172373969889439224456214516642\
40254033291864131227428294853277524242407573903240321257405579568660\
22603190417032406235170085879617892222278962370389737472000000000000\
0000000000000000000000000000000000000