On Thu, Aug 30, 2018 at 5:11 AM Jonathan Fine <jfine2...@gmail.com> wrote:
> Hi Neil > > We wrote > > >> This gives the same results as Python's Fraction, except for your > >> example [6]. There, it gives the Fraction(0) you ask for. > >> > >> If the smart mathematicians and computer scientists that wrote gp/pari > >> get the same answers, it suggests to me that improvement would be > >> hard. > > > That's because these are just floating point numbers. These are not > being > > processed symbolically. Wolfram Alpha gives all three roots, including > the > > real root. > > I've not used Wolfram Alpha, nor I think have many people on this > list. Please copy and paste the input and output from Alpha, so we can > see for ourselves (and so there's a record on this list). > It's online for everyone to use: http://www.wolframalpha.com/input/?i=(-1)+%5E+(1%2F3) > > If anyone has time and ready access, it would help to know what > https://www.sympy.org/en/index.html does with this. > > Perhaps your innocent request conceals a request for symbolic handling > of simple algebraic numbers. > Well, rational numbers. Although an algebraic number type would be interesting. And, the way I see it, Fraction is the type corresponding to the field of rational numbers. > > -- > best regards > > Jonathan >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/