Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwendt committed Apr 12, 2024
1 parent 66e72ab commit 7e21176
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/include/cudf/strings/detail/convert/string_to_float.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ __device__ inline double stod(string_view const& d_str)
ch = *in_ptr++;
if (ch < '0' || ch > '9') break;
exp_ten = (exp_ten * 10) + (int)(ch - '0');
// prevent integer overflow
// Prevent integer overflow in exp_ten. 100,000,000 is the largest
// power of ten that can be multiplied by 10 without overflow.
if (exp_ten >= 100'000'000) { break; }
}
}
Expand Down

0 comments on commit 7e21176

Please sign in to comment.