anchor.diff:  
   -include_lib("erlavro/include/erlavro.hrl").
   
  --define(IS_INTEGER_FLOAT(X), round(X) == X). %% quite enough for our purposes
  -
   %%%===================================================================
   %%% API
   %%%===================================================================
  
positive.code:     Json = encode_value(avro_primitive:float(3.14159265358)),
      ?assertEqual("3.14159265358", to_string(Json)).
  
  encode_integer_float_test() ->
      Json = encode_value(avro_primitive:float(314159265358.0)),
      ?assertEqual("314159265358", to_string(Json)).
  
  encode_double_type_test() ->
      Json = encode_type(avro_primitive:double_type()),
  
negative.code:   {json, integer_to_list(?AVRO_VALUE_DATA(Value))};
  
  do_encode_value(Value) when ?AVRO_IS_FLOAT_VALUE(Value) ->
    ?AVRO_VALUE_DATA(Value);
  
  do_encode_value(Value) when ?AVRO_IS_DOUBLE_VALUE(Value) ->
    ?AVRO_VALUE_DATA(Value);
  
  do_encode_value(Value) when ?AVRO_IS_BYTES_VALUE(Value) ->
    %% mochijson3 doesn't support Avro style of encoding binaries
  