On Wed, Jul 16, 2008 at 10:04 AM, Bill Page <[EMAIL PROTECTED]>
wrote:
> On Wed, Jul 16, 2008 at 10:24 AM, Yixin Cao wrote:
> > Howdy,
> >
> > (1) -> 8-4
> > (1) 4
> > Type:
> > PositiveInteger
> > (2) -> 8/4
> > (2) 2
> > Type: Fraction
> > Integer
> > (3) ->
> > (3) -> 4-8
> > (3) - 4
> > Type:
> > Integer
> >
> > - is only a partial function in PositiveInteger. In OpenAxiom, 8-4
> > returns PositiveInteger, while 4-8 goes into Integer automatically.
> >
> > / is partial in Integer, but in OpenAxiom, / always returns Fraction
> > Integer, even 8/4.
> >
>
> There is no such thing as a "partial function" in Axiom. I guess you
> mean a function that returns, for example:
>
> Union(Integer, "failed")
I treat this as total. See section 2.1.9 in P16 of "Types and Programming
Languages" by Pierce.
>
>
> >
> > Why not 8/4 returns 2(Integer), while 4/8 returns 1/2(Fraction Integer)?
> >
>
> There is no function / that returns Integer.
There is no function - which returns PositiveInteger either, right?
>
>
> Regards,
> Bill Page.
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel