Open Menu
AllLocalCommunitiesAbout
lotide
AllLocalCommunitiesAbout
Login

IEEE 754

⁨167⁩ ⁨likes⁩

Submitted ⁨⁨2⁩ ⁨weeks⁩ ago⁩ by ⁨cm0002@toast.ooo⁩ to ⁨memes@sopuli.xyz⁩

https://lemmy.ml/api/v3/image_proxy?url=https%3A%2F%2Fcdn.fosstodon.org%2Fmedia_attachments%2Ffiles%2F113%2F731%2F563%2F185%2F873%2F212%2Foriginal%2F23c614dd48e2a3ce.png

en.wikipedia.org/wiki/IEEE_754

source

Comments

Sort:hotnewtop
  • Semi_Hemi_Demigod@lemmy.world ⁨2⁩ ⁨weeks⁩ ago

    Just store the fraction as a varchar, duh

    source
    • Sadbutdru@sopuli.xyz ⁨2⁩ ⁨weeks⁩ ago

      Is that done in some environments? I think Maxima gives answers as fractions by default, but didn’t know how that worked. And my Casio calculator can stick to fractions and surds up to a point, but I think it’s just using float under the surface and converting back ok until too much rounding error creeps in…

      source
      • bamboo@lemmy.blahaj.zone ⁨2⁩ ⁨weeks⁩ ago

        think Maxima gives answers as fractions by default, but didn’t know how that worked.

        It’s likely based on the theory of continued fractions and the calculator has a limit to the maximum denominator allowed to return an approximation of the fraction.

        source
      • Semi_Hemi_Demigod@lemmy.world ⁨2⁩ ⁨weeks⁩ ago

        I’ve written econmerce systems and to avoid floating point errors I’d just use ints and divide by 100 on the front end.

        source
  • iocase@lemmy.zip ⁨2⁩ ⁨weeks⁩ ago

    The coolest part is you can do log math since you have the mantissa and exponent already for extremely fast multiplication and division (+ or - log values)

    source
    • far_university1990@reddthat.com ⁨2⁩ ⁨weeks⁩ ago

      Fast inverse square root go brrrr.

      source