Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Is this OK?
@ 1998-05-15 13:02 N Hur
  1998-05-18  8:03 ` Jean-Christophe Filliatre
  1998-05-18 12:51 ` Xavier Leroy
  0 siblings, 2 replies; 4+ messages in thread
From: N Hur @ 1998-05-15 13:02 UTC (permalink / raw)
  To: caml-list


Sorry for no French.

Why are the two answers below different?

(* a camllight session *)

#(-234)/4
;;
- : int = -58


#div_big_int (big_int_of_string "-234") (big_int_of_string "4");;
- : big_int = -59


(*	end	*)

Thanks for advance for any explanation.

Namhyun Hur






^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Is this OK?
@ 1998-05-18 13:59 Damien Doligez
  0 siblings, 0 replies; 4+ messages in thread
From: Damien Doligez @ 1998-05-18 13:59 UTC (permalink / raw)
  To: caml-list


>From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>

>But in the case of Caml division, the  specification is different: the
>remainder has the same sign that a, which is negative in your example.

This is not quite true.  In the case of integer division in Caml Light,
the result is unspecified when either argument is negative.  This is
clearly stated in the documentation.

-- Damien





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-05-18 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-15 13:02 Is this OK? N Hur
1998-05-18  8:03 ` Jean-Christophe Filliatre
1998-05-18 12:51 ` Xavier Leroy
1998-05-18 13:59 Damien Doligez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox