[erlang-patches] Serge's ei float patch

Björn-Egil Dahlberg <>
Tue Jun 1 15:00:49 CEST 2010


On 2010-06-01 09:06, Steve Vinoski wrote:
> I've pushed an amended commit to github that I believe addresses all
> your suggestions:
>
> git fetch git://github.com/vinoski/otp.git serge_new_float_ext
>
> Thanks to your feedback, I found a number of other places that needed
> attention as part of this patch. If you could take another careful
> look at the new changes, that would be good.

Oops. I forgot something. (And yet again erl_interface is faced with a 
problem). ei_get_type exposes the internal representation (external 
format) of types. This is a problem. Earlier implementation had its own 
types ... which seemingly was a bad idea ...

Angels are crying for suggesting this but, what do you think of letting 
get_type return ERL_FLOAT_EXT for both ERL_FLOAT_EXT and NEW_FLOAT_EXT?

My aim is to remove the necessity for changing original source code 
dependent on erl_interface, if that is at all possible.

What do you think?

Hmm, actually this is somewhat more serious then I first thought. I need 
to talk it over with my team.

> I reinstated these tests and modified them to match the style of other
> tests in the same suite. I also found that match_float could
> incorrectly fail when dealing with the float value 0.0 so I augmented
> it with another function clause that allows for simple equality.

Great!

// Björn-Egil


More information about the erlang-patches mailing list