aUCBLogo Demos and Tests / f2test


to f2test
   
setPrintPrecision 8
   
pr " pr se "factorial\ -- "factorial2:
   
; Vorsicht:
   ; 20: -> int doesn't like 6.2270287e+009 as input  in factorial2
   
for [n 1 12]
   
[   pr (se n "!\ = faculty n "-- ten factorial2 n)
   
]
   
pr " pr "factorial2:
   
pr (se "100!= ten factorial2 100) ; 9.33262154439442e+157
   
pr (se "150!= ten factorial2 150) ; 5.71338395644585e+262
   
pr (se "170!= ten factorial2 170) ; 7.257415615308e+306
   ;
   
pr (se "200!= ten factorial2 200) ; 7.8865787 *10^374
   
pr (se "1000!= ten factorial2 1000) ; 4.0238726 *10^2567
   
pr (se "10000!= ten factorial2 10000) ; 2.8462597 *10^35659
end

to ten a
   
op (word first a "*10^ last a)
end