monyet.cc
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
alphacyberranger to Programmer Humor@programming.devEnglish • 2 years ago

Java

lemmy.world

message-square
91
fedilink
538

Java

lemmy.world

alphacyberranger to Programmer Humor@programming.devEnglish • 2 years ago
message-square
91
fedilink
  • @BorgDrone@lemmy.one
    link
    fedilink
    3•2 years ago

    Is there any language that doesn’t just truncate when casting from a float to an int?

    • @baseless_discourse@mander.xyz
      link
      fedilink
      4•
      edit-2
      2 years ago

      As far as I know, haskell do not allow coresion of float to int without specifying a method (floor, ceil, round, etc): https://hoogle.haskell.org/?hoogle=Float±%3E+Integer&scope=set%3Astackage

      Agda seems to do the same: https://agda.github.io/agda-stdlib/Data.Float.Base.html

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
  • 1.46K users / day
  • 4.15K users / week
  • 10.2K users / month
  • 19.6K users / 6 months
  • 24.3K subscribers
  • 1.52K Posts
  • 56.6K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org