To be honest, I'm not sure why this is such an issue. Any sane student would recall the relation that
PI = 2 * Math.atan2(1,0);
The exercise listed in this link is one of futility, and also one of gross oversight. Using the above will give you the appropriate type (float or double, whichever you define PI to be) and will give you the best precision available on any given machine (though really, the machine precision issue is something that is somewhat agnostic towards language).
2 comments
[ 4.2 ms ] story [ 19.0 ms ] threadI think teacher has some ideas here :) .