Programming questions that are significantly affected or best defined by the underlying mathematics of the problem.

learn more… | top users | synonyms

4
votes
5answers
1k views

Why disallow int-to-short assignment but allow multiplication and other math?

In Java, the following code does not compile: int val = 1; short shortVal = val; // Incompatible types Anyone know why Java chooses to complain about this assignment, instead of simply truncating, ...
2
votes
3answers
182 views

How would you go about education yourself in math in a way that is relevant to programming? [duplicate]

Possible Duplicate: Is there a canonical book on mathematics for programmers? My undergraduate math educating was mostly breadth with little to know depth. Yes, I passed the tests; i got ...
4
votes
1answer
607 views

Is there a formula to figure out the total execution time of sequential asyncronous processes?

I have a set of steps that need to run sequentially over a list of data. However each step only operates on a single piece of data at a time. Because of this, I can run the steps asynchronously. For ...
3
votes
3answers
2k views

How does a website like Mathway work?

I recently found a website called Mathway Basically, it works by allowing you to choose your "level of math" (which it uses to determine what tools it should provide to you) and then allows you to ...
4
votes
3answers
1k views

CPU Architecture and floating-point math

I'm trying to wrap my head around some details about how floating point math is performed on the CPU, trying to better understand what data types to use etc. I think I have a fairly good ...
30
votes
17answers
3k views

Introducing Programming To a Mathematician [closed]

I currently am a programmer, I'm almost 16 years of age and have pretty much narrowed my careers down to something involving a Computer Science degree or Electrical Engineering degree (I know they are ...
18
votes
7answers
1k views

How can a large, Fortran-based number crunching codebase be modernized?

