Created
September 14, 2019 15:14
-
-
Save morgaine/9c1726fbf9e8a3b878aa3920e9d3bf1c to your computer and use it in GitHub Desktop.
Hyper-Exponential function in Nickle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/env nickle | |
# | |
# NAME | |
# hyper_exponential.nickle | |
# | |
# DESCRIPTION | |
# Calculates the sequence: | |
# 1 | |
# 2^2 | |
# (3^3)^3 | |
# ((4^4)^4)^4 | |
# (((5^5)^5)^5)^5 | |
# ((((6^6)^6)^6)^6)^6 | |
# ... | |
# for terms 1..100 | |
# | |
# AUTHOR | |
# Morgaine Dinovan | |
# - Donated to the Public Domain. | |
# - Copyright and author's rights waived | |
# | |
# COPYRIGHT | |
# Public Domain @ 2010- | |
# | |
# SEE ALSO | |
# http://nickle.org/ -- Great arbitrary precision programming language | |
# http://www.research.att.com/~njas/sequences/A053015 -- Sequence citation | |
# CodeWarrior Carling -- Expert sequence naming services, ask for a quote | |
# Imaze Rhiano - Googling expertise unrivalled, we are not worthy | |
# | |
# WARNING | |
# This program barely gets started by the time of heat death of the | |
# universe. Don't forget to save your work. | |
# | |
int max_term = 100; | |
for (term=1; term <= max_term; term++) | |
{ | |
int base = term; | |
for (n = 1; n < term; n++) | |
{ | |
base **= term; | |
} | |
printf("Calculating term %d of sequence:\n", term); | |
printf("%d\t%d\n", term, base); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output for N in [1..6]: