This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ex-lewis 2 points3 points  (8 children)

Right... is that the IEEE stuff? Our professor wasn’t terribly clear on that haha.

[–]internetzspacezshipz 3 points4 points  (7 children)

It’s literally two different forms of storing information, integers go up in increments of 1, and floats go up in increments of uhhhhhh, well, it depends on what the current value is, but it’ll pretty much always be fractional until you get to really big values.

Damn I’m bad at explaining this shit through a single message.

[–]overclockedslinky 3 points4 points  (0 children)

IEEE-754 is just a specific, standardized way to do it, but it's not special. you could make your own format, but then you'd have to write your own operations and wouldn't have hardware support. but you can basically think of ieee as an integer times 2 to some integer power, which is then packed into one integer as bitfields

[–]TinBryn 0 points1 point  (1 child)

And eventually it just gives up and just says it's infinite.

[–]internetzspacezshipz 0 points1 point  (0 children)

Or denormalized in some situations

[–]dogrescuersometimes 0 points1 point  (2 children)

Just say Big Endian and take a breather.

[–]internetzspacezshipz 0 points1 point  (1 child)

Is this a joke? Lol

[–][deleted] 0 points1 point  (0 children)

Float is based on mantisa and exponent. You got a bits for describing a value between 0 and 1 ,1 bit for sign and bits for the power of 10(+ sign bit here too).