- 3

Does a division by an integer really deliver reasonable output?

26th Jul 2016, 11:38 PM
moerunner
4 Respuestas
+ 2
you might wanna rephrase your question coz its not making any sense right now
27th Jul 2016, 1:24 AM
Samuel Jarai
Samuel Jarai - avatar
+ 1
I think, he is referring to the often asked problem of rounding and typecasting during division for almost all programming languages. If this was your intention, this was a great question. You know, you have two operators '/' and '//'. The first one casts your division into float and the second one rounds it into an integer and always rounds down to the next int in the process.
3rd Aug 2016, 8:27 AM
Frederik Fleischmann
Frederik Fleischmann - avatar
0
it depends on what you're dividing with the integer, cause you can't divide a string with an integer that's like saying; python/3
27th Jul 2016, 1:29 AM
Jedidiah Oladele
Jedidiah Oladele - avatar
0
sorry Samuel my question concerned type casting i.e. whether it must be 1./2. rather than 1/2 or 1/2. or 1./2 for the expected result 0.5 you know some languages cause performs with non floats when you divide them
3rd Aug 2016, 10:19 AM
moerunner