ADxc
Jump to navigation
Jump to search
ADxc is invented by User:A.
Example
Suppose your snippets were AD, xc, 123, and ;l. Then:
ADshould produce 1ADxcshould produce 2ADxc123should produce 3- and
ADxc123;lshould produce 4.
This program would have a score of 4:
| Commands | Effects |
|---|---|
A
|
Push 0.5 onto the stack |
D
|
Multiply by 2 |
x
|
Push 1 |
c
|
Bitwise left shift by the top of the stack |
123
|
Push the constants 1, 2, and 3 |
;
|
Summation of the stack |
l
|
Divide by 2 |
The top of the stack is output by default.
Geometric Series
This program produces the sum of the first five terms of the geometric series, namely the value 1.9375:
1AAlAllAlll;
Interpreter
- Common Lisp implementation of the ADxc programming language.