>>> [...] what you could do is take any "float" and convert it >>> to an exactly equal numeric quantity that is a sympy rational. >>> And you could take that number and convert it to a float. >>> without loss.
There is a little with this approach. The float algorithm are generally more efficient that the exact rational ones. 2014-03-29 9:27 GMT+01:00 Joachim Durchholz <[email protected]>: > Am 29.03.2014 05:16, schrieb Richard Fateman: > > >> >> On Monday, March 24, 2014 3:42:01 AM UTC-7, Joachim Durchholz wrote: >> >>> >>> Am 24.03.2014 01:58, schrieb Richard Fateman: >>> >>>> >>>> Now we must address what is meant by integer. In common lisp, integer >>>> meansarbitrary precision integer. >>>> >>> > Consequently, every rational number IS an integer/integer. >>> >>>> [...] >>>> >>> > It seems to me the meanings of words in sympy should correspond to >>> > their meanings in mathematics not some hack mockery of the word that >>> > appears in one or even several programming languages. >>> >>> Your position seems inconsistent - you derive your idea about the nature >>> of rational numbers from Common Lisp, yet you denounce exactly that kind >>> of reasoning as "some hack mockery of the word that appears in [...] >>> programming languages". >>> >>> >> No, I derive my idea about the nature of rational numbers from standard >> mathematical >> definitions. It turns out that Common Lisp implements this. >> > > You derive your idea that a number is just its representation from CL. > Which is not what math says. In math, a number is a model (not even a > representation) plus a set of axioms; by that definition, floats in any > programming language (including CL) aren't even numbers because they don't > satisfy the number axioms. (The purpose of floats is outside the domain of > symbolic math. That's why we're discussing it here.) > > > > Though I suppose > >> there is a finiteness argument that there are integers whose binary >> representation >> is so long that they cannot be stored in your computer's memory. >> > > There is, but it's a special case of what we need to do anyway - that > SymPy will either deliver a correct result or report an error. > > > > There are also > >> integers whose >> binary representation is so long that even using all the electrons in the >> known universe, >> one cannot write the number out, so it is perhaps just a matter of how >> you >> feel about >> such inherent limits of finiteness of computational devices. >> > > That's a more fundamental problem with floats actually. > A float runs out of precision long before the computer runs out of memory, > so SymPy could be forced to report failure long before memory is exhausted. > Worse, float implementations do not reliably report precision loss. Not > for all C implementations (which Python takes its float implementation > from), and not even for all hardware chips that do the actual bit munging. > > I have started to wonder whether we shouldn't throw Float support out. > We'd not doing numerics anyway. Not the kind that uses floats. > > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/sympy/533683E2.8040200%40durchholz.org. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAAb4jGkmb5BhchFRa%2BE1M1iXzR2f2oco3XzUK1R%2BoqPDed3AgQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
