Other Parts Discussed in Thread: MSP430F2619
Here is my entire program:
#include <msp430f2619.h>
#include <math.h>
#include <stdbool.h>
#include "msp430.h"
#include "main.h"
double PI;
void main(void)
{
msp430Init(); // initialize the hardware
PI = 4.0 * atan(1.0); // initialize Pi
}
Executing this program yields the value 3.370281e+12 for PI. This seems off by more than a little bit.
CCSv5, TI v4.1.1 compiler, lnk_msp430f2619.cmd, <automatic> run-time support
Anyone have a suggestion as to how to get a better value for Pi than 355/113?