GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Josh Justice (codingitwrong@tdd.social)'s status on Thursday, 24-Apr-2025 03:18:17 JST Josh Justice Josh Justice

    Are there mainstream languages whose floating points are not implemented with IEEE 754, so 0.1 + 0.2 actually does equal 0.3? Because it seems uninformed to make fun of JavaScript for that if other languages follow the floating point standard with the same limitations.

    In conversation about a month ago from tdd.social permalink
    • Alfred M. Szmidt repeated this.
    • Embed this notice
      Daniel Kochmański (jackdaniel@functional.cafe)'s status on Thursday, 24-Apr-2025 03:18:09 JST Daniel Kochmański Daniel Kochmański
      in reply to

      @CodingItWrong float is just a wrong type to do that. You may ude language with rational numbers (like common #lisp), or use ratios provided by gmp.

      1/10 + 2/10 = 3/10

      In conversation about a month ago permalink
    • Embed this notice
      Jonathan Yu (jawnsy@mastodon.social)'s status on Thursday, 24-Apr-2025 03:18:36 JST Jonathan Yu Jonathan Yu
      in reply to

      @CodingItWrong Maybe if they use arbitrary precision math for everything but that seems like it would be very slow

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Thursday, 24-Apr-2025 03:18:36 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Jonathan Yu

      @jawnsy It isn't slow, this happens in Lisp. @CodingItWrong

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Thursday, 24-Apr-2025 03:20:16 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to

      @CodingItWrong
      * (let ((zero-dot-three (+ 0.1 0.2))) (and (eq zero-dot-three 0.3) (= zero-dot-three 0.3)))
      T

      In conversation about a month ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.