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 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
" -
@futurebird
a = (a DIV b) * b + (a MOD b)Would you say "a div b" if explaining it to a fifth grader?
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird A comment 🏃♂️➡️
-
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 I mean, I'm an engineer, int pi=3
-
@futurebird A comment 🏃♂️➡️
-
@futurebird I mean, I'm an engineer, int pi=3
Making it an int is EXTRA offensive. I could forgive float pi=3
-
Making it an int is EXTRA offensive. I could forgive float pi=3
@futurebird but then I can't just divide an int by it and get the result into an int!
-
@futurebird A comment 🏃♂️➡️
@futurebird Darn, I just clicked on reply and didn't see that n people had already said the same thing. Sorry.
-
@futurebird but then I can't just divide an int by it and get the result into an int!
@futurebird I'd have to do // but the text turns grey when I do that!
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird I'd call it an integer divide, I think.
-
Would you say "a div b" if explaining it to a fifth grader?
@futurebird I'd say "division with remainder" if explaining it to a child. "Sixteen divided by five is three remainder one".
But my first computer - a BBC Model B - had DIV and MOD operators
https://www.bbcbasic.co.uk/bbcwin/tutorial/chapter05.html
and I was comfortable using them towards the tail end of primary school.
-
@futurebird I mean, I'm an engineer, int pi=3
@ehproque @futurebird I'm an astronomer. Let's call it ten for now...
-
CS people what do you call // ?
As in 16//5=3
* integer divide
* double divide
* floor
* floor divide@futurebird I have no idea what this even means, but I call it "Slash, slash."
-
@ehproque @futurebird I'm an astronomer. Let's call it ten for now...
-
@ehproque @futurebird I'm an astronomer. Let's call it ten for now...
@khleedril @futurebird I'm a quantum physicist, let's call it 1