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(). |
0 replies
|
Thanks Michael, helpful suggestions which I've included in the latest update.
However, I'm not persuaded to do this. 😁 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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.
All reactions