Get a hexadecimal string of the binary representation of a floating point number


julia> num2hex(3.14159)
julia> num2hex(-0.5)
julia> num2hex(10.0)

Common mistake example:

julia> num2hex("3.14")
ERROR: MethodError: no method matching num2hex(::String)

In this example, the function num2hex is expecting a floating point number as input, but a string is provided instead. Make sure to pass a valid floating point number to the num2hex function.

See Also

ascii, base64decode, Base64DecodePipe, base64encode, Base64EncodePipe, bin, bits, bytestring, charwidth, chomp, chop, chr2ind, contains, endswith, escape_string, graphemes, ind2chr, iscntrl, istext, isupper, isvalid, join, lcfirst, lowercase, lpad, lstrip, normalize_string, num2hex, parseip, randstring, readuntil, replace, repr, rpad, rsplit, rstrip, search, searchindex, split, startswith, string, stringmime, strip, strwidth, summary, takebuf_string, ucfirst, unescape_string, uppercase, utf16, utf32, utf8, wstring,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: