Is it worth it?

Pages: 12
Indeed. But from what i read an output is always rounded by subtracting. So if I have 0.9999999999999..... when outputted it will be 0, as in floor(0.999999999...). Might have read wrong though.
Rounding is not the same as truncation. Truncation is applied for assignments, not output. Output is rounded.

And yeah, it's kind of a newbie thing to think that floats have something like arbitrary precision.

By the way, technically, 0.999999999999999999... is 1.

http://en.wikipedia.org/wiki/0.99999
Last edited on
You will find that you learn the math that you need to solve a particular programming problem. The idea that you must carry around lots of complex calculus in your head is wrong. If you look at Knuth, volume one - the art of computer programming - before he gets started on programming he gives the reader an introduction to math concepts that are relevant to programming. The exercises he sets for this math introduction start from very simple to very very very very difficult.

Dr knuth - one of the worlds leading computer scientists recognises that not everyone is a math wizard, nor do you need to be to 'make it' as a competant programmer.

I agree that the more you know and are comfortable with - the easier a programming solution might be. But it is like saying that to write a great novel, what i need is to use words to get my message accross. It would be crazy to think that every good writer knows everything there is to know about words and carrys a dictionary in their head. I think In programming, the same applies but with numbers. - learn what you need to solve a problem, add that knowledge to your toolkit and in time you will get better and be able to understand more and more complex material.

Remember the real question is not 'what you know', but 'do you know how to apply it to solve a particular problem'?
I think you confuse cramming with the ability to think.

You cannot use math unless you study it.

Hence, you cannot solve problems unless you have done what is necessary to learn how to solve them -- namely, practice solving them by learning, for example, math.

Hence, the more math you know, the better you are at solving problems. Being a competent programmer leaves a wide gamut of options: are you competent only at querying SQL databases? Or can you analyze system traffic and produce queries that reduce overhead? The latter requires math and the abilities that come with having studied it.

Just a simple example.
@Duoas
Of course you need mathematics for a problem that requires mathematics....because it REQUIRES mathematics. It is pretty straight-forward. But I was not interested in that, but rather the actual situation of programming. Would you, as a programmer, have to deal, on a daily basis, with math (directly)....OR... is it something that you encounter occasionally in solving a problem.
Last edited on
Topic archived. No new replies allowed.
Pages: 12