Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours ago

Floating point arithmetics

eviltoast.org

message-square
44
fedilink
693

Floating point arithmetics

eviltoast.org

orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 20 hours ago
message-square
44
fedilink
  • orhtej2@eviltoast.orgOP
    link
    fedilink
    English
    arrow-up
    32
    ·
    18 hours ago

    Fixed-point arithmetics

    • KoalaUnknown@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      14 hours ago

      There is also Decimal floating-point arithmetic which has a larger range and better memory safety. Java, C#, Python, Ruby, etc. have built in support for it via Decimal.

      • Cevilia (she/they/…)@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 hours ago

        Banks and big companies have to worry about round-off and fractions of a penny, so Decimal is a better solution for them. But the great unwashed like you and me will never have to worry about that, so either works.

    • felbane@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      17 hours ago

      Also known as “if you ain’t storing cents, you ain’t making sense.”

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 4.05K users / day
  • 5.93K users / week
  • 9.93K users / month
  • 19.9K users / 6 months
  • 1 local subscriber
  • 26.8K subscribers
  • 1.74K Posts
  • 60.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org