On Fri, 29 Aug 2008, Martin Albrecht wrote:
>
> On Friday 29 August 2008, Jason Grout wrote:
>> Martin Albrecht wrote:
>>>> For various objects and various software systems (like mathematica,
>>>> magma, maxima, etc.), we have a _mathematica_init_, _magma_init_, etc,
>>>> which convert an expression into syntax for the target system. A lot of
>>>> these are defined in calculus.py for converting symbolic expressions to
>>>> syntax for other systems. I don't think we have an "interface" to C
>>>> code; can anyone think of a reason why we shouldn't? (or do we already
>>>> have one?)
>>>
>>> One difference is that it is pretty clear what Magma can and cannot do +
>>> it can do a lot of mathematics. What would be the capabilities of C? C,
>>> stdlib, pari/NTL/BLAS/libSingular?
>>
>> I'd say that the _c_init_ should just be plain standard C (i.e., it
>> should compile with just gcc). This means that lots of functionality
>> won't be able to be translated (for example, most stuff over fields or
>> groups), but it would be able to translate generic symbolic expressions,
>> like originally asked.
>
> isn't fast float doing something very similar, i.e. building up stdlib C tress
> for evaluation?
Yes, it is doing a lot of the work for you.
>> We could have _c_NTL_init_ or _c_blas_init_, etc., for variants if
>> people want. Another thought is to pass options to the systems, like
>> _c_init_('blas','NTL','singular').
>
> That looks like an infinite amount of work compared to very little benefit.
> Anybody interested in writing code for these libraries, can look at our
> sources to see how we link into them. I doubt automatic code generation would
> be of much use here.
I have thought some about automatic code generation from fast_float
objects using a pluggable language/type. Then anything that can produce a
fast_float can produce code. Still haven't had time to implement much
along those lines though.
- Robert
--~--~---------~--~----~------------~-------~--~----~
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/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---