Skip to content

Commit ea451ff

Browse files
committed
floor and ceil unnecessary calls to std::signbit removed
1 parent 60b87c0 commit ea451ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/ceil.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ template <typename argT, typename resT> struct CeilFunctor
6969
return in;
7070
}
7171
else {
72-
if (in == 0 && std::signbit(in)) {
72+
if (in == 0) {
7373
return in;
7474
}
7575
return std::ceil(in);

dpctl/tensor/libtensor/include/kernels/elementwise_functions/floor.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ template <typename argT, typename resT> struct FloorFunctor
6969
return in;
7070
}
7171
else {
72-
if (in == 0 && std::signbit(in)) {
72+
if (in == 0) {
7373
return in;
7474
}
7575
return std::floor(in);

0 commit comments

Comments
 (0)