Skip to content

Commit

Permalink
refactor: use stdlib smallest float64 constant
Browse files Browse the repository at this point in the history
  • Loading branch information
steff456 committed Jul 14, 2023
1 parent 00243f3 commit 561aec1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lib/node_modules/@stdlib/math/base/ops/cdiv/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"@stdlib/complex/reim",
"@stdlib/math/base/special/abs",
"@stdlib/constants/float64/max",
"@stdlib/constants/float64/eps"
"@stdlib/constants/float64/eps",
"@stdlib/constants/float64/smallest-normal"
]
},
{
Expand All @@ -59,7 +60,8 @@
"@stdlib/complex/reim",
"@stdlib/math/base/special/abs",
"@stdlib/constants/float64/max",
"@stdlib/constants/float64/eps"
"@stdlib/constants/float64/eps",
"@stdlib/constants/float64/smallest-normal"
]
},
{
Expand All @@ -77,7 +79,8 @@
"@stdlib/complex/reim",
"@stdlib/math/base/special/abs",
"@stdlib/constants/float64/max",
"@stdlib/constants/float64/eps"
"@stdlib/constants/float64/eps",
"@stdlib/constants/float64/smallest-normal"
]
}
]
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/math/base/ops/cdiv/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include "stdlib/complex/reim.h"
#include "stdlib/constants/float64/max.h"
#include "stdlib/constants/float64/eps.h"
#include "stdlib/constants/float64/smallest_normal.h"
#include <stdint.h>

const double LARGE_THRESHOLD = STDLIB_CONSTANT_FLOAT64_MAX * 0.5;
// TODO: Change to stdlib min constant once implemented
const double SMALL_THRESHOLD = __DBL_MIN__ * ( 2.0 / STDLIB_CONSTANT_FLOAT64_EPS );
const double SMALL_THRESHOLD = STDLIB_CONSTANT_FLOAT64_SMALLEST_NORMAL * ( 2.0 / STDLIB_CONSTANT_FLOAT64_EPS );
const double RECIP_EPS_SQR = 2.0 / ( STDLIB_CONSTANT_FLOAT64_EPS * STDLIB_CONSTANT_FLOAT64_EPS );

/**
Expand Down

0 comments on commit 561aec1

Please sign in to comment.