Problem 813. Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, prod, cumprod , dec2bin, int2str and num2str functions. Will you take up the challenge?!
Example : x= 3; y= 2;
output = 6 since 3*2 = 6 :)
Solution Stats
Problem Comments
-
4 Comments
Can you please set a tolerance for the submitted answers? Using exp(log(x)+log(y)) fails nearly all possibilities for test case 5, with the biggest error being roughly 2.5e-11.
Nice one. It would be more challenging to add a test case where both function arguments are decimal numbers. :)
You can try adding, and something wonderful happens.
Solution Comments
Show commentsProblem Recent Solvers341
Suggested Problems
-
Check to see if a Sudoku Puzzle is Solved
328 Solvers
-
Number of 1s in a binary string
9815 Solvers
-
754 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
637 Solvers
-
Who has power to do everything in this world?
453 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!