Arthur Besse@lemmy.ml to Programmer Humor@lemmy.mlEnglish · edit-210 days agoIncredible stochastic algorithm, gets more reliable the larger your input, incredibly fast, trivial to implement and deterministic on its inputslemmy.mlimagemessage-square36linkfedilinkarrow-up1387arrow-down16file-text
arrow-up1381arrow-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-210 days agomessage-square36linkfedilinkfile-text
cross-posted from: https://lemmy.blahaj.zone/post/38950495 https://cosocial.ca/@mhoye/116111505546606451
minus-squaresepiroth154@feddit.nllinkfedilinkarrow-up26·10 days agoYou could simplify it even further by removing the int x parameter of the function…
minus-squareobelisk_complex@piefed.calinkfedilinkEnglisharrow-up15arrow-down1·10 days agoSo elegant! This is too valuable for GitHub, sell this directly to the Saudi government.
minus-squareneedanke@feddit.orglinkfedilinkarrow-up3·7 days agoEven better, do the work at compile time to respect the customers resources: const bool isPrime = false
minus-squaresepiroth154@feddit.nllinkfedilinkarrow-up3·7 days agoMy gosh, you always feel so stupid when someone points out something so obvious! Thanks
You could simplify it even further by removing the int x parameter of the function…
So elegant! This is too valuable for GitHub, sell this directly to the Saudi government.
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