17 Jul 2005 20:45:31 -0400

Related articles |
---|

Sine and Cosine Accuracy on AMD64 and Pentium 4 scott.ladd@coyotegulch.com (Scott Robert Ladd) (2005-05-26) |

Re: Sine and Cosine Accuracy on AMD64 and Pentium 4 gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-28) |

Re: Sine and Cosine Accuracy on AMD64 and Pentium 4 jcrens@earthlink.net (Jack Crenshaw) (2005-07-17) |

Re: Sine and Cosine Accuracy on AMD64 and Pentium 4 Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2005-07-17) |

Re: Sine and Cosine Accuracy on AMD64 and Pentium 4 gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-07-22) |

Re: Sine and Cosine Accuracy on AMD64 and Pentium 4 henry@spsystems.net (2005-07-26) |

From: | =?ISO-8859-1?Q?J=FCrgen_Kahrs?= <Juergen.Kahrs@vr-web.de> |

Newsgroups: | comp.compilers |

Date: | 17 Jul 2005 20:45:31 -0400 |

Organization: | Compilers Central |

References: | 05-05-215 05-07-075 |

Keywords: | arithmetic |

Posted-Date: | 17 Jul 2005 20:45:31 EDT |

Jack Crenshaw wrote:

*> 1) are you sure your value of pi is not part of the problem?*

*> I have always been told to let the numeric processor set*

*> its own value, which it knows internally at 80-bit accuracy.*

*> You can get that value using something like*

*>*

*> pi = 4 * atan(1);*

When using POSIX C, you can also use M_PI

http://www.opengroup.org/onlinepubs/009695399/basedefs/math.h.html

With other languages (like awk) I also use 4 * atan2(1,1).

atan2 (as opposed to atan) is 'more standard'.

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.