From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA24923; Fri, 8 Oct 2004 18:25:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA24912 for ; Fri, 8 Oct 2004 18:25:10 +0200 (MET DST) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i98GP8qC013437 for ; Fri, 8 Oct 2004 18:25:09 +0200 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by caduceus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i98GORF5008815; Fri, 8 Oct 2004 16:24:27 GMT Received: from orsmsxvs041.jf.intel.com (orsmsxvs041.jf.intel.com [192.168.65.54]) by talaria.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i98GG6VI014605; Fri, 8 Oct 2004 16:16:19 GMT Received: from orsmsx331.amr.corp.intel.com ([192.168.65.56]) by orsmsxvs041.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004100809250211637 ; Fri, 08 Oct 2004 09:25:02 -0700 Received: from orsmsx407.amr.corp.intel.com ([192.168.65.50]) by orsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 8 Oct 2004 09:25:03 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Are you sure the new "=" of 3.08 is good ? Date: Fri, 8 Oct 2004 09:25:02 -0700 Message-ID: <012676D607FCF54E986746512C22CE7D0FE7B7@orsmsx407> Thread-Topic: [Caml-list] Are you sure the new "=" of 3.08 is good ? Thread-Index: AcSs+u3uT386xNL/Qey+0MFf34ToWgAVi7fg From: "Harrison, John R" To: "Christophe Raffalli" Cc: "caml-list" X-OriginalArrivalTime: 08 Oct 2004 16:25:03.0016 (UTC) FILETIME=[5D2A4A80:01C4AD53] X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-Miltered: at concorde with ID 4166BF64.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 johnh:01 rounding:01 speculative:96 algorithm:03 library:03 rounded:96 nan:04 nan:04 mathematical:06 solve:07 function:09 user's:90 john:09 john:09 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk | But if x is the result of any computation (with rounding error), and x | is huge, sin x may be any value between -1 and 1. So the best value from=20 | sin x is either 0 (your possible error is minimum) or nan. The job of the library function should be to solve the simple mathematical task of returning an accurate sin, not indulge in a speculative critique of the user's error analysis. Sure, the input is most likely either a previously rounded result or some inexact physical measurement. But it *might* be a precise value. Or the result may be used in such a way that the error will not be an issue, e.g. if one subsequently does something like "1 + sin(x)/x". Returning NaN would force the user to indulge in many tedious checks instead of simply using the straightforward algorithm. John. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners