http://mike.bobak.googlepages.com/clmath.txt on why cl has better intrisic math ability A quick snippet on why CL vs any of the others = http://www.johnmyleswhite.com/ 1 2 3 0.1 + 0.1 == 0.2 # True 0.1 + 0.1 + 0.1 == 0.3 # False 0.1 + 0.1 + 0.1 + 0.1 == 0.4 # True On my Intel Core 2 Duo machine running OS X, those statements have the indicated truth values in all three of Julia, R, and Python. = so I looked, and several languages screw this and other simple math up, even ones I've liked: = First to show that CL works: λ▶<4 28daedalus: /dm/graph> sbcl ;Showing that CommonLisp will work &understands fractions;) Sun Apr 29 20:17:37 PDT 2012 USER(1): (equal (+ 0.1 0.1) 0.2) T USER(2): (equal (+ 0.1 0.1 0.1) 0.3) T USER(3): (equal (+ 0.1 0.1 0.1 0.1) 0.4) T USER(4): USER(4): (/ 1 3) 1/3 USER(5): (lo) start:Sun Apr 29 20:17:44 PDT 2012 to-now:Sun Apr 29 20:19:52 PDT 2012 "byE" ==and now the languages that are not careful with numbers: λ▶<5 28daedalus: /dm/graph> clu CLIPS (V6.24 06/15/06) CLIPS> (/ 1 3) 0.333333333333333 CLIPS> (ex) Jess> (eq (+ 0.1 0.1) 0.2) TRUE Jess> (eq (+ 0.1 0.1 0.1) 0.3) FALSE Jess> (eq (+ 0.1 0.1 0.1 0.1) 0.4) TRUE Jess> Jess> (/ 1 3) 0.3333333333333333 Jess> user=> (= (+ 0.1 0.1) 0.2) true user=> (= (+ 0.1 0.1 0.1) 0.3) false user=> (= (+ 0.1 0.1 0.1 0.1) 0.4) true user=> (/ 1 3) 1/3 user=> Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1 == 1 True >>> 0.1 + 0.1 == 0.2 True >>> 0.1 + 0.1 + 0.1 == 0.3 False >>> 0.1 + 0.1 + 0.1 + 0.1 == 0.4 True >>> 1 / 3 0 >>> clojure&sage sage are the only ones to take1step tword CL but still too far/still basic screw ups /j/clojure> clj Clojure 1.2.0 user=> (/ 1 3) 1/3 user=> (= (+ 0.1 0.1) 0.2) true user=> (= (+ 0.1 0.1 0.1) 0.3) false user=> (= (+ 0.1 0.1 0.1 0.1) 0.4) true user=> sage: http://localhost:8000/home/admin/0/ evaluate 1 == 1 True 0.1 + 0.1 == 0.2 True 0.1 + 0.1 + 0.1 == 0.3 False 0.1 + 0.1 + 0.1 + 0.1 == 0.4 True 1 / 3 1/3 sage also takes a baby step away from python etc ;ruby is just as bad as python &I'm sure perl/etc /msc/rr> irb >> s1 = "abc" => "abc" >> if "abc" == s1 >> puts 'they r eq' >> end they r eq => nil >> 1 == 1 => true >> 0.1 + 0.1 == 0.2 => true >> 0.1 + 0.1 + 0.1 == 0.3 => false >> 0.1 + 0.1 + 0.1 + 0.1 == 0.4 => true >> 1 / 3 => 0 >> puts 'ruby also looses for math ability' ruby also looses for math ability => nil >>