Using the in-built capabilities of your language, calculate the integer value of:

        
  
    
      
        
          5
          
            
              4
              
                
                  3
                  
                    2
                  
                
              
            
          
        
      
    
    {\displaystyle 5^{4^{3^{2}}}}
  


 Confirm that the first and last twenty digits of the answer are: 
     62060698786608744707...92256259918212890625

 Find and show the number of decimal digits in the answer.


Note: Do not submit an implementation of arbitrary precision arithmetic. The intention is to show the capabilities of the language as supplied. If a language has a single, overwhelming, library of varied modules that is endorsed by its home site – such as CPAN for Perl or Boost for C++ – then that may be used instead.
Strictly speaking, this should not be solved by fixed-precision numeric libraries where the precision has to be manually set to a large value; although if this is the only recourse then it may be used with a note explaining that the precision must be set manually to a large enough value.


Related tasks

   Long multiplication
   Exponentiation order
   exponentiation operator
   Exponentiation with infix operators in (or operating on) the base


 
;; to save space and time, we do'nt stringify Ω = 5^4^3^2 ,
;; but directly extract tail and head and number of decimal digits
 
(lib 'bigint) ;; arbitrary size integers
 
(define e10000 (expt 10 10000)) ;; 10^10000
 
(define (last-n big (n 20))
(string-append "..." (number->string (modulo big (expt 10 n)))))
 
(define (first-n big (n 20))
	(while (> big e10000) 
		(set! big (/ big e10000))) ;; cut 10000 digits at a time
	(string-append (take (number->string big) n) "..."))
 
;; faster than directly using (number-length big)
(define (digits big (digits 0))
	(while (> big e10000) 
		(set! big (/ big e10000))
		(set! digits (1+ digits)))
	(+ (* digits 10000) (number-length big)))
 
(define Ω (expt 5 (expt 4 (expt 3 2))))
 
(last-n Ω )
    → "...92256259918212890625"
(first-n Ω )
    → "62060698786608744707..."
(digits Ω )
    → 183231
 
 
 