Skip to content

Add reciprocal and SinCos methods to IFloatingPoint #58607

@lilinus

Description

@lilinus

Background and Motivation

Suggestion for the generic math. The mentioned methods are available in Math and MathF classes. I think it would be nice to add these to the IFloatingPoint interface.

Proposed API

namespace System
{
    public interface IFloatingPoint<TSelf>
    {
...
+        (TSelf, TSelf) SinCos(TSelf x);
+        TSelf ReciprocalEstimate(TSelf x);
+        TSelf ReciprocalSqrtEstimate(TSelf x);
...
    }
}

Oops forgot to add api suggestion label...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions