Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding option in csproj for software and fixed point number types #87793

Closed
Shadowblitz16 opened this issue Jun 19, 2023 · 3 comments
Closed

Comments

@Shadowblitz16
Copy link

Shadowblitz16 commented Jun 19, 2023

It's really useful in networking to have cross platform deterministic data types
Instead of needing to send data over the network we can just send inputs and rely on the fact that our output will always be the same.

consider adding..

<FloatingType>software</FloatingType>

and

<FloatingType>softwarefixed</FloatingType>

To csproj and dotnet.

This would automatically make half, float, double, decimal use fixed or software based implimentation
The default would be...

<FloatingType>hardware</FloatingType>
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 19, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 19, 2023
@Shadowblitz16 Shadowblitz16 changed the title Consider adding option in csproj for software floats and fixed point number types Consider adding option in csproj for software and fixed point number types Jun 19, 2023
@danmoseley danmoseley added area-System.Numerics and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 20, 2023
@ghost
Copy link

ghost commented Jun 20, 2023

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

It's really useful in networking to have cross platform deterministic data types
Instead of needing to send data over the network we can just send inputs and rely on the fact that our output will always be the same.

consider adding..

<FloatingType>software</FloatingType>

and

<FloatingType>softwarefixed</FloatingType>

To csproj and dotnet.

This would automatically make half, float, double, decimal use fixed or software based implimentation
The default would be...

<FloatingType>hardware</FloatingType>
Author: Shadowblitz16
Assignees: -
Labels:

area-System.Numerics, untriaged

Milestone: -

@danmoseley
Copy link
Member

danmoseley commented Jun 20, 2023

Overall issue
#61885

Other issues come up eg
#42747

@tannergooding
Copy link
Member

This would automatically make half, float, double, decimal use fixed or software based implimentation

Primitive floating-point arithmetic should already be deterministic as should various higher level functions like FusedMultiplyAdd, Abs, Sqrt, etc

A few APIs such as Cos, Sin, or Tan defer to the C Runtime implementation and can differ; but this wouldn't be controlled via a build configuration switch and is in general tracked by the issues Dan linked to above.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 7, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants