Closed CRTified closed 1 year ago
Can you add more "varied" tests here: https://github.com/chessai/nix-std/blob/master/test/sections/num.nix#L73
Are these tests sufficient, or did you have something else in mind?
And should I squash the commits for a cleaner history?
Are these tests sufficient, or did you have something else in mind?
And should I squash the commits for a cleaner history?
I'll squash when I merge
This looks good
This PR changes the naive method of computing the power of some number to the more efficient exponentiation by squaring.
It is likely that this is completely unnecessary as a change, as nix only supports single-precision 64 bit integers so far. If this changes at some time in the future, this would be more robust.
Tests remain successful for me.