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:       , avro_record:field("double", avro_primitive:double_type(),  "double f")
        , avro_record:field("bytes",  avro_primitive:bytes_type(),   "bytes f")
        , avro_record:field("string", avro_primitive:string_type(),  "string f")
        %% , avro_record:field("record", avro_primitive:int_type(), "record f")
        %% , avro_record:field("enum", avro_primitive:int_type(),   "i f")
        %% , avro_record:field("union", avro_primitive:int_type(), "union f")
        %% , avro_record:field("fixed", avro_primitive:int_type(), "fixed f")
        ]).
  
  sample_record() ->
  
negative.code:     ?assertEqual("3.14159265358", to_string(Json)).
  
  encode_integer_double_test() ->
      Json = encode_value(avro_primitive:double(314159265358)),
      ?assertEqual("314159265358.0", to_string(Json)).
  
  encode_bytes_type_test() ->
      Json = encode_type(avro_primitive:bytes_type()),
  