
1 Jul
2009
1 Jul
'09
10:40 p.m.
* CComplexFloat, CComplexDouble Related to 'float complex' and 'double complex'.
We need a way to actually examine the values, since 'fromIntegral' won't work. I think the easiest way is to actually reuse Complex which is already in Haskell 98, defining
What do you think of newtype CComplexFloat = CComplexFloat {crealf, cimagf :: CFloat} 'crealf' and 'cimagf' actually belong to the standard, and are supposed to be used to read the real and imaginary part of a float complex. There are also 'creal', 'cimag', 'creall', 'cimagl' that we would use in CComplexDouble and CComplexLDouble.
We may also want to add 'long double' as a c marshable type too.
I think it's already there. Isn't it CLDouble? Maurício