Skip to content

leia #1

@MegamiSyn

Description

@MegamiSyn

float para hex
https://gregstoll.dyndns.org/~gregstoll/floattohex/

ex 2.296883 float to hex 0x40130020

x=0x40130020
s=string.pack("i4",x)
f=string.unpack("f",s)
print(f)

vai imprimir 2.2968826293945

fonte https://stackoverflow.com/questions/29592951/lua-hex-to-float
https://stackoverflow.com/questions/18886447/convert-signed-ieee-754-float-to-hexadecimal-representation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions