Am Mi., 4. Sept. 2024 um 03:30 Uhr schrieb Bradley Lucier <[email protected] >:
> I *really* don't want to get into this discussion right now. HOWEVER ... > > Perhaps it would be good for Marc to show the current Scheme > implementation of his idea. > The algorithm is basically the simple one from [1] (without a hardcoded mantissa width), but you can use any other algorithm that rounds a rational number to p significant digits. Proper Scheme code will follow in some subsequent post. I like to make two more comments that I should have made in my previous post but forgot: (1) Everything I proved about Claim 2 did not take the existence of subnormal numbers into account as this wasn't relevant to the actual discussion. (2) The more important comment is this one, where I try to explain again in different words why "double rounding" is not the right term: When an implementation supporting explicitly given mantissa widths writes a binary-floating point number and it will choose the shortest decimal syntax x in printing x|p, the actual x has no meaning in itself. It only has a meaning together with the p. For example, an implementation that outputs a number object in the subnormal range for that implementation, will print something like, say, x|50, encoding the 50 significant binary digits in a decimal number x that is as short as possible so that x|p gives the actual subnormal number. It is not important to try to approximate x as well as possible. Marc -- [1] https://gmplib.org/list-archives/gmp-devel/2013-April/003223.html > Brad >
