Wireshark mailing list archives

Re: Printing floats using scientific notation when > than X digits


From: Juan Jose Martin Carrascosa <juanjo () rti com>
Date: Wed, 4 Nov 2015 16:33:25 +0100

Hi all,

I solved the issue by using %-7g to print floats and %-16g to print
doubles. It chooses when using scientific notation and also adjusts the
output to the left.

Hope this helps anyone!

Thanks,
Juanjo Martin

On Wed, Nov 4, 2015 at 1:44 PM, Juan Jose Martin Carrascosa <juanjo () rti com>
wrote:

Hi team,

Do you think it would be possible to know at run-time when a float value
exceeds X digits? I would like to show the value using scientific notation
but not in all cases, and I am reaching a point where I think it is not
possible.

Thanks,
Juanjo Martin

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: