Miles Gould <mi...@...> writes:

> 
> Hi everyone,
> 
> I'm writing some code to work with dual numbers (see
> http://en.wikipedia.org/wiki/Dual_number), and, since they can be seen
> as an extension of the reals, it would be nice to implement the number
> protocol and take advantage of the math-combination word. Is this
> possible?
> 
> Thanks,
> Miles
> 

Hi Miles,

I did some work on dual numbers a while back, which is in extra in the math.dual
vocab. I don't think you can implement the number protocol for new types without
messing with the VM. I ended up just implementing words like d+, d-, d*, d/ etc.
Slava implemented quaternions the same way.

I understand that factor may eventually get multimethods, and then it may become
possible to add new things to the number tower by writing factor code, but I
don't think there's a set schedule.

Regards,

Jason


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to