2012.06.17 00:18 "[Tiff] another problem about TIFFSetField Precision", by He Yang

2012.06.17 00:18 "[Tiff] another problem about TIFFSetField Precision", by He Yang

I want set a rational field, the value is 1/1250,

I first compute the value use two doubles 1 and 1250, and then convert the value to float, which is 0.0007999999998 and use TIFFSetField, then I immediately use TIFFGetField to read the value out, and the result is a float value which is correct, but after i write the tiff to file and read the file back, then I use the TIFFGetField, the value become 0.00079999999821, which likes a value compted use two float 1 and 1250. Is there another method can set the rational value with more accurate result?

Thanks