r/shittyprogramming • u/[deleted] • May 08 '18
why is the println function not working?
println(2.718) just prints 2.718 instead of 1. any ideas?
33
u/foehammer23 May 08 '18
I think you need:
float e = 2.7182818284590452353602874713527
println(e)This will output
110
u/humblevladimirthegr8 May 09 '18
Remember though that the output goes to the Natural Log -- engraved on a dead tree.
13
7
u/Max_Insanity May 23 '18
God, I'm stupid, this took me far too long...
For anyone who is also sleep deprived: The natural logarithm (ln) of "e" is 1.
In this case, "println" means print the natural log instead of print line, creating a double meaning, hence the funny.
1
0
May 08 '18
[deleted]
149
u/Solero93 May 08 '18
Add --no-preserve-root so that it won't do accidental square roots during conversion
29
May 08 '18
I think I found a bug. I enabled radian mode and required fractions, now I seem to be missing files.
12
u/Sharp_Eyed_Bot May 09 '18
This is not a bug, it's a feature. Jeezz way to go fucking up the marketing on that one Phil...
11
u/GlowingOrb May 09 '18
Don't worry, that's just because radian mode on most plattforms does not support 3d bitwise file storage. To flatten data storage on your hard drive or ssd, put the drive into your microwave at full power for about 30 min. Missing files shouldn't be a problem anymore.
10
35
u/madareklaw May 08 '18
There could be something wrong with your printer, maybe it doesn't support the number 1.