At 7:41 PM +0000 1/8/03, Bernhard Schmalhofer (via RT) wrote:
I have been looking into the possibility of adding complex numbers as PMCs.
When looking at core.ops I was missing some operations, where INT, NUM
and PMC interact.
For addition I found the operations:
add_i_i, add_n_n, add_p_i, add_p_n, add_p_p, add_i_i_i, add_n_n_n,
add_p_p_i, add_p_p_p.
Trying to make this more consistent I added:
add_n_i, add_n_n_i and app_p_p_n.
This means that there are now 12 addition ops.
I also brought 'sub', 'mul' and 'div' to the same level.

I have put some tests in t/op/arithmetics.t. Each of the operations
mentioned above should be called in the test.

However I still wonder about operations like 'div_p_n_p'. Unlike
'div_p_p_n', it can't be implemented with the vtable-function divide_float.

I have attached the patch for core.ops and the file arithmetics.t.
Applied, thanks.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to