Arthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish · edit-23 days agoIncredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputslemmy.mlimagemessage-square35linkfedilinkarrow-up1348arrow-down14file-text
arrow-up1344arrow-down1imageIncredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputslemmy.mlArthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish · edit-23 days agomessage-square35linkfedilinkfile-text
cross-posted from: https://lemmy.blahaj.zone/post/38950495 https://cosocial.ca/@mhoye/116111505546606451
minus-squaresepiroth154@feddit.nllinkfedilinkarrow-up22·3 days agoYou could simplify it even further by removing the int x parameter of the function…
minus-squareneedanke@feddit.orglinkfedilinkarrow-up2·9 hours agoEven better, do the work at compile time to respect the customers resources: const bool isPrime = false
minus-squaresepiroth154@feddit.nllinkfedilinkarrow-up1·6 hours agoMy gosh, you always feel so stupid when someone points out something so obvious! Thanks
minus-squareobelisk_complex@piefed.calinkfedilinkEnglisharrow-up11arrow-down1·3 days agoSo elegant! This is too valuable for GitHub, sell this directly to the Saudi government.
You could simplify it even further by removing the int x parameter of the function…
Even better, do the work at compile time to respect the customers resources:
const bool isPrime = falseMy gosh, you always feel so stupid when someone points out something so obvious! Thanks
So elegant! This is too valuable for GitHub, sell this directly to the Saudi government.