1
Anakata
2y

What the fuck is this?! I need answers right now!!!

Comments
  • 1
    is broken maybe
  • 26
    Read up on absolute basics about floating point numbers, their binary representation and how digital computers even work.
  • 1
    Read books?
  • 11
    @theabbie A search engine will already do when searching for floating point issues. No need to buy dead trees.
  • 2
    This will get you on the right page https://youtu.be/dQhj5RGtag0
  • 1
    @joewilliams007 bist du dir da ganz sicher?
  • 8
    You need to learn how to take screenshots.
  • 18
    It's called "spot the Junior dev who just found out about floating point numbers"
  • 4
    @Fast-Nop but that crisp, glossy feeling of dead trees, and that "new" smell are incentive enough
  • 1
    float quantization...
  • 7
    @C0D4 Now imagine the WTF upon stumbling across an endianess issue. :)
  • 2
    @Fast-Nop I think it's really difficult to bump into an endianness issue these days, in most languages all operations are defined to behave according to what you'd expect from a particular endianness such that pretty much the only way you can get one is by mixing languages and sharing binary.
  • 3
    @Fast-Nop that's a stroke of bad luck for another day.

    The odds of having to deal with memory allocation anytime soon in Python, when we are still on the first page of data types is a long shot at best.

    Let's not hurt the guy... to much... this early on 😂
  • 3
    @lbfalvy Back then, I slammed into that when I tried to save binary data on one system and loading it on one with the other endianess. The problem in my load/save routine was that I just dumped the record without byte-wise serialisation.

    Most machines today are little endian, but since network order is big endian, that's the place where confusion can arise.
  • 1
    @lbfalvy ah, I hear you like C?
  • 0
    Why is that weird?
  • 3
    y'know, all devs should know this much, going to college or not
  • 1
    Do not use floats if decimals or factor 10 integers will do.
  • 3
    @kwilliams i have a colleague who declares floats and uses them as natural numbers :v
  • 5
    @Fast-Nop @theabbie @darksideofyay @kwilliams @Anakata

    https://0.30000000000000004.com/

    Spread the joy, let the heralds sing the epiphany of representation of numbers...

    (Bookmark the site, this topic comes up every now and then... Again and again. XD)
  • 0
    Floating point arithmetic in python 😞
Add Comment