Wireshark-bugs: [Wireshark-bugs] [Bug 8848] capinfos: output value issues (precision & rounding)
Comment # 2
on bug 8848
from Guy Harris
The 2 decimals are a result of using "%.2f" for printing. According to C90,
"The value is rounded to the appropriate number of digits", so the values are
rounded. You have to have *some* precision - if none is specified, i.e. "%f",
it defaults to 6 according to C90.
The time stamps are different from rates and averages, as the precision of the
time stamps is provided by libwiretap based on the file format and precision
specifications in the file, so that's an "obvious default". Rates and averages
are the result of dividing an integral value by a duration or count, so there's
no "obvious default" precision.
You are receiving this mail because:
- You are watching all bug changes.