Reply to post: Re: Easily javascript

Official: Perl the most hated programming language, say devs

scarletherring

Re: Easily javascript

Annoying, to be sure, but not fair. That's just a floating point quirk.

#include <stdio.h>

int main() {

printf("%.18lf\n", (0.1+0.2)); // 0.300000000000000044

}

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019