Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] how to split up a Caml float into its component bytes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Rafael 'Dido' Sevilla <sevillar@t...>
Subject: [Caml-list] how to split up a Caml float into its component bytes

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 <sevillar@team.ph.inter.net>   +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