Mike, On Sun, Sep 7, 2008 at 4:00 AM, Mike Hansen wrote: > > There is a patch up at > http://trac.sagemath.org/sage_trac/attachment/ticket/4036/trac_4036-2.patch > which improves conversions between Axiom and Sage. It defaults > to your unparsed input form if it can't find anything smarter to do.
Excellent. I have applied this patch to sage-3.1.2.alpha4-sage.math-only-x86_64-Linux and with fricas-1.0.3 installed. I tried a few things and so far it seems to work great! I'll have more time to test it thoroughly in the next 24 hours and let you know if I find any problems. > Bill, if you're interested, this would be one area that would greatly > benefit from someone who actually knows Axiom. For example, > a number of questions came up as I was writing this. > Yes I am *very* interested. Thank you again for your continuing work on this interface. > * Is there only one global precision for floating point numbers or can > different floating point numbers each have different precisions? Axiom has several different types of floating point numbers: DoubleFloat (double precision), MachineFloat (single precision), and Float (arbitrary precision). The latter is the default. In Axiom Float values are presumed exact, i.e. they correspond to rational numbers of the form (mantissa*2^exponent) where the mantissa and exponent are arbitrary precision integers, but computations involving Float are carried out in a given globally-set precision and so have a known possible error. For a given Float value one can determine the minimum precision necessary to represent that value by finding the binary length of the mantissa. E.g. Create two approximations to pi: sage: axiom('precision(68)$Float') 68 sage: p=axiom('%pi::Float') sage: axiom('precision(100)$Float') 68 sage: q=axiom('%pi::Float') Then determine their precision: sage: p.mantissa().length() 68 sage: q.mantissa().length() 100 Because of normalization this is the case for most values. > What happens if you create a number in one precision and then change the > precision? > New computations are carried out in the new precision after the change but nothing else changes. > * Given a domain like "Polynomial Integer", how do I get the base ring > "Integer" programatically? This would be like the base_ring method in > Sage. > There is no direct way in standard Axiom, but you could for example ask for the type of the value of the leading coefficient: sage: p=axiom('x+1/2') sage: p.type() Polynomial Fraction Integer sage: p.leadingCoefficient().type() Fraction Integer > * Are constructors like "Polynomial" first class objects? I can't > seem to assign "Polynomial" to a variable -- it always wants it to > be filled in like "Polynomial Integer". > Types are first class objects in Axiom but 'Polynomial' is not a type - it is a "functor", i.e. it is a constructor that takes an argument. 'Polynomial(Integer)' on the other hand is a type. 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 -~----------~----~----~----~------~----~------~--~---