Edit: I will be posting a newer version of this question on
meta-golf soon. Stay tooned!
Edit #2: I will no longer be updating the challenge, but will leave it open. The
meta-golf version is available here: https://codegolf.stackexchange.com/questions/106509/obfuscated-number-golf
Most numbers can be written with only 6 different symbols:
-(Subtraction, Not Negation)
For example, you could convert the imaginary number
i using this equation:
Given any integer
k through any reasonable means, output the shortest representation possible of that number using only those 6 symbols.
0 => "e-e" 1 => "ln(e)" 2 => "ln(ee)" // Since - cannot be used for negation, this is not a valid solution: // ln(e)-(-ln(e)) -1 => "e-e-ln(e)"
- Ending parenthesis count towards the total amount of characters.
ln(only counts as 1 character.
- Everything else counts as 1 character.
- Order of operations apply
- Parenthesis multiplying is acceptable, e.g.
ln eis not valid, you must do