1000 * 150 = 18928 ?!?


am insane?

code: [select]
serial.println(1000 * 150);
 serial.println(e12[i-1] * multiply_factor);


i'm trying work out why i'm getting unexpected values, second line should identical top line, , result same, life of me, cannot see heck going on...

help!

1000 integer. 150 integer. 150,000 not integer.

the compiler using integer arithmetic integer variables, expecting integer result, not get, given actual inputs.

the types of e12 , multiply_factor unknown, can not tell why works.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > 1000 * 150 = 18928 ?!?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums