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: -- (:)
From: Harrison, John R <johnh@i...>
Subject: RE: [Caml-list] 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
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.

        author          = "M. Payne and R. Hanek",
        title           = "Radian Reduction for Trigonometric
        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.


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