Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
coja ( coja@lemmy.ml )  to Programmer Humor@lemmy.ml · 3 years ago

Find yourself

lemmy.ml

message-square
45
link
fedilink
372

Find yourself

lemmy.ml

coja ( coja@lemmy.ml )  to Programmer Humor@lemmy.ml · 3 years ago
message-square
45
link
fedilink
  • kewko ( kewko@lemdro.id ) 
    link
    fedilink
    English
    arrow-up
    20
    ·
    3 years ago

    Mathematician 2 kinda blew my mind, kinda obvious, just can’t believe I was never taught or thought about it.

    • mac ( mac@lemm.ee ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      Lost me when it used Math.abs after calling math.max a their

      • MBM ( MBM@lemmings.world ) 
        link
        fedilink
        arrow-up
        3
        ·
        3 years ago

        Math.Sqrt((x-y) * (x-y)) (I’ve actually seen someone use this)

    • Artyom ( Artyom@lemm.ee ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      I’ve been staring at it for 10 minutes and I’m still not convinced it works.

      • uberrice ( uberrice@feddit.de ) 
        link
        fedilink
        arrow-up
        2
        ·
        3 years ago

        Simple, really. Abs(x-y) is the difference between the two numbers, absolute, so positive value. So, adding abs(x-y) to the smaller of the two numbers turns it into the bigger number. Plus the bigger number, now you have 2 times the bigger number

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 1 user / day
  • 41 users / week
  • 300 users / month
  • 1.73K users / 6 months
  • 871 local subscribers
  • 43.7K subscribers
  • 1.25K Posts
  • 10.3K Comments
  • Modlog
  • mods:
  • AgreeableLandscape ( AgreeableLandscape@lemmy.ml ) 
  • cat_programmer ( cat_programmer@lemmy.ml ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code