anchor.diff:      Json = encode_value(avro_primitive:float(3.14159265358)),
       ?assertEqual("3.14159265358", to_string(Json)).
   
  +encode_float_precision_lost_test() ->
  +    %% Warning: implementation of doubles in erlang loses
  +    %% precision on such numbers.
  +    Json = encode_value(avro_primitive:float(10000000000000001)),
  +    ?assertEqual("1.0e+16", to_string(Json)).
  +
   encode_integer_float_test() ->
  -    Json = encode_value(avro_primitive:float(314159265358.0)),
  -    ?assertEqual("314159265358", to_string(Json)).
  +    Json = encode_value(avro_primitive:float(314159265358)),
  +    ?assertEqual("314159265358.0", to_string(Json)).
   
   encode_double_type_test() ->
       Json = encode_type(avro_primitive:double_type()),
  
positive.code:     ?assertEqual("3.14159265358", to_string(Json)).
  
  encode_integer_double_test() ->
      Json = encode_value(avro_primitive:double(314159265358.0)),
      ?assertEqual("314159265358", to_string(Json)).
  
  encode_bytes_type_test() ->
      Json = encode_type(avro_primitive:bytes_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
  