- or download this
#!/usr/bin/env perl
printf "%.49f\n", 14.4;
printf "%.49f\n", 10 + 14.4 - 10;
- or download this
14.4000000000000003552713678800500929355621337890625
14.3999999999999985789145284797996282577514648437500
- or download this
#include <iostream>
#include <iomanip>
...
cout << 10 + 14.4 - 10 << endl;
return 0;
}
- or download this
14.4000000000000003552713678800500929355621337890625
14.39999999999999857891452847979962825775146484375
- or download this
#include <stdio.h>
...
printf("%.49f\n", 10.0 + 14.4 - 10.0);
return 0;
}
- or download this
14.4000000000000003552713678800500929355621337890625
14.3999999999999985789145284797996282577514648437500
- or download this
#!/usr/bin/env racket
#lang racket
...
(displayln (~a 14.4 #:width 15 #:pad-string "0"))
(displayln (~a (- (+ 10 14.4) 10) #:width 15 #:pad-string "0"))
(= 14.4 (- (+ 10 14.4) 10))
- or download this
14.400000000000
14.399999999999
#f
- or download this
alert(10+14.4-10);
- or download this
>>> print "%.49f"%14.4
14.4000000000000003552713678800500929355621337890625
>>> print "%.49f"%(10+14.4-10)
14.3999999999999985789145284797996282577514648437500
- or download this
$ ruby -e 'printf "%.49f\n%.49f\n",14.4, 10+14.4-10'
14.4000000000000003552713678800500929355621337890625
14.3999999999999985789145284797996282577514648437500
- or download this
sqlite> select 14.4 - (10 + 14.4 - 10);
1.77635683940025e-15
- or download this
package main
...
14.4000000000000003552713678800500929355621337890625
Program exited.