You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
pbiggar
changed the title
Inf and NaN
Remove Inf and NaN where possible
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:
The text was updated successfully, but these errors were encountered: