Re: bin_float parser

Vitaly Budovski <[email protected]> Mon, 18 Jul 2011 09:33:27 +0200
Newsgroups gmane.comp.parsers.spirit.devel
Message-ID <CANuOShKyi82d_udU7JqeUQZhRXyjFLUJzFr8goR1KQukaduNgA@mail.gmail.com>
Hi Hartmut,

On 17 July 2011 17:08, Hartmut Kaiser <[email protected]> wrote:
> Vitaly,
>
> Sorry for the delay...
>
>
> Thanks for your contribution!
>
> >From reading Wikipedia (http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness) I gather:
>
> <quote>
> It may therefore appear strange that the widespread IEEE 754 floating point standard does not specify endianness.[4] Theoretically, this means that even standard IEEE floating point data written by one machine might not be readable by another. However, on modern standard computers (i.e. implementing IEEE 754), one may in practice safely assume that the endianness is the same for floating point numbers as for integers, making the conversion straight forward regardless of data type. (Small embedded systems using special floating point formats may be another matter however.)
> </quote>
>
> Is that your assumption while implementing the float_bin? I'm asking as I personally have no experience with this problem domain.

Yes, I am assuming that the endianness of integers and IEEE 754
numbers is the same.

>
> Nevertheless, Joel and I would be willing to accept this into the Spirit repository if you added some tests and docs. Would you be willing to prepare corresponding patches?
>

Are you after anything specific?
I provided some tests in the attached float.cpp in the original email.
I've also updated the binary parser documentation to make mention of
the bin_float parsers (binary.qbk.diff, also in original email).

> Thanks!
> Regards Hartmut


Cheers,

Vitaly

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev