Browse thread
Reading 16 bit floats from stream?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Gerd Stolpmann <info@g...> |
| Subject: | Re: [Caml-list] Re: Reading 16 bit floats from stream? |
Am Dienstag, den 17.10.2006, 16:02 +0200 schrieb Maurizio Colucci: > BTW, I am a bit surprised the standard library does not offer a way to > do that. A simple task can become frustrating. I must say that I do not see the point. Although O'Caml is for high-level tasks it is unavoidable that you must sometimes look at the details and understand what's going on under the hood. This is more a matter of the programmer's general knowledge, and not about how good or bad a certain library is (which includes what _other_ people consider as important). Just to scare you. Before release 3.08 there was no Int32.float_of_bits in O'Caml, and one had to program such a function with bit shifting primitives. See how ugly this is (look for the now commented-out function fp8_of_fp4): https://gps.dynxs.de/svn/lib-ocamlnet2/trunk/code/src/rpc/rtypes.ml Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------