3 ms·
Please Calculate This Circle’s Circumference
- ThatGeoGuy 12y agoTo 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).
- avmich 12y ago"- Can I use #define? - No!" I think teacher has some ideas here :) .