Mathematics is the study of quantity, structure, space, and change. Any math questions on this site should be programming related.
How can the following function be implemented in various languages? Calculate the (x,y) point on the circumfe
I am to show that log(n!) = Θ(n·log(n)). A hint was given that I should show the upper bound with nn and sh
I want to ensure that a division of integers is always rounded up if necessary. Is there a better way than thi
I need to generate a uniformly random point within a circle of radius R. I realize that by just picking a uni
Imagine two positive integers A and B. I want to combine these two into a single integer C. There can be no
The following code does work how I need it to, but it's ugly, excessive or a number of other things. I&ap
Having a list of points, how do I find if they are in clockwise order? For example: point[0] = (5,0) point[1
There have been several questions posted to SO about floating-point representation. For example, the decimal n
I am reading this book (NLTK) and it is confusing. Entropy is defined as: Entropy is the sum of the proba
How do I calculate distance between two GPS coordinates (using latitude and longitude)?
What is the difference between Math.Floor() and Math.Truncate() in .NET?
Today I needed a simple algorithm for checking if a number is a power of 2. The algorithm needs to be: Simpl
I was trying various methods to implement a program that gives the digits of pi sequentially. I tried the Tayl
I can't get my head around this, which is more random? rand() OR: rand() * rand() I´m finding it a
A question I got on my last interview: Design a function f, such that: f(f(n)) == -n Where n is a 3
How do I calculate the distance between two points specified by latitude and longitude? For clarification, I&
I had an interesting job interview experience a while back. The question started really easy: Q1: We have a b
Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges ove