up previous next
create a new twin-float ring
NewRingTwinFloat(Prec: INT): RING |
Create a new twin-float ring with bit precision
Prec
.
NOTE: calling twice
NewRingTwinFloat
will produce
two different rings, even with identical input: equality test is
performed on the pointers. See
RingID
.
For more information see the article:
John Abbott, "Twin-float arithmetic",
Journal of Symbolic Computation,
Volume 47 (2012), 536--551.
/**/ RR32 := NewRingTwinFloat(32);
/**/ Use RR32[x];
/**/ (3*x-1)/3;
x -0.3333333333333333333
/**/ RR64 := NewRingTwinFloat(64);
/**/ Use RR64[x];
/**/ (3*x-1)/3;
x -0.333333333333333333333333333333333333333
|