Top "Multiplication" questions

Multiplication is the mathematical operation of scaling one number by another.

Why is division more expensive than multiplication?

I am not really trying to optimize anything, but I remember hearing this from programmers all the time, that I …

performance division cpu-architecture multiplication
Most Efficient Way to Scale an Array in Java?

(Apologies if this has been asked before - I can't believe it hasn't, but I couldn't find one. Perhaps my …

java arrays performance vector multiplication
long long vs int multiplication

Given the following snippet: #include <stdio.h> typedef signed long long int64; typedef signed int int32; typedef signed …

c multiplication long-long
Convert minutes into seconds in php

I have a time related php question! I have html input boxes that asks the user for minutes and seconds …

php time seconds multiplication minute
Is booth multiplication algorithm for multiplying 2 positive numbers?

Is booth algorithm for multiplication only for multiplying 2 negative numbers (-3 * -4) or one positive and one negative number (-3 * 4) ? …

algorithm hardware computer-science multiplication
SSE multiplication of 4 32-bit integers

How to multiply four 32-bit integers by another 4 integers? I didn't find any instruction which can do it.

x86 sse simd multiplication sse2
JavaScript multiplying by 100 giving weird result

I have: var a = 0.0532; var b = a * 100; b should be returning 5.32 but instead it's returning 5.319999999999999. How do I fix this? …

javascript multiplication
Is floating-point addition and multiplication associative?

I had a problem when I was adding three floating point values and comparing them to 1. cout << ((0.7 + 0.2 + 0.1)==1)<&…

c++ floating-point multiplication addition associativity
Elementwise multiplication of several arrays in Python Numpy

Coding some Quantum Mechanics routines, I have discovered a curious behavior of Python's NumPy. When I use NumPy's multiply with …

python numpy multiplication
Multiplying complex with constant in C++

The following code fails to compile #include <iostream> #include <cmath> #include <complex> using namespace …

c++ operators complex-numbers multiplication