CS people what do you call // ?
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird Integer division, truncating division, Euclidean division.
-
@futurebird are you telling me that all these years I didn't need to do floor(16/5) ??
% is mod and // is floor and they make the world go round.
-
@futurebird are you telling me that all these years I didn't need to do floor(16/5) ??
Python is such a weird and whimsy language.
-
@futurebird Integer division, truncating division, Euclidean division.
@futurebird And then I get into an argument about negative parameters. :)
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird I've been calling it "integer division" but apparently it's actually "floor division" and I've just been lucky enough to never use it on a negative number?
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird amateur coder, i call it integer division
-
% is mod and // is floor and they make the world go round.
@futurebird % I knew how to use before I knew what a derivative was, but // has always been a comment to me. Ok, not always, only when the era of /* ended
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird Two thirds of an Apple ///?
-
@futurebird % I knew how to use before I knew what a derivative was, but // has always been a comment to me. Ok, not always, only when the era of /* ended
I program in flavors of java every day and use // for comment, but somehow forgot that. I guess floorDiv() is fine. Seems wordy IDK.
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird I think integer division or quotient.
-
I program in flavors of java every day and use // for comment, but somehow forgot that. I guess floorDiv() is fine. Seems wordy IDK.
@futurebird do you know how to get pi in c++?
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird a comment
-
@futurebird do you know how to get pi in c++?
um... not really. What do you do? load a math library?
I mean, how much pi do we need? Just type out ten decimal places and make it a global.
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird floor divide, because I use a lot of Python and that's what Python calls it
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird attrset update
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird DIV and MOD.
16 DIV 5 = 3
16 MOD 5 = 1 -
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird I used to call it integer division until I learned that at least in Python it doesn't actually return an int.
Now I just call it The Thing That Looks Like It Does What I Need But Better Stay Away From. -
@futurebird DIV and MOD.
16 DIV 5 = 3
16 MOD 5 = 1@futurebird
a = (a DIV b) * b + (a MOD b) -
@futurebird attrset update
@follpvosten
I'm going to bite you -
um... not really. What do you do? load a math library?
I mean, how much pi do we need? Just type out ten decimal places and make it a global.
@futurebird nobody knows! There's like a zillion ways to do it because there isn't something like a
"
include <maths>
maths::pi
"