Top "Math" questions

Math involves the manipulation of numbers within a program.

What is the standard way to add N seconds to datetime.time in Python?

Given a datetime.time value in Python, is there a standard way to add an integer number of seconds to …

python datetime time math
Calculating powers of integers

Is there any other way in Java to calculate a power of an integer? I use Math.pow(a, b) …

java math
How do I compute derivative using Numpy?

How do I calculate the derivative of a function, for example y = x2+1 using numpy? Let's say, I want the …

python math numpy
Is floating point math broken?

Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?

math language-agnostic floating-point floating-accuracy
Java Round up Any Number

I can't seem to find the answer I'm looking for regarding a simple question: how do I round up any …

java math int rounding
How to convert latitude or longitude to meters?

If I have a latitude or longitude reading in standard NMEA format is there an easy way / formula to convert …

math geolocation geo
How to convert number to words in java

We currently have a crude mechanism to convert numbers to words (e.g. using a few static arrays) and based …

java math numbers jscience
How Does Modulus Divison Work

I don't really understand how modulus division works. I was calculating 27 % 16 and wound up with 11 and I don't understand why. …

language-agnostic math modulo division
How can I calculate divide and modulo for integers in C#?

How can I calculate division and modulo for integer numbers in C#?

c# math operators division modulo
Unfamiliar symbol in algorithm: what does ∀ mean?

I'm reading about an algorithm (it's a path-finding algorithm based on A*), and it contains a mathematical symbol I'm unfamiliar …

algorithm math symbols