Sample Header Ad - 728x90

Understanding the od utility output in regards to floats 'od -t f'

2 votes
1 answer
283 views
I am making my own od utility based on the Single UNIX Specification and I am confused on how the representation of floats is handled e.g. od -t f. I have a perfectly functioning utility otherwise that is able to handle every other portion of the specification also this is not a programming question but a question on the meaning of the output when dumping as a float. For example if I execute the following program supplying to stdin the ASCII characters **A\n** i get the following: $ od -A n -t fD - 1.297e-320 If I just supply **A** $ od -A n -t fD - 3.2e-322 I know the value for the A and newline characters are 65 and 10 respectively so I have no clue what these exponentially small numbers mean in the context. The specification does not give much coverage to floats so I would appreciate any information on this point.
Asked by Zeno of Elea (189 rep)
Oct 5, 2018, 10:40 AM
Last activity: Oct 5, 2018, 12:27 PM