pow function result into int fails


hi guys,
i try convert result pow function integer value, dont same result.

code: [select]
double = 0;
int c = 3;

void setup()
{
  serial.begin(115200);
}

void loop()
{
  = pow(2,c);
  serial.println(a);
  serial.println(int(a));
  delay(2000);
}

serial monitor:
quote
.
8.00
7
any ideas?



Arduino Forum > Using Arduino > Programming Questions > pow function result into int fails


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code