TSa (Thomas Sandlaß) wrote: > I want to stress this last point. We have the three types Int, Rat and Num. > What exactly is the purpose of Num? The IEEE formats will be handled > by num64 and the like. Is it just there for holding properties? Or does > it do some more advanced numeric stuff?
"Int", "Rat" [1] and "Num" are all human types. They work like humans were taught numbers work in math class. They have no size limits. They shouldn't lose accuracy. [2] As soon as you imply that numbers have a size limit or lose accuracy you are thinking like a computer. That's why "num64" is not a replacement for "Num", conceptually nor is "int64" a replacement for "Int". They have limits and lose accuracy. Making "Num" just work like humans expect is the "more advanced numeric stuff" I suppose. :) [1] As a name "Rat" as the type which holds fractions is about as good as "Float" to be the type which holds decimal numbers. Gotta be something that makes more sense to non CS people. Like, say, "Fraction". [2] "Num" should have an optional limit on the number of decimal places it remembers, like NUMERIC in SQL, but that's a simple truncation. -- 184. When operating a military vehicle I may *not* attempt something "I saw in a cartoon". -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/