[Nickle]Re: Printing of rationals
Carl Worth
cworth@east.isi.edu
Tue, 10 Jul 2001 16:39:50 -0400
Barton C Massey writes:
> You can get more digits by changing the default print
> format:
> format="%.1000g"
> gets you 1000 digits. Unfortunately, this still isn't
> enough to capture the repeat in 1/16! :-). To get this,
> try
> format="%.-g"
Thanks, that's the magic I was missing, (and naturally fully
documented in the manual -- I just missed it).
> which will show close to 1200 digits when closing the
> repeat. Perhaps this format should be the default?
Well, I'm using it now, but I'm not sure if it should be the
default. The display of 1200+ digits could be rather daunting to a
new user.
On the other hand, since nickle is using precise arithmetic, I think
it would be nice if it's default display was either precise or
explicitly stated that the displayed value was less precise than the
internal value. (The opening brace without a closing brace does
suggest this in many cases but it won't help with a non-repeating
decimal part that is longer than the format's precision width).
I don't know what would make a good indicator. Maybe an ellipsis, (or
at least an approximation of an ellipsis with 3 dots)?
> Suggestions are welcome. Mike thinks he wants the quotient
> or the repeat, whichever is shorter. I think it would drive
> me nuts, but it is really easy to add, so I have encouraged
> him to do so :-).
I too think that would be quite confusing.
-Carl