sigutils icon indicating copy to clipboard operation
sigutils copied to clipboard

Support esoteric Visual Studio's complex arithmetic

Open BatchDrake opened this issue 6 years ago • 0 comments

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.

BatchDrake avatar Dec 22 '19 01:12 BatchDrake