From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 3 Oct 2011 18:53:43 +0200 From: tlaronde@polynum.com To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20111003165343.GB605@polynum.com> References: <20111002163800.GA12773@polynum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Subject: Re: [9fans] circular fonctions: precision? Topicbox-Message-UUID: 304bd4e8-ead7-11e9-9d60-3106f5b1d025 On Mon, Oct 03, 2011 at 09:03:50AM -0400, Russ Cox wrote: > On Sun, Oct 2, 2011 at 12:38 PM, wrote: > > Is there some documentation about the precision of the circular (i.e > > trigonometric) fonctions, depending on the (plan9) implementation and > > the hardware? > > They are not terribly accurate. > > If you need accurate versions, the best I know are the ones > that were written at Sun and included in the FreeBSD math library. > There are copies on any FreeBSD machine and also in the > vx32 distribution: http://code.swtch.com/vx32/src/tip/src/libvxc/msun. > > For Go, we started with implementations of the Plan 9 library > algorithms but have been slowly replacing them with implementations > of the Sun/FreeBSD algorithms for the improved accuracy. Thanks for the tips. I will put the various clues given in the thread at least to have a better understanding about what my code relies upon. -- Thierry Laronde http://www.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C