Skip to content

Add support for complex numbers #355

Open
@IvanUkhov

Description

@IvanUkhov

Hi,

According to the standard (section 6.7.2, page 111), the C language provides the _Compex type specifier, which allows one to work with complex numbers using the following types:

  • float _Complex,
  • double _Complex, and
  • long double _Complex.

I’m curious if there are any particular objections against adding the following types to libc:

  • c_float_complex and
  • c_double_complex.

The reason I ask is that there are C APIs that make use of complex numbers, and, in order interact with them from Rust, one has to create complex types him/herself instead of just importing them from libc. Thank you!

Regards,
Ivan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions