#3 Languages, 82 83 / 3^3 = 3.074...
3 Languages, 82 83 / 3^3 = 3.074...
Works in ???, Whitespace, and Beatnik. Or rather, it should work in those languages but I am not going to be able to test them for a few days. Anyway, here is the code:
K... Jax... Jy... Jy... ... My... My... ... ... ......................XO! 1. ???
.................................................! ??? is basically brainfuck but it uses common punctuation as commands instead of the traditional characters. . increments the current memory cell, which is done 49 times. ! takes the current memory cell and prints it as a character, here 1.
2. Whitespace
[Space][Space][Space][Tab][Line Feed] [Tab][Line Feed] [Space][Tab] Whitespace is a language that ignores all non-whitespace characters. Here I've converted it to an easily readable form. The first line pushes 2 onto the stack, and the second two lines print the top of the stack as a number, here 2.
Note that in the combined code, I have substituted tabs with four spaces due to technical limitations.
3. Beatnik
K Jax Jy Jy My My XO Beatnik is a language where each word is converted to its Scrabble score, then those scores are interpreted as commands. The first line pushes 17 onto the stack. The second line duplicates the top of the stack twice and the third line adds the top to elements of the stack together twice, effectively tripling 17 into 51. The last line prints the character on the top of the stack, here 3.
Note that I am using Beatnik at Face Value, assuming there is not an error in the original Beatnik specification. Also note that I am using the North American English Scrabble scoring system.
If it is not clear by now, each of these languages only accepts a certain type of character (punctuation, whitespace, and letters, respectively) so writing this polyglot was as easy as writing the individual programs. The only real "trick" is using the Whitespace code to separate the words from Beatnik. Beyond that, the individual programs do not overlap whatsoever.