/usr/lib/s9fes/hyper.scm is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2009
; See the LICENSE file of the S9fES package for terms of use
;
; (hyper integer1 integer2 integer3) ==> integer
;
; Compute A hyper(N) B, where N=INTEGER1, A=INTEGER2, and B=INTEGER3.
;
; Example: (hyper 4 3 3) ==> 7625597484987
(define (hyper n a b)
(cond ((= n 0) (+ 1 b))
((= n 1) (+ a b))
((= b 1) a)
((= n 2) (* a b))
((= n 3) (expt a b))
((= n 4) (expt a (hyper n a (- b 1))))
((> n 4) (hyper (- n 1) a (hyper n a (- b 1))))))
|