""" If the user changes the exponent range, it is her/his responsibility to check that all current floating-point variables are in the new allowed range (for example using mpfr_check_range), otherwise the subsequent behavior will be undefined, in the sense of the ISO C standard. """
This looks daunting, to say the least. Or, it'll add another check into every arithmetic operation involving a RealNumber... On Fri, Nov 20, 2009 at 10:21 AM, Jason Grout <jason-s...@creativetrax.com> wrote: > I'm teaching numerical analysis next semester, so I'm investigating how > we can use Sage's great support for specifying precision to explain some > topics. I'd like to limit the exponents that a number in a RealField > can have (for example, the exponent must be 0, 1, or -1. I see that > mpfr supports changing the exponent ranges using mpfr_get_emin and > mpfr_get_emax (see > http://www.mpfr.org/mpfr-current/mpfr.html#Exception-Related-Functions). > Is this exposed at all in Sage? It seems that the only thing I can > set in a RealField is to change the number of bits in the mantissa. > > Thanks, > > Jason > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel-unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org