sigutils
sigutils copied to clipboard
Support esoteric Visual Studio's complex arithmetic
In order to port sigutils to Windows machines, we need to replace C99's _Complex types by Microsoft's _Fcomplex (or _Dcomplex in double precision arithmetic). The biggest pitfall about using these types comes from the lack of complex operators in Visual Studio: all complex arithmetic must be performed through intrinsics like _FCaddcc or _FCmulcc. This would make the code extremely cumbersome and difficult to maintain.
The only alternative is to keep the current syntax and write an extremely convoluted C preprocessor that is able to detect all complex arithmetic across a file and translate it to Visual Studio intrinsics in compile time.