On Tue, Oct 14, 2008 at 6:47 PM, Martin Rubey wrote:
>
> Bill Page writes:
>
>> The reason I think it is not such a good idea is because it explicitly
>> introduces the notion of type into InputForm values in an essential
>> way. There are no explicit types at all in the following examples:
>>
>> (float 231808574432053350722 - 66 2)
>>
>> (algebraicNumber (** 2 (/ 1 2)) )
>>
>> only function calls. In an external environment like Sage, we need
>> only map these function calls to something native to Sage. If we pass
>> explicit type names, then we will need to handle them is another way,
>> making the process more complicated than it really needs to be.
>
> I'm not sure whether this is true. I think there is very little difference
> between
>
> (:: (** 2 (/ 1 2)) (AlgebraicNumber))
>
> and
>
> (algebraicNumber (** 2 (/ 1 2)))
>
The difference is that Sage does not have to know anything about the
Axiom type AlgebraicNumber.
> I just checked: you can do
>
> QQbar(2)^(1/2)
>
> but not
>
> QQbar(2^(1/2))
>
> so you need to analyze the expression anyway.
>
What version of Sage are you using? In 3.1.2 I get:
[EMAIL PROTECTED]:~$ ~/sage*/sage
----------------------------------------------------------------------
| SAGE Version 3.1.2, Release Date: 2008-09-19 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: a=QQbar(2^(1/2))
sage: a?
Type: AlgebraicNumber
Base Class: <class 'sage.rings.qqbar.AlgebraicNumber'>
String Form: 1.414213562373095?
Namespace: Interactive
Docstring:
The class for algebraic numbers (complex numbers which are the roots
of a polynomial with integer coefficients). Much of its functionality
is inherited from AlgebraicNumber_base.
sage: parent(a)
Algebraic Field
-------
> As little as I understand of Sage so far, domains seem to be pretty much
> mapped to Parents in Sage. I think we should try to keep this similarity.
I think Sage parents are more like categories in Axiom, but as a
general principle I agree with this.
Regards,
Bill Page.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---