How can I encode and decode floats quickly, accurately, and without consing, for the purpose of sending them to a separate process?
A 3.1-6) If it is necessary to be able to read the floats as floats either in lisp or in a different language, then it is hard to do efficiently; the algorithm for printing floats in scientific notation is designed to accurately convert to base 10 representation, but the price of this accuracy is time and consing. However, if the purpose of encoding and decoding these floats is simply to read them in again and create new floats in a different process (for example, a marshalling interface) then the following functions can be used. They are available for release 5.0 and 5.0.1 as patches and will be included in the next release. The patches are p2a004.001 (in 5.0.1) and p0a015.001 (in 5.0). The 16-bit values tend to be cons-free, and they can then either be used as raw data, or converted to a textual format such as hexadecimal, for the purpose of sending the data through an interface to another process. These numbers can then be read by the receiving process and can be used to reconstruct
Related Questions
- How can I encode and decode floats quickly, accurately, and without consing, for the purpose of sending them to a separate process?
- How can States be assured that the process will be handled quickly, impartially, and accurately?
- How can NoInk help my team complete the entire ordering process quickly and accurately?