caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Floating point boxing again
@ 2002-10-24  8:37 malc
  2002-10-25  3:13 ` Quetzalcoatl Bradley
  0 siblings, 1 reply; 2+ messages in thread
From: malc @ 2002-10-24  8:37 UTC (permalink / raw)
  To: caml-list

let a n =
  let x = ref 1.0 in
  for i = 1 to n do
    x := !x +. 1.0;
  done;
  !x

let b n =
  let x = ref 1.0 in
  for i = 1 to n do
    x := !x +. 1.0;
  done;
  !x +. 0.0

The code produced for a and b respectively differ greatly, even the inner 
loops. Can someone from Caml team clarify the issue?

P.S. Native code obviously.

-- 
mailto:malc@pulsesoft.com

-------------------
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


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

end of thread, other threads:[~2002-10-25  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24  8:37 [Caml-list] Floating point boxing again malc
2002-10-25  3:13 ` Quetzalcoatl Bradley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).