Robert Bradshaw wrote: > On Apr 2, 2008, at 12:05 PM, Jason Grout wrote: > >> Robert Bradshaw wrote: >>> Thanks. >>> >>> I put a comment up on trac, but it boils down to >>> >>> sage: f = (x == 1) >>> sage: g = (1 == x) >>> sage: bool(f+g) >>> True >>> sage: ff = f._fast_float_('x') + g._fast_float_('x') >>> sage: ff(0) >>> 0.0 >>> >>> but I think piecewise functions would be a good way to implement the >>> desired functionality. >> What sort of interface do you see with piecewise functions and the >> _fast_float_ interface (i.e., what sort of opcodes?) > > Actually, given more thought, I think the opcodes you have chosen > make sense, but there should be an "IF" opcode that operates on > [true_val false_val test_val] as well which would allow for a full > range of piecewise functions. (One could look at making conditional > jumps so as to not calculate both sides of the expression, though > this would be a fundamental change to the code. Hmm...) >
A thought occurred to me when I looked at the fast_eval code: what's the possibility of doing these sorts of computations on a GPU? Would it be worth it? If I recall correctly, the limitation of those things is that they are floating point, but, of course, that's the assumption in fast_float. GPU computations seem to fit the bill here also because these fast_float operations generally are called on a huge range of data and could be done in parallel. Jason --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---