Replies: 2 comments 1 reply
-
Regarding my last point, you'll always want to cast your values to type "double" before squaring if integer overflow is an issue, which I assume it is. For example, if your 64-bit integer is 0x20000000000001 and you square it, you won't get the right answer. Casting it to a double causes loss of precision, but as a double multiplying 0x20000000000001 by itself gives the same result, and faster, than using std::pow(). |
Beta Was this translation helpful? Give feedback.
-
Thanks Michael, helpful suggestions which I've included in the latest update.
However, I'm not persuaded to do this. 😁 |
Beta Was this translation helpful? Give feedback.
-
I've just started experimenting with Clipper2, and it's glorious. Here are some quick suggestions. If any have already been implemented and I just haven't found them, or if any are nonsensical, I'd appreciate a push in the right direction.
Beta Was this translation helpful? Give feedback.
All reactions