Multiplication is the mathematical operation of scaling one number by another. It is an elementary operation of most programming languages and is typically denoted by the symbol *.
-1
votes
3answers
68 views
Is summing faster than multiplying? [closed]
I wonder whether a sum is faster than a product on recent CPUS. Computing a sum is mathematically easier but there might are optimizations to speed up multiplying in the processor; I don't know.
In ...
0
votes
0answers
94 views
When is ++ called in C? [duplicate]
The following code in JavaScript
function foo(){
var x = 3,y = 4;
var z = (x++ - y++) * (x-- + y--);
console.log(z);
}
the output is -9, which is very logical as
( - 1 ) * ( 4 + 5 ) = - ...
2
votes
1answer
71 views
Implementing Karatsuba algorithm in Haskell
I just got to know about Karatsuba Algorithm, and I tried to implement it in Haskell.
Here is my code:
(***) :: Integer -> Integer -> Integer
x *** y
| max x y < ub = x*y
| ...
0
votes
0answers
10 views
Robertson's 1's complement binary multiplication
So I have an assignment but i don't understand how the Robertson's 1's complement method works, can any1 explain it to me in detail? Also I'm interested in what direction the bits shift during the ...
0
votes
2answers
58 views
Multiplying a large number in C with a single digit number recursively?
I'm having trouble creating a recursive program that multiplies a large number with a single digit number. I understand they're are simpler methods to doing this, but I would like to do it ...
1
vote
0answers
68 views
Signed & unsigned integer multiplication
In fixed point math I use a lot of 16bit signals and perform multiplication with 32bit intermediate results. For example:
int16_t a,b,c;
c = (int16_t)(((int32_t)a * (int32_t)b)>>14);
Lets ...
-1
votes
0answers
10 views
How to add,multiply,transpose a sparse matrix? [closed]
All default values are zero.
It should be generic class.
It should be immutable.(except mutator method)
I need Matrix constructor method, accessor method, mutator method, multiplication and addition ...
5
votes
0answers
237 views
Is Javascript multiplying these values wrong?
Allright, I know what machine precision is, but this, I can't understand...
Code:
console.log("meanX",meanX);
meanX2 = meanX * meanX; //squared
console.log("meanX2",meanX2);
Console ...
5
votes
1answer
65 views
Fixed point type not multiplying correctly
I'm new to Ada, and have been trying out the fixed-point "delta" types. Specifically, I've created a 32-bit delta type range 0.0 .. 1.0. However, when I try to square certain values, I get a ...
0
votes
1answer
25 views
Multiply tuple elements if the first element in a tuple matches else ignore
I have a list of tuples like below
[(0, 33), (3, 26), (4, 95), (0, 28), (1, 12), (2, 3), (4, 69)]
I want to multiply the second elements of the tuple IF the first element matches (once or more); ...
-2
votes
0answers
38 views
Robertson1-msbA 1's complement
so I have to make multiplication on bits using Robertson1-msbA 1's complement method in a program called Small2W and it also has to have the bit corrections. Small2W has similar syntax as C++
As far ...
3
votes
4answers
109 views
optimizing a line of C code for 8 bit processor
I'm working on a 8bit processor and have written code in a C compiler, now more than 140 lines of code are taking just 1200 bytes and this single line is taking more than 200 bytes of ROM space. ...
0
votes
0answers
30 views
Multiplication issue in Crystal Reports
I need a formula that would multiply {Report Fields} and number.
Thanks all answers
Local StringVar strtxt := LowerCase({Untersuchungen_Stoffe.StoffBefund});
if ToNumber({%Ergebnis}) = 0.0 then " ...
0
votes
1answer
35 views
Android: how to multiply values from EditText?
Ok, first thing is that I am new in Android development, please do not shoot me for the question.
So, I am developing an app yhat needs to multiply from 3 EditTexts:
resultsEditText
amountEditText
...
2
votes
0answers
48 views
How to multiply two byte-mapped real numbers
I use a simple uint8_t to store a real value between 0.0 and 1.0, with 0 being mapped to 0.0 and 255 being mapped to 1.0, and linear interpolation in-between.
Obviously i can multiply this numbers ...