Hi Ingo, [adding a “real” type qualifier] > How do you do that? I tried to implement this and failed because I didn't > know where to start. ;)
Looking in PP.pod gives a good start. In this case, it’s related to Pars, which are encapsulated in PdlParObj. After that, it was easy! (Apart from fixing all the accumulated “hacks” over the years) I’ll also be adding a similar “complex” type qualifier, to do the converse. I think that after the above, as a start of the work to make a “native” method for PDL::Complex, that I will make trying to sort complex numbers of whatever type throw an error. It’s not just dubious, it’s actually incorrect. >> In a similar vein: is it really useful to call creal/cimag on real data? It >> seems to me that too should throw an exception. > I think it should just return the input and 0, respectively. Thus it can be > used to write generic code that accepts real and complex input. carg should > do the same. Even conj kind of works that way. Agreed. Best regards, Ed
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel