MTGZone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nifty@lemmy.world to Programmer Humor@programming.dev · 1 year ago

Stop using floats

lemmy.world

message-square
92
fedilink
761

Stop using floats

lemmy.world

nifty@lemmy.world to Programmer Humor@programming.dev · 1 year ago
message-square
92
fedilink
  • Magnetar@feddit.de
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Call me when you found a way to encode transcendental numbers.

    • YTG123@feddit.ch
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Perhaps you can encode them as computation (i.e. a function of arbitrary precision)

      • Magnetar@feddit.de
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Hard to do as those functions are often limits and need infinite function applications. I’m telling you, math.PI is a finite lie!

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Do we even have a good way of encoding them in real life without computers?

      • fossphi@lemm.ee
        link
        fedilink
        English
        arrow-up
        11
        ·
        1 year ago

        Just think about them real hard

        • Magnetar@feddit.de
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          \pi

      • wischi@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        3 months ago

        Sure, just asign them a random Greek letter and call it a day 🤣

        • smeg@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 months ago

          Doesn’t even need to be Greek!

      • Knock_Knock_Lemmy_In@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Here you go

        ⲡ

    • Chadus_Maximus@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      1 year ago

      May I propose a dedicated circuit (analog because you can only ever approximate their value) that stores and returns transcendental/irrational numbers exclusively? We can just assume they’re going to be whatever value we need whenever we need them.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Wouldn’t noise in the circuit mean it’d only be reliable to certain level of precision, anyway?

        • Chadus_Maximus@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          I mean, every irrational number used in computation is reliable to a certain level of precision. Just because the current (heh) methods aren’t precise enough doesn’t mean they’ll never be.

          • anton@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            You can always increase the precision of a computation, analog signals are limited by quantum physics.

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.

  • 1.23K users / day
  • 4.73K users / week
  • 9.2K users / month
  • 17.8K users / 6 months
  • 4 local subscribers
  • 23.1K subscribers
  • 1.39K Posts
  • 50.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org