halubilo.social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nifty to Programmer [email protected] • 1 year ago

Stop using floats

lemmy.world

message-square
92
fedilink
762

Stop using floats

lemmy.world

nifty to Programmer [email protected] • 1 year ago
message-square
92
fedilink
  • @[email protected]
    link
    fedilink
    16•1 year ago

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

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

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

      • @[email protected]
        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!

    • @[email protected]
      link
      fedilink
      English
      6•1 year ago

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

      • @[email protected]
        link
        fedilink
        English
        11•1 year ago

        Just think about them real hard

        • @[email protected]
          link
          fedilink
          1•1 year ago

          \pi

      • @[email protected]
        link
        fedilink
        2•1 year ago

        Here you go

        ⲡ

      • @[email protected]
        link
        fedilink
        2•5 months ago

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

        • @[email protected]
          link
          fedilink
          English
          1•5 months ago

          Doesn’t even need to be Greek!

    • @[email protected]
      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.

      • @[email protected]
        link
        fedilink
        2•1 year ago

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

        • @[email protected]
          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.

          • @[email protected]
            link
            fedilink
            1•1 year ago

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

Programmer [email protected]

[email protected]

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: [email protected]

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
  • 584 users / day
  • 3.02K users / week
  • 7.88K users / month
  • 19.3K users / 6 months
  • 24.8K subscribers
  • 1.55K Posts
  • 55.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org