More is less and less is more
Any REPL with caret XOR operation, 5 bytes
11^11
11^11
is of course 0. The only other possibilities are 1^11
or 11^1
which are 10, or 1111
which produces itself.
TI-BASIC, 3 1
"
When the last line of a program is an expression, the calculator will display that expression. Otherwise, the calculator displays Done
when the program finishes. The expression here is the empty string, but it could also work with any one-digit number.
2 bytes:
isClockOn
Same as the above but with a 2-byte token.
3 bytes:
ππ⁻¹
Prints 1
due to implied multiplication. Can be extended indefinitely by adding pairs of ⁻¹
's. The below also work.
√(25
e^(πi
⁻ii
ii³
2ππ
cos(2π
Longer solutions:
11/77►Frac
ᴇ⁻⁻44
cos(208341 //numerator of a convergent to pi; prints "-1"
There are probably also multi-line solutions but I can't find any.
CJam, JavaScript, Python, etc, 18 bytes
8.8888888888888888
The outputs in CJam are:
8.8888888888888888 -> 8.88888888888889
8.888888888888888 -> 8.888888888888888
88888888888888888 -> 88888888888888888
.8888888888888888 -> 0.8888888888888888
JavaScript and Python work in similar ways. It isn't competitive in JavaScript and Python, but it's not easy to find a shorter one in CJam.