on-internet
← Community

Can C#/.net parse exponential hex encoded floating point numbers from strings?

Stack Overflow ·

C++, Java all include the [-]0xh.hhhhp+/-d format in the syntax of the language, other languages like python and C99 have library support for parsing these strings (float.fromhex, scanf). I have not, yet, found a way to parse this exact hex encoded exponential format in C# or using the .NET libraries. Is there a good way to handle this, or a decent alternative encoding? (decimal encoding is not exact). Example strings: 0x1p-8 -0xfe8p-12 Thank you

Comments

Sign in or sign up to comment and upvote.

No comments yet.