RE: [Camllist] Are you sure the new "=" of 3.08 is good ?
 Harrison, John R
[
Home
]
[ Index:
by date

by threads
]
[ Message by date: previous  next ] [ Message in thread: previous  next ] [ Thread: previous  next ]
[ Message by date: previous  next ] [ Message in thread: previous  next ] [ Thread: previous  next ]
Date:   (:) 
From:  Harrison, John R <johnh@i...> 
Subject:  RE: [Camllist] Are you sure the new "=" of 3.08 is good ? 
 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 floatingpoint 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{paynehanek, author = "M. Payne and R. Hanek", title = "Radian Reduction for Trigonometric Functions", journal = "SIGNUM Newsletter", year = 1983, volume = 18, number = 1, pages = "1924"} 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 camllistrequest@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/camlbugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners