fix(numerics): add missing numeric_traits<float>::zero()
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
b16a64f44b
commit
1d18f60dd5
2 changed files with 2 additions and 1 deletions
|
@ -33,6 +33,7 @@ static void tst1() {
|
|||
tst_num(mpfp(0.0, 512));
|
||||
tst_num(mpbq(3));
|
||||
tst_num(1.0);
|
||||
tst_num(static_cast<float>(1.0));
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
|
@ -25,7 +25,7 @@ void float_ceil(float & v) { v = std::ceil(v); }
|
|||
void float_floor(float & v) { v = std::floor(v); }
|
||||
|
||||
static float g_zero = 0.0;
|
||||
float const & zero() {
|
||||
float const & numeric_traits<float>::zero() {
|
||||
return g_zero;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue