9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] circular fonctions: precision?
Date: Sun,  2 Oct 2011 12:06:18 -0700	[thread overview]
Message-ID: <20111002190618.54195B852@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Sun, 02 Oct 2011 20:28:46 +0200." <20111002182846.GA20646@polynum.com>

On Sun, 02 Oct 2011 20:28:46 +0200 tlaronde@polynum.com  wrote:
>
> Here, I mean by "OS" not the kernel, but the whole soft-system, i.e.
> here the implementation of libc and the direct use of sin(3) etc.

I meant only the kernel but with your definition, yes.

> It seems you've answered my badly formulated question: if I want
> to know exactly what I use, I must rely on some defined library
> linked against my software that implements directly the fonctions.
> (Testing against bc(1) is probably worth for having an idea; but
> the problem is that 1) the results depend on the system/implementation;
> 2) there may be singularities and testing the whole range with a
> small granularity is probably not an option.)

Portability, accuracy and speed. Can't have all three!  If you
are lucky you get two out of three :-)

Alternatively you can figure out what accuracy you can live
with and see if you can get it cheaply and efficiently.

Comparison with bc for a few (random) values only to tell you
how good are the libraries. There are probably numerical
analytical papers on such things if you are so inclined...

> I sometimes wonder if the more common 64bits will not someday see
> CAD or related software go back to scaled integer arithmetic =E0 la
> Intergraph dgn, where 64bits is enough for the range of coordinates
> and precision used...

double precision seems enough for most things. ieee754-2008
has quad precision... Symbolic math package Macsyma (& Maxima)
has had bigfloats (arbitray precision floating point) for
decades.  Supposedly some Common Lisp implementation have
those as well.  Mechanical CAD packages would probably get
more benefit from symbolic math capabilities than just scaled
integers (keep everything in formulas until when you
absolutely need numerical results!).



  reply	other threads:[~2011-10-02 19:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 16:38 tlaronde
2011-10-02 17:52 ` Bakul Shah
2011-10-02 18:06   ` erik quanstrom
2011-10-02 18:40     ` Bakul Shah
2011-10-02 18:44       ` erik quanstrom
2011-10-02 18:59         ` andrew zerger
2011-10-02 19:04         ` tlaronde
2011-10-02 19:14         ` Bakul Shah
2011-10-02 19:18           ` erik quanstrom
2011-10-02 18:44     ` tlaronde
2011-10-02 18:48       ` tlaronde
2011-10-02 18:28   ` tlaronde
2011-10-02 19:06     ` Bakul Shah [this message]
2011-10-03 11:41       ` tlaronde
2011-10-03 14:39         ` Bakul Shah
2011-10-03 14:46           ` erik quanstrom
2011-10-03 15:29             ` Bakul Shah
2011-10-03 15:58               ` Bakul Shah
2011-10-03 16:49           ` tlaronde
2011-10-03 13:03 ` Russ Cox
2011-10-03 14:44   ` Bakul Shah
2011-10-03 14:57     ` Russ Cox
2011-10-03 15:34       ` Bakul Shah
2011-10-03 15:47         ` Russ Cox
2011-10-03 16:53   ` tlaronde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111002190618.54195B852@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).