You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It's a little ironic that this ties in with our discussion of coming from other languages: there are many in which 1 / 2 = 0.5, not 0. While I'm obviously very used to it, I've always regarded it as a counter-intuitive and pointless trap that 1 is treated as (int)1 regardless of cast/context. It's basically a legacy of times when computing power was too limited to put much intelligence into compilers, rather than a useful feature of a language.
The steps by which you then mis-identify something as an external change rather than a persistent bug in your code are, well... if you've never done it, you're the only programmer on earth who hasn't.
Maybe I was, who knows.
Anyway what is ridiculous is for experimented people to not even check the forum before claiming such things, everyone has to lean and make error, that's the path to knowledge. But claiming "a bug" or "try it" while this topic has been raised at least 10 times (as answered by WHR by the way), is the real issue.
And sorry but it's perfectly coherent and a good illustration my point on the other topic : a language, any language, should be learn on it's own, as much as possible. Never assume anything from your past experience, check it, try it, it's the basic of a scientific approach of life in general and of coding specifically, anything else is dogmatism.
And sorry but it's perfectly coherent and a good illustration my point on the other topic : a language, any language, should be learn on it's own, as much as possible. Never assume anything from your past experience, check it, try it, it's the basic of a scientific approach of life in general and of coding specifically, anything else is dogmatism.
good point.
But seriously, I think the platform should at least show a warning on the incorrectness of the division. An implicit typecast can really help.
How can a result of division be zero when the numerator is not a zero? I don't understand how that math works.
Besides, I'm storing the answer in a double. How can it not be clear what I'm trying to do?
But seriously, I think the platform should at least show a warning on the incorrectness of the division. An implicit typecast can really help.
How can a result of division be zero when the numerator is not a zero? I don't understand how that math works.
Besides, I'm storing the answer in a double. How can it not be clear what I'm trying to do?
Integer division. It's perfectly clear concept taught in grade school.
The integer division of 1 by 2, gives 0 remaining 1.
Integer division. It's perfectly clear concept taught in grade school.
The integer division of 1 by 2, gives 0 remaining 1.
I remember skipping that class. 😎
Thanks anyway.
They did.