Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: [Caml-list] Are you sure the new "=" of 3.08 is good ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-08 (16:25)
From: Harrison, John R <johnh@i...>
Subject: RE: [Caml-list] Are you sure the new "=" of 3.08 is good ?
| 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
| sin x is either 0 (your possible error is minimum) or nan.

The job of the library function should be to solve the simple
task of returning an accurate sin, not indulge in a speculative critique
the user's error analysis.

Sure, the input is most likely either a previously rounded result or
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,
if one subsequently does something like "1 + sin(x)/x". Returning NaN
force the user to indulge in many tedious checks instead of simply using
the straightforward algorithm.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: