Top "Math" questions

Math involves the manipulation of numbers within a program.

Rotating a Vector in 3D Space

I am making an android project in opengl es that uses accelerometer to calculate change in specific axes and my …

math vector 3d rotation linear-algebra
Why is division in Ruby returning an integer instead of decimal value?

For example: 9 / 5 #=> 1 but I expected 1.8. How can I get the correct decimal (non-integer) result? Why is it returning 1 at …

ruby math floating-point division integer-division
How to find prime numbers between 0 - 100?

In Javascript how would i find prime numbers between 0 - 100? i have thought about it, and i am not sure …

javascript math primes
Converting bytes to megabytes

I've seen three ways of doing conversion from bytes to megabytes: megabytes=bytes/1000000 megabytes=bytes/1024/1024 megabytes=bytes/1024/1000 Ok, I think #3 …

math memory terminology units-of-measurement
How does C compute sin() and other math functions?

I've been poring through .NET disassemblies and the GCC source code, but can't seem to find anywhere the actual implementation …

c math trigonometry
What does the ^ (XOR) operator do?

What mathematical operation does XOR perform?

python math
How do I get whole and fractional parts from double in JSP/Java?

How do I get whole and fractional parts from double in JSP/Java ? If the value is 3.25 then I want …

java math jsp
Is mathematics necessary for programming?

I happened to debate with a friend during college days whether advanced mathematics is necessary for any veteran programmer. He …

math
Calculating distance between two points, using latitude longitude?

Here's my try, it's just a snippet of my code: final double RADIUS = 6371.01; double temp = Math.cos(Math.toRadians(latA)) * …

java math latitude-longitude
Fast ceiling of an integer division in C / C++

Given integer values x and y, C and C++ both return as the quotient q = x/y the floor of …

c++ c algorithm math