Questions tagged [multiplication]

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 *.

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

It is an elementary arithmetic operation in most programming languages along with addition, subtraction, division and sometimes modulo.

It is typically denoted by * (asterisk symbol) in programming, and × (cross symbol) in math.

Example (math): multiplication of numbers 3 and 4

3 × 4 = 12

See also: Multiplication on Wikipedia

2530 questions
0
votes
0 answers

How to multiply arbitrary specific integers in c?

We have a question for university to program a basic calculator but it would work with arbitrary integers. I have managed to get over addition and subtraction, but I do not really see how can I multiply 2 numbers when both are arbitrarily long.…
0
votes
2 answers

Recursive forEach() in javascript

I have a bunch of arrays of numbers for example: let a = [1,2,3]; let b = [4,5,7]; let c = [11,13,17] I want to create a function that tells me what combination(s) of numbers in the arrays multiplied by numbers in a different array result to a…
YulePale
  • 6,688
  • 16
  • 46
  • 95
0
votes
0 answers

multiplication of all the combination of elements in certain dimension

I'm trying to do multiplication of all the combination of elements in a certain dimension. For example, using for loops it would be for a,i in enumerate(A): for b,j in enumerate(B): c[i][j] = a[1]*b[0] not using for loop would…
Sukwon
  • 1
  • 1
0
votes
1 answer

Multiplication unit skips overflow bit during addition

I made a simple multiplication unit (16-bit operands, 32-bit result) based on the "shift-left, add" principle, and it does not work properly in the adder part when the overflow bit needs to be considered. I have an idea what should be done (make a…
0
votes
1 answer

Format the Printing of Multiple Multiplication Tables in Python

I am trying to write a function that given a number for n it will return individual multiplication tables up to n+1 and the range of each table is also n+1. I have got the code write to get what I am looking for but I don't know how to make separate…
Rachel Cyr
  • 429
  • 1
  • 5
  • 15
0
votes
1 answer

Matrix multiplication on Opencv Android gives assertion error

I am trying to use matrix multiplication to perform transformation of image. In order to start the multiplication, I started with this simple thing but it doesnot work. The code looks like this. The eror message is followed by the code. Mat mat1…
Subash Kharel
  • 478
  • 1
  • 3
  • 12
0
votes
0 answers

Is there a simple way to multiply matrices and scalars like in MATLAB?

I am translating a code from MATLAB to Python and I have run into trouble with multiplication. I am writing some Bayesian econometric simulations and there is a lot of matrix multiplication. Some of the operations will yield a "scalar" at the end -…
Honzowski
  • 33
  • 4
0
votes
1 answer

Error: Problem with `mutate()` input `Value`. x requires numeric/complex matrix/vector arguments?

I get an error when I am trying to multiply one column named value with 1000. I do this with tidyverse as I prefer it this way. Here is my type of data I have: test_data <- structure(list(Index = c("71", "71", "71", "71", "71", "71", "71", "71",…
GaB
  • 1,076
  • 2
  • 16
  • 29
0
votes
2 answers

Recursion Error encountered in Python while writing code for Karatsuba multiplication

I am new to algorithms and I am trying to write code for the Karatsuba Multiplication algorithm using recursive function calls. I understand that karatsuba multiplication works with even n digit numbers by breaking them into 2 halves like this where…
Anmol Saksena
  • 91
  • 2
  • 10
0
votes
1 answer

How can I make this multiply method return a polynomial that doesn't have repeated exponents?

I need this method to return the simplified polynomial for example: if the result is 3.00x^4 + 6.00x^2 + 2.00x^3 + 4.00x+x^2 + 2.00 i need it to return it simplified to 3.00x^4 + 2.00x^3 + 7.00x^2 + 4.00x + 2.00
0
votes
1 answer

For loop counter in MIPS

so I'm currently trying to go through a for loop in MIPS and trying to multiply with it. I did the same thing with addition and it worked. Below, $t0 is the lower integer the user has entered, $t6 is the upper integer + 1, and $t4 is the register…
cjmurphy6
  • 1
  • 1
0
votes
1 answer

Are there platforms that do not support uint64_t?

I am working on a project that relies on the standard C datatype uint64_t to multiply 32 bit integers. But I am concerned about portability issues, as I am already re-implementing many parts of my source code in C due to portability reasons. I…
Vivekanand V
  • 340
  • 2
  • 12
0
votes
1 answer

How to multiply columns of different dataframes based on conditions

I have 2 different dataframes, with the first dataframe containing values that I want to multiply with one of the values in the second dataframe, based on a condition. So let's say my first dataframe contains of a long list with values between 1 and…
Kaashoed
  • 53
  • 1
  • 8
0
votes
2 answers

Creating a 'user input' based multiplication table in python

I am attempting to create a program asking the user for two inputs, from this a multiplication table will be created. For example, the user inputs 2 and 5. Enter a starting integer of less than 1,000 and greater than 0: 2 Enter an ending integer…
0
votes
1 answer

verilog: signed multiplication not working properly

I am using the vivado v2016.4 Behavioral simulation to simulate the verilog code shown below. The test fixture code is also shown below the main verilog code. The console output shows: A = -13 B = 4 C = 16332 Also, if I hoover over the…
user1164199
  • 359
  • 4
  • 12