Click here to Skip to main content
15,898,373 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Elephant Day! Pin
OriginalGriff29-Aug-17 20:39
mveOriginalGriff29-Aug-17 20:39 
GeneralRe: Elephant Day! Pin
dandy7230-Aug-17 2:29
dandy7230-Aug-17 2:29 
GeneralRe: Elephant Day! Pin
PeejayAdams29-Aug-17 22:14
PeejayAdams29-Aug-17 22:14 
GeneralRe: Elephant Day! Pin
Daniel Pfeffer29-Aug-17 23:06
professionalDaniel Pfeffer29-Aug-17 23:06 
GeneralGrowl Pin
Marc Clifton29-Aug-17 14:18
mvaMarc Clifton29-Aug-17 14:18 
GeneralRe: Growl Pin
Peter_in_278029-Aug-17 14:28
professionalPeter_in_278029-Aug-17 14:28 
GeneralRe: Growl Pin
PIEBALDconsult3-Sep-17 10:44
mvePIEBALDconsult3-Sep-17 10:44 
GeneralRe: Growl PinPopular
raddevus29-Aug-17 16:26
mvaraddevus29-Aug-17 16:26 
JavaScript backs up C# and says -1 too.
The windows calculator (set on Programmer) also says -1.

Wait...
Python says 19. That's what Google is going by!! Python.
Python is obviously wrong.

EDIT
Just tried it in C also and it says -1 so it is obvious that Google and Python are completely wrong.
Why would anyone think different?

EDIT 2
Just tried it in Java (actually in an Android app) and it gives -1.

There should be an entire discussion on why Python chose the Euclidean definition (if that is in fact the reason) while every other language seems to have chosen -1. Interesting.

EDIT 3
I can't stop now. I just tried it in Kotlin and it also results in -1.

EDIT 4
Went all the way back to QuickBasic*, ok? And -1 MOD 20 is -1 like it should be!!!
PRINT "HEllo"
PRINT -1 MOD 20

* repl.it - online REPL, QBASIC Compiler & IDE[^]

EDIT 5
Yep, I found another one that gives 19. It's Ruby!!!! Well, that sinks it, Google, Python and Ruby are all wrong for sure. Mad | :mad:
We all know Python and Ruby are garbage languages and I'm sure this will be their end. Roll eyes | :rolleyes:
repl.it - online REPL, RUBY Compiler & IDE[^]

EDIT 6
Tried it on the bash shell:
$ echo '-1%20' | bc
-1

Also tried it on windows command prompt
set /a -1%20
-1


Well, I certainly hope you can see that when I beat a dead horse...I beat it soundly to death! Laugh | :laugh:

modified 29-Aug-17 23:16pm.

GeneralRe: Growl PinPopular
PIEBALDconsult29-Aug-17 18:15
mvePIEBALDconsult29-Aug-17 18:15 
GeneralRe: Growl Pin
Nelek29-Aug-17 19:15
protectorNelek29-Aug-17 19:15 
GeneralRe: Growl Pin
PIEBALDconsult30-Aug-17 3:16
mvePIEBALDconsult30-Aug-17 3:16 
GeneralRe: Growl Pin
GKP199229-Aug-17 22:19
professionalGKP199229-Aug-17 22:19 
GeneralRe: Growl Pin
Eytukan30-Aug-17 0:18
Eytukan30-Aug-17 0:18 
GeneralRe: Growl Pin
raddevus30-Aug-17 1:32
mvaraddevus30-Aug-17 1:32 
GeneralRe: Growl Pin
enhzflep30-Aug-17 4:08
enhzflep30-Aug-17 4:08 
GeneralRe: Growl Pin
Nelek29-Aug-17 19:12
protectorNelek29-Aug-17 19:12 
GeneralRe: Growl Pin
raddevus30-Aug-17 1:32
mvaraddevus30-Aug-17 1:32 
GeneralRe: Growl Pin
Kornfeld Eliyahu Peter29-Aug-17 20:41
professionalKornfeld Eliyahu Peter29-Aug-17 20:41 
GeneralRe: Growl Pin
raddevus30-Aug-17 1:27
mvaraddevus30-Aug-17 1:27 
GeneralRe: Growl Pin
GKP199229-Aug-17 22:32
professionalGKP199229-Aug-17 22:32 
GeneralRe: Growl Pin
raddevus30-Aug-17 1:29
mvaraddevus30-Aug-17 1:29 
GeneralRe: Growl Pin
Eytukan30-Aug-17 0:19
Eytukan30-Aug-17 0:19 
GeneralRe: Growl Pin
raddevus30-Aug-17 1:22
mvaraddevus30-Aug-17 1:22 
GeneralRe: Growl Pin
User 1106097929-Aug-17 18:30
User 1106097929-Aug-17 18:30 
GeneralRe: Growl Pin
CodeWraith29-Aug-17 21:43
CodeWraith29-Aug-17 21:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   412 votes