-
-
Notifications
You must be signed in to change notification settings - Fork 660
Description
We change the string representation of RealField(XXX)
from
Real Field with XX bits of precision
to
Real Floating-Point Field with XX bits of precision
The reason for this change is that "Real Field" is not precise enough. Beyond floating-point, "Real Field" could equivalently be used for fixed-point, intervals and balls. The standard terms in the literature are "floating-point arithmetic", "fixed-point arithmetic", "ball arithmetic" and "interval arithmetic", see eg
- https://en.wikipedia.org/wiki/Floating-point_arithmetic
- https://en.wikipedia.org/wiki/Interval_arithmetic
- https://hal.archives-ouvertes.fr/hal-00432152v3/
This ticket is part of a the refactorization #24457 that intends to clean computations involving the different kinds of real numbers.
The git branch was obtained by running the following command in $SAGE_ROOT/src
for file in $(grep -l "Real Field with" $(find . -name "*pyx" -o -name "*py" -o -name "*pxd" -o -name "*rst" -type f))
do sed -i "s/Real Field with/Real Floating-Point Field with/g" $file
done
Tests work fine except for doctests that involves an output with a linebreak such as
sage: x = polygen(RR); r = (1 + x)/(1 - x^2); r.parent()
Fraction Field of Univariate Polynomial Ring in x over Real
Field with 53 bits of precision
(from src/sage/tests/french_book/polynomes.py
line 218). These can also be handled using multiline sed replacement
for file in $(find . -name "*pyx" -o -name "*py" -o -name "*pxd" -o -name "*rst" -type f)
do
sed -Ei '{N; s/Real(\s+)Field(\s+)with/Real\1Floating-Point Field\2with/; ty; P; D; :y}' $file
done
As part of this ticket, the printf percentage syntax has been changed to the newer Python 3 standard format
syntax (see comment:22) in all real field representations.
Related discussion on sage-devel.
Component: basic arithmetic
Author: Vincent Delecroix, Ralf Stephan, Michael Jung
Branch/Commit: u/gh-mjungmath/24523 @ 7f7d902
Reviewer: Vincent Klein, Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/24523