Skip to content

Commit

Permalink
lift constants to type T
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkichler committed Jul 11, 2024
1 parent c3b0b7d commit 1cc4165
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/cuinterval/arithmetic/basic.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -956,8 +956,10 @@ template<typename T>
inline constexpr __device__ unsigned int quadrant(T v)
{
int quotient;
T vv = intrinsic::next_after(intrinsic::sub_down(v, std::numbers::pi / 4), static_cast<T>(0));
T rem = remquo(vv, std::numbers::pi / 2, &quotient);
T pi_4 { std::numbers::pi / 4 };
T pi_2 { std::numbers::pi / 2 };
T vv = intrinsic::next_after(intrinsic::sub_down(v, pi_4), static_cast<T>(0));
T rem = remquo(vv, pi_2, &quotient);
return static_cast<unsigned>(quotient) % 4;
};

Expand Down

0 comments on commit 1cc4165

Please sign in to comment.