Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1569
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: -100 0 atan ==> 270 or -90? |
| Organization | Decebal Computing |
| References | <fa9d6107-0deb-48c7-9744-6236e4f97bb0@googlegroups.com> |
| Date | 2013-08-03 10:04 +0200 |
| Message-ID | <874nb7dwt5.fsf@Aspire.decebal.nl> (permalink) |
Op zaterdag 3 aug 2013 06:23 CEST schreef luser: > I've started writing up a test program for all operators, > mostly using the example snippets from the manual. > > And I've run into a difference between the Red Book (PLRM 1ed) > and the GNU C library in the value returned by atan. > > The Red Book says: > > -100 0 atan => 270.0 > > But atan2(3) (after suitable conversions) gives me -90.0 > > Is this serious? And, if so, what (if anything) should I do about > it? It looks like postscript does a modulo 360. Which in certain definitions gives a value between 0 and modVal. The funny thing being that mod gives a value between -modVal and modVal. So I would say it is a bug. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
-100 0 atan ==> 270 or -90? luser- -droog <mijoryx@yahoo.com> - 2013-08-02 21:23 -0700
Re: -100 0 atan ==> 270 or -90? luser- -droog <mijoryx@yahoo.com> - 2013-08-02 23:59 -0700
Re: -100 0 atan ==> 270 or -90? James Cloos <cloos@jhcloos.com> - 2013-08-06 20:59 -0400
Re: -100 0 atan ==> 270 or -90? Cecil Westerhof <Cecil@decebal.nl> - 2013-08-03 10:04 +0200
Re: -100 0 atan ==> 270 or -90? Helge Blischke <h.blischke@acm.org> - 2013-08-03 15:42 +0200
csiph-web