A friend in academia asked me for advice (I'm a C# business application developer). He has a legacy codebase which he wrote in Fortran in the medical imaging field. It does a huge amount of number ...
15
votes
10answers
995 views

How is fundamental mathematics efficiently evaluated by programming languages?

As I get more and more involved with the theory behind programming, I find myself fascinated and dumbfounded by seemingly simple things.. I realize that my understanding of the majority of fundamental ...
-1
votes
4answers
317 views

What other languages, beside Transact SQL, state that 22/7 is equal to 3? [closed]

I was using Microsoft SQL Query Analyzer the other day and wrote a very simple select statement: SELECT 22/7 as [PI Equiv] I was suprized that the result was 3, when I was expecting to see ...
6
votes
6answers
353 views

Formatting 'Complex' Math

Note: by 'complex' math I mean an equation with many steps involved and a wide mix of operators. A programmer should know the order that operators are evaluated in an equation. However it can be a ...
17
votes
4answers
2k views

why are all the functional programming tutorials so mathy?

I've been trying to learn functional programming and most tutorials I have found use math as examples for the more complicated constructs (even the simple ones in some cases). Why is this? I would ...
12
votes
11answers
342 views

Should 'mathematical' functions follow mathematical notation?

I suppose this question is going to be immediately flagged as subjective, but which do you think is better: double volume(double pressure, double n_moles, double temperature) { return n_moles * ...
4
votes
1answer
477 views

Using Quadratic Bezier Curves to generate a cave that stays within certain bounds

I'm working on a project that generates a series of quadratic bezier curves and connects them together, maintaining slope from the end of one segment to the beginning of the next to make the ...
0
votes
3answers
5k views

How much math do you learn in computer science? [closed]

How much do you need to know for computer science? When you get out of a PhD program in computer science at most schools how much math do you come out knowing? I'm guessing beyong the high school ...
5
votes
5answers
8k views

Math Major wants to become a Software Engineer [closed]

I am a math major, what would be the best field of computer science/computer engineering for me to go into, where I could apply my skills that I used as a math major(i.e. Linear Algebra, Real ...
5
votes
5answers
715 views

Which language should I use for a computationally intensive program? [closed]

This is a multi-part question. I am writing a computationally intensive program that will perform computations on very large numbers, on the scale of factorial(100) . I'm considering using Java or C++ ...
0
votes
1answer
368 views

Developing basic drawing tool involving lines, curves [closed]

I am developing a CAD - drawings to CNC machine code software. These CNC's have sort of a Instruction set which receive parameters,etc to do some blah blah job. I am quite comfortable with the CNC ...
1
vote
1answer
232 views

Help me understand this “mindmap / constellation” visual pattern

Please help me identify and understand this visual pattern, what's the common name used for such mindmap / constellation visualisations? http://asterisq.com/products/constellation/roamer/demo ...
8
votes
3answers
1k views

What is the best way to keep track of the median?

I read a question, and I'm looking for input on how to solve it: Numbers are randomly generated and stored into an (expanding) array, How would you keep track of the median? There are two data ...
6
votes
5answers
6k views

What skills are needed for machine learning jobs? [closed]

I posted this question on Quora, but didn't get enough responses. reposting it here. I am a learner sitting at home and learning linear algebra, very interested on working in Machine Learning ...
7
votes
0answers
817 views

Math underpinnings of software testing? [duplicate]

In my software engineering course, we recently (briefly) covered testing. Over the course of the discussion some topics came up that made me wonder about the math underlying software testing (such as ...
5
votes
3answers
605 views

All possible solutions to equation, where operators are arbitrary?

Given something like this: 1 5 3 4 = 18 I need to determine (using an algorithm) if there is a combination of operators and brackets that bring me to 18. Only "+" and "*" and "(" and ")" are ...
14
votes
9answers
4k views

Pure vs Applied Math For Programmers [closed]

Math has always been my thing in that I've always found the subject easy. Computer Science is my second love, though. Given the choice, I would prefer to major in Math. Since the only careers one ...
7
votes
8answers
4k views

What specific branches of Mathematics are useful for a programmer to learn?

I have less than 6 months to learn mathematics for my Master course in CS. (With no prior formal education in any computer/mathematics related area.) So I need to prepare my self to be tested on math ...
8
votes
5answers
8k views

Recomendation for Math books related to computer science [duplicate]

Possible Duplicate: Is there a canonical book on mathematics for programmers? I need your recommendation for math books related to computer science in these areas: Boolean Algebra ...
3
votes
4answers
4k views

TEA algorithm constant 0x9e3779b9 said to be derived from golden ratio, but the golden number is 1.618?

I'm trying to understand a constant 0x9e3779b9. What kind of data is this? It's not binary, not decimal, what is this? It's a constant used on the TEA algorithm. It says it's derived from the golden ...
6
votes
1answer
1k views

Discrete Mathematics Refreshers Course? [closed]

I graduated 8 years ago and did a discrete mathematics course in my 2nd year, but I've been told that I'll likely be asked discrete maths questions in an upcoming interview. Is there a simple ...
4
votes
8answers
12k views

What is the difference between a floating decimal number and fixed decimal number?

Please explain in layman's terms.
12
votes
5answers
2k views

Is functional programming strongly related to mathematics?

Is functional programming so related to mathematics because much of the functional programming is depicted with mathematical notions? Is it a MUST to have a strong base of maths to learn & ...
15
votes
0answers
3k views

Do we have to learn Mathematics to be a good Programmer? [duplicate]

Do we have to learn Mathematics to be a good Programmer?
3
votes
6answers
2k views

how to prove the complexity of an algorithm mathematically

I know the fundamental algorithms and it's complexities. for e.g if Binary Search has Complexity O(log n), then how I can mathematically prove this?
-2
votes
4answers
879 views

Do you use Mathematica during the software development process? [closed]

I'm curious whether Mathematica could help me in software development or not. Do you use it for that, and for what? For instance, do you use it to analyze algorithms, or to do something else? I will ...
6
votes
2answers
3k views

Common mistakes with javascript arithmetic

I've ran into several oddities using javascripts floating point arithmetic, but I can never recall them off the top of my head! What are some common mistakes when using JavaScript to do math?
5
votes
2answers
286 views

Does anyone use Ceiling and *not* immediately cast it to an integer?

I think every single time I've used Math.Ceiling or its language variant, I've always had to cast it to an integer. I mean... that's the whole point, isn't it? To get a whole number. So why doesn't it ...
4
votes
2answers
253 views

Is there a common mathematical symbology for collections?

I am being asked to define several of my algorithms in mathematical terms to describe my work to a customer. I am trying to determine if anybody knows whether common operators for collections like ...
38
votes
14answers
21k views

Why does DirectX use a left-handed coordinate system?

I considered posting on Stack Overflow, but the question strikes me as being far too subjective since I can't think of a reasonable technical explanation for Microsoft's choice in this matter. ...
10
votes
5answers
759 views

Does any programming language use variables as they're in maths?

In maths, a variable means you can put any number there, and an equation will still be true: root(square(x)) = abs(x) In programming languages, this is not so: a var can change. In Python: y = ...
2
votes
4answers
307 views

How does language [X] handle indeterminate forms like 0^0?

As x goes to 0, the limits of x^0 and 0^x go to 1 and 0, respectively. Some say that the best value for 0^0 depends on context, others say that the value of 0^0 should be 1. I'm interested in knowing ...
10
votes
9answers
4k views

Will getting a degree in mathematics help in game development? [closed]

I'm two months away from getting my degree in systems engineering, which is to say, I learned how to code and code well using managed languages. The only reason I got into this career was because I ...
3
votes
5answers
1k views

Which programming languages doesn't use operator precedence besides Lisp like languages? [closed]

And what do you think about operator precedences? Would be harder programming in language where the operations are executed in sequential order? Ex.: 2 + 3 * 4 == 20 2 + (3 * 4) == 24 Ok, Lisp ...
39
votes
23answers
8k views

What programming jobs would be best for a mathematician? [closed]

I'm a math professor that is losing his job, and I'm trying to gain programming skills, since academic jobs are scarce these days. Are there particular types of programming jobs that I should try to ...