Hacker News new | past | comments | ask | show | jobs | submit login

That’s only formatting.

The other (and more important) matter, — that is not even mentioned, — is comparison. E. g. in “rational by default in this specific case” languages (Perl 6),

  > 0.1+0.2==0.3
  True
Or, APL (now they are floats there! But comparison is special)

      0.1+0.2
  0.3
      ⎕PP←20 ⋄ 0.1+0.2
  0.30000000000000004
      (0.1+0.2) ≡ 0.3
  1





Exactly what are the rules for the "special comparison" in APL? That sounds horrifying to me.

Assume the values could be equal if the relative error of the operation is greater than a small predefined value (called “⎕ct”, comparison tolerance, and you can change it).

but this is not an equivalence relation. You may have a=b and b=c but a!=c

it's horrifying!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: