From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id EAA00789; Fri, 9 Nov 2001 04:29:57 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA01171 for ; Fri, 9 Nov 2001 04:29:55 +0100 (MET) Received: from gatekeeper.ph.inter.net (ip3.ph.psi.net [203.176.75.3] (may be forged)) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fA93ToX17508 for ; Fri, 9 Nov 2001 04:29:54 +0100 (MET) Received: from dido.engr.internet.org.ph (unknown [203.176.75.250]) by gatekeeper.ph.inter.net (Postfix) with SMTP id 8AA2C43D05 for ; Fri, 9 Nov 2001 11:29:48 +0800 (PHT) Received: by dido.engr.internet.org.ph (sSMTP sendmail emulation); Fri, 9 Nov 2001 11:29:09 +0800 Date: Fri, 9 Nov 2001 11:29:09 +0800 From: "Rafael 'Dido' Sevilla" To: Caml List Subject: [Caml-list] how to split up a Caml float into its component bytes Message-ID: <20011109112909.A9417@team.ph.inter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've been writing a byte compiler for a small language using Objective Caml, and now am thinking about incorporating floating point support into the language. I'm wondering how I would convert a floating point number in OCaml (which I hope I am safe in assuming is IEEE-754) into its equivalent bytes. I need it to be able to output bytecode instructions that will load floating point constants into the virtual machine. In C this is fairly trivial to do; not sure how to do it in OCaml. -- Rafael R. Sevilla +63(2) 8177746 ext. 8311 Programmer, Inter.Net Philippines +63(917) 4458925 http://dido.engr.internet.org.ph/ OpenPGP Key ID: 0x5CDA17D8 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr