> Dik T. Winter a écrit : ....
>
> No it is floating slash, and it is working since several years.
It is not, it is fixed slash. In fixed slash notation you represent
the numerator and denominator with fixed size representation. In
floating slash notation you use a number of bits that say where the
slash is (say the value is m), then the denominator is m+1 bits (or
m bits if there is a hidden most significant bit), the remainder
of the notation is the numerator. (In what way does your slash float?)
Say your slash designator is k bits wide, in that case m ranges from
0 to 2^k - 1. So the size of the denominator ranges from 1 to 2^k bits
and the size of the numerator ranges from n - k downto
n - 2^k bits (where n is the total number of bits allocated, and assuming
hidden bit in the numerator).
Floating slash is used very limited because the operations are fairly
complex. Fixed slash is used a bit more, but rounding is complicated.
>
> You are welcome. First you misunderstand, then you start drawing
> absurd conclusions. I am speaking about indefinitely long integers
> not just two word size integers!
You were *not* talking about indefinitely long integers. Your packages
has integers of a fixed size. My example was to show the difficulty
in rounding operations when using fixed slash notation, and I am not
talking about "word size integers", I am talking about integers with a
fixed size.
>
>
> ????
> I wrote sizeof (bgnum int)
No, you did not write that, see your original article. But what I was
stating was that you use a fixed slash notation type with fixed size
integers for both integers and rationals. There is no reason to do
so. If you had split the two types, there was no need to fix the size
of integers. It makes sense to fix the size of the integers used in
the fixed slash notation for rationals, otherwise the growth would be
uncontrolled (with fixed slash notation the size of the integers needed
can easily double with every operation, even addition).
But my question still stands. How do you do rounding of results in your
notation? Do you always obtain the nearest representable result? Or
what? Those are things a numerical mathematician needs to know. He/she
can even be satisfied when you state that the result is not always the
nearest representable number, as long as you give the error bounds.
One of my gripes with the Cray 1 was that it nowhere gave error bounds
on the operations, you had to read the hardware reference manual to
find that a multiplication of two operands (with 48 bit mantissa) could
give a result that was only precise in 45 bits. If they had stated that
upfront, that would have simplified error analysis.