ScratchData LogoScratchData
Back to gtoal's profile

Floating point to binary

GTgtoal•Created July 11, 2015
Floating point to binary
2
2
253 views
View on Scratch

Instructions

Extract an exact integer representation of a floating point number. The largest number I've been able to enter is 1.7976e308 This makes me think Scratch uses 12 bits for exponent and 52 for the mantissa? (assuming 64 bit data) yeah - that's consistent with IEEE representation: https://en.wikipedia.org/wiki/Double-precision_floating-point_format - so we should be able to reverse engineer the 64 bit representation used internally and display it in binary...

Description

from a discussion about how to accurately checksum an array of floating point numbers without worrying about rounding errors (see https://scratch.mit.edu/projects/43755392/#comments-42137004 )

Project Details

Project ID70154644
CreatedJuly 11, 2015
Last ModifiedJuly 11, 2015
SharedJuly 11, 2015
Visibilityvisible
CommentsAllowed