9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@labs.coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] circular fonctions: precision?
Date: Sun,  2 Oct 2011 14:06:48 -0400	[thread overview]
Message-ID: <be876586eb3f06dd82a1578d2b964fe6@coraid.com> (raw)
In-Reply-To: <20111002175227.2D7F1B856@mail.bitblocks.com>

> > To my limited knowledge, an OS is integer based, so the floating
> > point support is mainly "user space" and is, despite IEEE754 and due to
> > the interaction between hardware, software, and programmer, really
> > floating, but is there a range given for the association of OS/hardware
> > telling that say sin(r) or asin(s) is accurate, at worst, at some
> > epsilon near?
>
> It depends on the algorithm used, not on the OS. The C
> standard leaves accuracy upto the implementation. If you care,
> you can compare the result of a C function with what bc(1)
> computes for the same function (by using a suitably large
> scale).

unless the hardware doesn't actually have floating point, doesn't
this depend only on the hardware?  (c.f. /sys/src/libc/386/387/sin.s)

754 defines the results to be accurate to within 1 bit.  obviously
that's as good as you can get.  minix's math(3) points to a collection
of detailed man pages on the subject.

- erik



  reply	other threads:[~2011-10-02 18: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 [this message]
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
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=be876586eb3f06dd82a1578d2b964fe6@coraid.com \
    --to=quanstro@labs.coraid.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).