Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Harrison, John R" <johnh@ichips.intel.com>
To: "Christophe Raffalli" <christophe.raffalli@univ-savoie.fr>,
	"caml-list" <caml-list@inria.fr>
Subject: RE: [Caml-list] Are you sure the new "=" of 3.08 is good ?
Date: Thu, 7 Oct 2004 19:54:13 -0700	[thread overview]
Message-ID: <012676D607FCF54E986746512C22CE7D0FE7B6@orsmsx407> (raw)

| I spend one complete day to adapt Phox (my theorem prover) to 3.08
| because the new = does not check first physical equality.

If that's true, it would probably be bad news for the efficiency of my
theorem prover (HOL Light) as well, though I haven't run any actual
comparisons. (I have it running under 3.06, 3.07 and 3.08 on different
machines --- only the camlp4 part was different each time.)

| sin x with x > 10e100 gives a value which is certainly wrong since you

| can not compute the modulo 2 pi for such a big number.
| sin x should give nan when |x| is too big.

You can perfectly well compute it, and the general consensus among the
floating-point community is that trig functions should do the best they
reasonably can even on huge arguments. Techniques for doing this kind
of reduction reasonably efficiently have been known for at least 20
years, e.g.

@ARTICLE{payne-hanek,                                               
        author          = "M. Payne and R. Hanek",
        title           = "Radian Reduction for Trigonometric
Functions",
        journal         = "SIGNUM Newsletter",   
        year            = 1983,              
        volume          = 18,                     
        number          = 1,          
        pages           = "19--24"}               

Taking the sin of large numbers may indeed indicate bad code, but so may
lots of other eccentric uses of library functions.

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


             reply	other threads:[~2004-10-08  2:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08  2:54 Harrison, John R [this message]
2004-10-08  5:49 ` Christophe Raffalli
2004-10-08  6:54   ` David Brown
  -- strict thread matches above, loose matches on Subject: below --
2004-10-09 18:10 Harrison, John R
2004-10-09 17:56 Harrison, John R
2004-10-08 16:35 Harrison, John R
2004-10-08 17:34 ` Damien Doligez
2004-10-09  8:58 ` Xavier Leroy
2004-10-08 16:25 Harrison, John R
2004-10-07 21:14 Christophe Raffalli
2004-10-08  7:38 ` Jean-Christophe Filliatre
2004-10-08  8:31   ` Christophe Raffalli
2004-10-08 15:10     ` Damien Doligez
2004-10-08  9:37 ` Sébastien Furic
2004-10-08 15:54 ` Xavier Leroy

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=012676D607FCF54E986746512C22CE7D0FE7B6@orsmsx407 \
    --to=johnh@ichips.intel.com \
    --cc=caml-list@inria.fr \
    --cc=christophe.raffalli@univ-savoie.fr \
    /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