On Mar 6, 8:06 pm, David Sletten wrote:
> It comes as no surprise that certain numbers cannot be represented by
> a finite string of decimal digits. We all realize that 1/3 =
> 0...., and the "..." part is critical. Take it away and the
> equality goes away too. In other words, if that
Thanks for the very detailed explanation and all of the code examples.
I was a bit twiddler a long time ago.
(I enjoyed reading the opcodes in the mainframe dumps)
Lisp is a new language. And, I think it counts as the Language of
theYear,
since it is so different than Java.
I was playing with ja
On Mar 5, 2009, at 8:00 PM, mike.farn...@gmail.com wrote:
>
> I thought it neat that clojure supports fractions (just like
> Smalltalk).
> user=> (/ 3)
> 1/3
>
> I was sort of surprised by this.
>
> user=> (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
> 0.3334
It comes as no surprise
On Mar 5, 10:00 pm, "mike.farn...@gmail.com"
wrote:
> I was sort of surprised by this.
>
> user=> (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
> 0.3334
>
> (= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) ) (/ 3) )
> yields true
>
> How is tracking these number internally?
>
>
I thought it neat that clojure supports fractions (just like
Smalltalk).
user=> (/ 3)
1/3
I was sort of surprised by this.
user=> (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) )
0.3334
(= (+ (float (* (/ 2) (/ 3))) (float (* (/ 2) (/ 3))) ) (/ 3) )
yields true
How is tracking these