On Sat, Sep 6, 2008 at 10:32 PM, Mike Hansen wrote:
>
> Another data point:
> sage: str(maxima(1/2)).strip()
> '1\r\n                                       -\r\n
>                  2'
>

Oh, groan! It's bad enough that Sage rejects the Python convention
concerning repr but this is terrible. :-(

>
> I think the quality of a particular interface in Sage is inversely
> proportional to the amount of strings you need to pass around.

Actually, I can easily agree with you about that. It's not that I am
so much in favor of passing strings - it's just that in the case of
all (almost all?) other external packages this has turned out to be a
very convenient default, the reason being I think, that in spite of
some obvious differences most systems actually implement a rather
similar input language in their user interfaces. Converting to a
string representation therefore allows one to take advantage of the
assumptions and common type inferences of the target system. But of
course this is sometimes (perhaps even often) not what one really
wants when converting from one system to another.

> For example, http://wiki.sagemath.org/MuPADInterface hardly
> uses any strings at all.  Using MuPAD(-Combinat) from that
> interface feels pretty natural.  Also notice
>
> sage: mupad(x^2)
>                                        2
>                                       x
>
> I still find the following behavior much worse than the current
> behavior (which is why I made the change):
>
> sage: axiom(2.123)
> float(156649750673941527080,-66,2)
>
> That's not useful to anyone or any other system.
>

By default Axiom uses arbitrary precision floats. This function call
is an attempt to retain all of the available precision in the internal
representation. Perhaps this could be implemented in Sage as a mpfr
function call?

If you wrote:

  sage: axiom('2.123::DoubleFloat')

you would see what you expect.

Regards,
Bill Page.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to