arduinoでmath.h

#概要
arduino unoでmath.h使ってみた。
ついでに、sizeofしてみた。
#写真
![math.JPG](https://qiita-image-store.s3.amazonaws.com/0/18104/73241e4a-f72d-fb60-0e45-2980daeb53ab.jpeg)

#サンプルコード
```
#include <math.h>

#define PI 			3.14159265
void func0()
{
	Serial.print("\nVarious Math Functions\n");
	Serial.print("the abs of -20 is = "); Serial.println(abs(-20));
	Serial.print("the fabs of -12.1 is = "); Serial.println(fabs(-12.1));
	Serial.print("the ceil of 12.1 is = "); Serial.println(ceil(12.1));
	Serial.print("the floor of 20.9 is = "); Serial.println(floor(20.9));
	Serial.print("the fmod of 120 is = "); Serial.println(fmod(120, 5));
	Serial.print("the trunc of -20.02 is = "); Serial.println(trunc(-20.02));
}
void func1()
{
	Serial.print("\nExponential, Logarithmic, and Power Functions\n");
	Serial.print("the exp of 4 is = "); Serial.println(exp(4));
	Serial.print("the ldexp of 4 is = "); Serial.println(ldexp(4, 2));
	//Serial.print("the log2 of 1000000 is = "); Serial.println(log2(1000000));
	Serial.print("the log10 of 1000000 is = "); Serial.println(log10(1000000));
	Serial.println("the modf of 8.12345 is = ");
	double x, fractpart, intpart;
	fractpart = modf(8.12345, &intpart);
	Serial.print("    Integral part = "); Serial.println(intpart);
	Serial.print("    Fraction Part = "); Serial.println(modf(8.12345, &intpart));
	Serial.print("the pow of 10 is = "); Serial.println(pow(10, 2));
	Serial.print("the sqrt of 36 is = "); Serial.println(sqrt(36));
}
void func2()
{
	Serial.print("\nTrigonometic Functions\n");
	Serial.print("the cos of 16 is = "); Serial.println(cos(16));
	Serial.print("The acos of 0.9 is = degrees "); Serial.println(acos(0.9) * (180.0 / PI));
	Serial.print("the cosh of 16 is = "); Serial.println(cosh(16));
	Serial.print("the sin of 16 is = "); Serial.println(sin(16));
	Serial.print("the sinh of 16 is = "); Serial.println(sinh(16));
	Serial.print("The asin of 0.9 is = degrees "); Serial.println(asin(0.9) * (180.0 / PI));
	Serial.print("the tan of 4 is = "); Serial.println(tan(4));
	Serial.print("the atan of 4 is = "); Serial.println(atan(4));
	Serial.print("the atan2 of 4 is = "); Serial.println(atan2(4, 2));
}
void size()
{
	Serial.print("\nSizeof\n");
	Serial.print("Bytes per char:           "); Serial.println((int) sizeof(char));
	Serial.print("Bytes per unsigned char:  "); Serial.println((int) sizeof(unsigned char));
	Serial.print("Bytes per short:          "); Serial.println((int) sizeof(short));
	Serial.print("Bytes per unsigned short: "); Serial.println((int) sizeof(unsigned short));
	Serial.print("Bytes per int:            "); Serial.println((int) sizeof(int));
	Serial.print("Bytes per unsigned int:   "); Serial.println((int) sizeof(unsigned int));
	Serial.print("Bytes per long:           "); Serial.println((int) sizeof(long));
	Serial.print("Bytes per unsigned long:  "); Serial.println((int) sizeof(unsigned long));
	Serial.print("Bytes per size_t:         "); Serial.println((int) sizeof(size_t));
	Serial.print("Bytes per float:          "); Serial.println((int) sizeof(float));
	Serial.print("Bytes per double:         "); Serial.println((int) sizeof(double));
	Serial.print("Bytes per long double:    "); Serial.println((int) sizeof(long double));
	Serial.print("Bytes per pointer:        "); Serial.println((int) sizeof(void *));
}
void setup()
{
 	Serial.begin(115200);
	while (!Serial) delay(250);
	Serial.print("ok");
	Serial.println();
	size();
	func0();
	func1();
	func2();
}
void loop()
{
}

```