[EMAIL PROTECTED] wrote: > I would find the long list of what is essentially the > same operation with the different results (I provided) > to be useful. The results differ for hard to > appreciate reasons. Its easy to look at current > dictionary entries and feel as though you understand > how extended precision works when you really have no > clue.
Hmm... did you see the table partway down the page, detailing all the possibilities? Here's the order of precedence: boolean integer extended precision integer rational floating point complex The first four entries in that list represent increasingly large representations. The last two entries in that list represent approximations because the general case numbers might be too large to represent. This seems to me to be a simple and logical pattern. > I would still prefer if there was a switch to turn > precision off (for speed) instead of on, and/or if the > default for imprecise irrational numbers was to fill > with 0s so that you could detect the tolerance level > you were working with, with imprecise numbers. > > -. (x: 1e22) = (x: 1e12) * (x: 1e10) > is especially dissapointing. But that's a pretty good illustration for why the rules are the way they are. 1e22 is represented approximately on a computer (which naturally uses base 2 representation). So the value for 1e22 is a rational with 2x^40 in the denominator. A precise expression of the above would be (10x^22x) = (10x^12x) * (10x^10x) Other shortcuts are possible, and some approximations (such as 1e10) happen to coincide with the numbers you're thinking of, but in my opinion the issues you're talking about aren't a problem. That said, I think there is a problem here -- I wish that long sequences of digits would be treated by ". as extended precision numbers rather than as floating point numbers. Or, if that's not viable, I wish that ": would put a trailing 'x' on extended precision numbers. '1000'&,&.":^~20x 1.0001e30 -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
