Questions tagged as 'matemática'


How is computer randomization generated?

Questions How is computer randomization done? Which algorithm or mathematical basis the computer uses to generate these numbers? For example: In JavaScript I use Math.random() it me returns different numbers every time as fo...
asked by 12.03.2014 / 14:48

Mathematical division needs

On the Windows calculator: 9 / 3,0001 = 2,999 ... In my program: 9 / 3,0001 = 3; I would like to get this level of precision using C. See excerpts from my program: double op(double num1, double num2, char c) { if(c == '/')...
asked by 25.10.2014 / 18:23

Why is multiplication faster than division?

Bit brushing question, but I was reading an article on javascript that says split is slower than doing multiplication. And for example, I would recommend changing the code below: var resultado = 4/2; by that would be faster. var result...
asked by 28.03.2014 / 13:38

Receive an expression and compute in C

I'm developing this program that should receive an expression from the user and do the calculation. Ex:    Enter an expression       3 * 5-1       14 My problem is how to handle the expression sent by the user. It was recommended to...
asked by 18.02.2014 / 20:22