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

Remove Inf and NaN where possible #3306

Closed
pbiggar opened this issue Nov 29, 2021 · 1 comment
Closed

Remove Inf and NaN where possible #3306

pbiggar opened this issue Nov 29, 2021 · 1 comment

Comments

@pbiggar
Copy link
Member

pbiggar commented Nov 29, 2021

Problem: In Dark v1, it's possible to accidentally create Inf and NaN, but it was not really possible to use them.

Solution: prevent creating Inf or NaN. Any functions which (internally) create invalid floats will return Results instead:

Float::add(Float: a, Float: b) -> Result (Float, Error)
Float::subtract(Float: a, Float: b) -> Result (Float, Error)
Float::divide(Float a, Float b) -> Result (Float, Error)
Float::power(Float base, Float exponent) -> Result (Float, Error)
Float::multiply(Float: a, Float: b) -> Result (Float, Error)
@pbiggar pbiggar changed the title Inf and NaN Remove Inf and NaN where possible Nov 29, 2021
@pbiggar pbiggar removed the v-next label Mar 10, 2023
@StachuDotNet
Copy link
Member

folded into #5243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants