@verbatim
Simple data type for positive real numbers for the GNU compiler. Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
This library supports positive real numbers and 0;
inf and nan are NOT supported.
It is written to be simple and fast.
Value of sreal is
x = sig * 2 ^ exp
where
sig = significant
(for < 64-bit machines sig = sig_lo + sig_hi * 2 ^ SREAL_PART_BITS)
exp = exponent
One HOST_WIDE_INT is used for the significant on 64-bit (and more than
64-bit) machines,
otherwise two HOST_WIDE_INTs are used for the significant.
Only a half of significant bits is used (in normalized sreals) so that we do
not have problems with overflow, for example when c->sig = a->sig * b->sig.
So the precision for 64-bit and 32-bit machines is 32-bit.
Invariant: The numbers are normalized before and after each call of sreal_*.
Normalized sreals:
All numbers (except zero) meet following conditions:
SREAL_MIN_SIG <= sig && sig <= SREAL_MAX_SIG
-SREAL_MAX_EXP <= exp && exp <= SREAL_MAX_EXP
If the number would be too large, it is set to upper bounds of these
conditions.
If the number is zero or would be too small it meets following conditions:
sig == 0 && exp == -SREAL_MAX_EXP
Referenced by canonicalize_component_ref(), diddle_return_value(), emit_clobber(), gen_internal_sym(), gimple_redirect_edge_and_branch(), initialize_argument_information(), insn_decl_eq_p(), is_class_die(), move_all_children(), vnull::operator vec< T, A, L >(), shared_const_p(), sreal_sub(), and subscript_dependence_tester_1().