Which systems support a COMPLEX data type?
|
07-14-2023, 04:02 PM
Post: #19
|
|||
|
|||
RE: Which systems support a COMPLEX data type?
(07-14-2023 02:55 PM)KeithB Wrote:(07-14-2023 01:15 PM)johnb Wrote: Agreed. Sure it does https://en.wikipedia.org/wiki/C_mathemat...#complex.h C99 standardized complex types and functions. Before C99 it was a non-standard extension supported by various compilers. That's how standards come about, usually. A header file complex.h is included to declare the types and the explicit intent to use complex functions in your code, which is always nice to tell the world what you're doing. You can use _Complex_I for the imaginary unit, e.g. 1 + 2*_Complex_I. In case that's too verbose, just #define I _Complex_I or if you're an engineer then #define J _Complex_I or something like that. Complex arithmetic in C is performed with the standard arithmetic operators, because the complex type is a built-in type, just like float and double. Complex arithmetic in C does not require a library call, neither in the source code nor in the generated MC that just operates on floating pointer registers. - Rob PS. The HP Forums are great! Don't take this as crude or offense, just a bit of poking, but sometimes I feel there is a slight tendency for wishful thinking we still live in the 70s: time for everything else has stood still and can be ignored except for HP calculators "I count on old friends to remain rational" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)