[erlang-questions] BSON parsing?

Roger Lipscombe roger@REDACTED
Fri May 16 09:26:09 CEST 2014


On 15 May 2014 12:35, Loïc Hoguin <essen@REDACTED> wrote:
> Erlang doesn't have a representation for NaN, +infinity and -infinity. They
> should probably be represented as atoms instead.

As it happens, I'm merely passing them through from one
IEEE754-supporting process to another. It's an unfortunate side-effect
of our protocol that they get unpacked on the way. I've forked
bson-erlang and added a representation for these extras so that they
make it through with full fidelity -- bear in mind that there's more
than one valid representation of NaN :-)

Now, if I had to actually _work_ with the numbers in Erlang, that
might be painful, but it'll do for us, for now.

It further turns out that JSON _doesn't_ support +Inf, -Inf or NaN,
either, apparently.



More information about the erlang-questions mailing list