<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/2026083750de8ebadca8ddcba0821ffe"
  from="Karl Zilles &lt;zilles@1...&gt;"
  author="Karl Zilles"
  date="2003-07-21T20:25:44"
  subject="Re: [Caml-list] Passing a double from C to ocaml"
  prev="2003/07/00d45368a4bf0cddb7538ca20cecb6ef"
  next="2003/07/e53dfde552df4e458a68300e32b66506"
  prev-in-thread="2003/07/00d45368a4bf0cddb7538ca20cecb6ef"
  next-in-thread="2003/07/e53dfde552df4e458a68300e32b66506"
  prev-thread="2003/07/2adfdfc739806e7d2daaf3831f751ede"
  next-thread="2003/07/fc2855c954518e72d36a07742e08b330"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Passing a double from C to ocaml">
<msg 
  url="2003/07/00d45368a4bf0cddb7538ca20cecb6ef"
  from="Jung Woon Ho &lt;unosoft@h...&gt;"
  author="Jung Woon Ho"
  date="2003-07-21T18:32:43"
  subject="[Caml-list] Passing a double from C to ocaml">
<msg 
  url="2003/07/2026083750de8ebadca8ddcba0821ffe"
  from="Karl Zilles &lt;zilles@1...&gt;"
  author="Karl Zilles"
  date="2003-07-21T20:25:44"
  subject="Re: [Caml-list] Passing a double from C to ocaml">
</msg>
<msg 
  url="2003/07/e53dfde552df4e458a68300e32b66506"
  from="Kip Macy &lt;kmacy@f...&gt;"
  author="Kip Macy"
  date="2003-07-21T20:26:02"
  subject="Re: [Caml-list] Passing a double from C to ocaml">
</msg>
</msg>
</thread>

<contents>
Jung Woon Ho wrote:

&gt; 
&gt; Is there any way.. that I can pass a double from C to ocaml without 
&gt; loosing precision?
&gt; What is the data type that is equivalent to double in Ocaml.
&gt; 
&gt; I'm trying to get a double from a C-function and convert it to "Num" in 
&gt; Ocaml.
&gt; 
&gt; Thank you.
&gt; 

The OCaml "float" value is actually double precision.  From the manual:

Floating-point numbers

Floating-point values are numbers in floating-point representation. The 
current implementation uses double-precision floating-point numbers 
conforming to the IEEE 754 standard, with 53 bits of mantissa and an 
exponent ranging from -1022 to 1023.

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

</contents>

</message>

