VA-11 Hall-A Bar
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nifty to Programmer Humor@programming.dev • 1 year ago

Stop using floats

lemmy.world

message-square
92
799

Stop using floats

lemmy.world

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

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

    • YTG123
      link
      fedilink
      9•
      edit-2
      1 year ago

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

      • @Magnetar@feddit.de
        link
        fedilink
        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
      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
        11•1 year ago

        Just think about them real hard

        • @Magnetar@feddit.de
          link
          fedilink
          1•1 year ago

          \pi

      • @Knock_Knock_Lemmy_In@lemmy.world
        link
        fedilink
        2•1 year ago

        Here you go

        ⲡ

      • @wischi@programming.dev
        link
        fedilink
        2•5 months ago

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

        • @smeg@feddit.uk
          link
          fedilink
          English
          1•5 months ago

          Doesn’t even need to be Greek!

    • @Chadus_Maximus@lemm.ee
      link
      fedilink
      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
        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
          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
            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
  • 477 users / day
  • 3.02K users / week
  • 7.77K users / month
  • 18.7K users / 6 months
  • 24.8K subscribers
  • 1.56K Posts
  • 54K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.1
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org