Link the <fenv.h> header (#16597)

This commit is contained in:
konsumlamm 2021-01-05 20:51:51 +01:00 • committed by GitHub
commit 2c2baa9fad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -1,8 +1,7 @@
import fenv
import std/fenv
func is_significant(x: float): bool =
if x > minimumPositiveValue(float) and x < maximumPositiveValue(float): true
else: false
x > minimumPositiveValue(float) and x < maximumPositiveValue(float)
doAssert is_significant(10.0)