[erlang-questions] BSON parsing?

Loïc Hoguin essen@REDACTED
Thu May 15 13:35:57 CEST 2014


Erlang doesn't have a representation for NaN, +infinity and -infinity. 
They should probably be represented as atoms instead.

On 05/15/2014 01:32 PM, Roger Lipscombe wrote:
> Ah, it turns out that the bug is to do with NaN. The binary in
> question is <<0,0,0,0,0,0,248,127>>. If I feed the hex representation
> (0x7ff80000) to http://www.h-schmidt.net/FloatConverter/IEEE754.html,
> it tells me is NaN.
>
> Does Erlang actually have a representation of NaN? And, if so, why is
> bson-erlang not using it?
>
> Thanks,
> Roger.
>
> On 15 May 2014 12:17, Roger Lipscombe <roger@REDACTED> wrote:
>> We're using https://github.com/mongodb/bson-erlang for parsing BSON,
>> and I've found a bug to do with the way it parses floating point
>> numbers.
>>
>> Is there a more recent/better fork of this project? Or is there an
>> alternative BSON parser we should look at?
>>
>> Thanks,
>> Roger.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list